Am2901 Completion and Integration with Am9080a

Similar documents
Laboratory Exercise 7

EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

register:a group of binary cells suitable for holding binary information flip-flops + gates

Pin Description, Status & Control Signals of 8085 Microprocessor

ENEE245 Digital Circuits and Systems Lab Manual

ENEE245 Digital Circuits and Systems Lab Manual

ENEE 245 Lab 1 Report Rubrics

CPE 200L LABORATORY 4: INTRODUCTION TO DE2 BOARD UNIVERSITY OF NEVADA, LAS VEGAS GOALS: BACKGROUND:

EE431 April 6, 2009 Midterm Material on Assignments 6 to 10

Lab Assignment 2. Implementing Combinational and Sequential Logic in VHDL

UNIVERSITY OF MANITOBA DEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING. Term Test #1 ECE 3610 MICROPROCESSING SYSTEMS

E85: Digital Design and Computer Engineering Lab 2: FPGA Tools and Combinatorial Logic Design

Laboratory Exercise 3

Microcomputer Architecture and Programming

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb UMass Amherst Fall 2017

QUARTUS II Altera Corporation

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

ECE 353 Lab 4. Verilog Review. Professor Daniel Holcomb With material by Professor Moritz and Kundu UMass Amherst Fall 2016

CSCB58 - Lab 3. Prelab /3 Part I (in-lab) /2 Part II (in-lab) /2 TOTAL /8

CHAPTER 5 : Introduction to Intel 8085 Microprocessor Hardware BENG 2223 MICROPROCESSOR TECHNOLOGY

Lab #12: ArithmeticLogic Unit

yamin/

Computer Organization

A Verilog Primer. An Overview of Verilog for Digital Design and Simulation

HDLs and SystemVerilog. Digital Computer Design

The Itanium Bit Microprocessor Report

Lecture 15: System Modeling and Verilog

A Brief Introduction to Verilog Hardware Definition Language (HDL)

Laboratory Exercise 3 Comparative Analysis of Hardware and Emulation Forms of Signed 32-Bit Multiplication

Figure 1: Verilog used to generate divider

4DM4 Lab. #1 A: Introduction to VHDL and FPGAs B: An Unbuffered Crossbar Switch (posted Thursday, Sept 19, 2013)

LAB 1: Combinational Logic: Designing and Simulation of Arithmetic Logic Unit ALU using VHDL

V8-uRISC 8-bit RISC Microprocessor AllianceCORE Facts Core Specifics VAutomation, Inc. Supported Devices/Resources Remaining I/O CLBs

SPI 3-Wire Master (VHDL)

ARM 64-bit Register File

2 nd Year Laboratory. Experiment: FPGA Design with Verilog. Department of Electrical & Electronic Engineering. Imperial College London.

MODELING LANGUAGES AND ABSTRACT MODELS. Giovanni De Micheli Stanford University. Chapter 3 in book, please read it.

Chapter 2 Getting Hands on Altera Quartus II Software

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

ECE 353 Lab 4. MIDI Receiver in Verilog. Professor Daniel Holcomb UMass Amherst Fall 2016

Lab 7: RPN Calculator

Lecture 3: Modeling in VHDL. EE 3610 Digital Systems

ELCT 501: Digital System Design

ALTERA FPGAs Architecture & Design

EE 231 Fall Lab 1: Introduction to Verilog HDL and Altera IDE

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

Mark II Aiken Relay Calculator

MC9S12 has 16 bit address and 16 bit data buses. Not enough pins on MC9S12 to allocate 35 pins for buses and pins for all other functions

Digital Design with FPGAs. By Neeraj Kulkarni

ALTERA FPGA Design Using Verilog

ENGN1640: Design of Computing Systems Topic 02: Design/Lab Foundations

This Lecture. Some components (useful for the homework) Verilog HDL (will continue next lecture)

FPGA: FIELD PROGRAMMABLE GATE ARRAY Verilog: a hardware description language. Reference: [1]

problem maximum score 1 8pts 2 6pts 3 10pts 4 15pts 5 12pts 6 10pts 7 24pts 8 16pts 9 19pts Total 120pts

Laboratory Memory Components

Intel 8086 MICROPROCESSOR. By Y V S Murthy

MICROPROCESSOR AND MICROCONTROLLER BASED SYSTEMS

AL8259 Core Application Note

EN2911X: Reconfigurable Computing Topic 02: Hardware Definition Languages

Announcements. This week: no lab, no quiz, just midterm

ECE 3610 Microprocessing Systems Lab #1 Verilog Design of the TOC Using Quartus II

Verilog. What is Verilog? VHDL vs. Verilog. Hardware description language: Two major languages. Many EDA tools support HDL-based design

Lab #1. Topics. 3. Introduction to Verilog 2/8/ Programmable logic. 2. Design Flow. 3. Verilog --- A Hardware Description Language

EEL 4783: Hardware/Software Co-design with FPGAs

14:332:231 DIGITAL LOGIC DESIGN. Hardware Description Languages

CSE 141L Computer Architecture Lab Fall Lecture 3

THE MICROPROCESSOR Von Neumann s Architecture Model

M A S S A C H U S E T T S I N S T I T U T E O F T E C H N O L O G Y DEPARTMENT OF ELECTRICAL ENGINEERING AND COMPUTER SCIENCE

Laboratory Exercise 9

REGISTER TRANSFER LANGUAGE

N-input EX-NOR gate. N-output inverter. N-input NOR gate

Register Transfer and Micro-operations

Course Topics - Outline

Lab 4: Register File and Memory 50 points Instructor: Yifeng Zhu Due: One week

Institute of Engineering & Management

ECE 353 Lab 3 (Verilog Design Approach)

Laboratory Exercise 1

Project - RTL Model. III. Design Decisions. Part 4 - May 17, Jason Nemeth. model is capable of modeling both provided benchmarks.

Microcontroller Systems

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B DIGITAL SYSTEMS II Fall 1999

Verilog introduction. Embedded and Ambient Systems Lab

EE183 LAB TUTORIAL. Introduction. Projects. Design Entry

Homework deadline extended to next friday

CME341 Assignment 4. module if\_else\_combinational\_logic( input [3:0] a, b, output reg [3:0] y ); * begin

CSEE W4840 Embedded System Design Lab 1

VLSI Design 13. Introduction to Verilog

AL8253 Core Application Note

SignalTap II with Verilog Designs. 1 Introduction. For Quartus II 13.1

Verilog Design Principles

8086 INTERNAL ARCHITECTURE

Contents. Appendix D Verilog Summary Page 1 of 16

ENGR 3410: Lab #1 MIPS 32-bit Register File

1. INTRODUCTION TO MICROPROCESSOR AND MICROCOMPUTER ARCHITECTURE:

Assignment 01 Computer Architecture Lab ECSE

DQ8051. Revolutionary Quad-Pipelined Ultra High performance 8051 Microcontroller Core

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180A DIGITAL SYSTEMS I Winter 2015

Verilog Design Entry, Synthesis, and Behavioral Simulation

Introduction to VHDL Design on Quartus II and DE2 Board

ECE 571 Advanced Microprocessor-Based Design Lecture 3

Transcription:

Am2901 Completion and Integration with Am9080a A. Objectives Written By Kurt English This laboratory assignment is an introduction to the Verilog Hardware Description Language, which will be used to complete an AMD Am2901 microprocessor slice. Students are expected to complete the Q- Register, ALU, ALU input and output routing, RAM shift, and Q shift sections of the Am2901, while the memory of the Am2901 is already provided. The Am2901 will then be implemented into a provided Am9080a Verilog code and execute full Intel 8080 compatible instructions. The Verilog code will be run on a Cyclone II FPGA through Altera Quartus II software. B. Preparatory Reading and Other References 1. Am2901 Datasheet. Provided in lab assignment. 2. Am9080a Datasheet. Provided in lab assignment. C. General Description of Am2901 Microprocessor Slice The Am2901 contains a 4-bit ALU, 16x2x4bit memory, and a Q-register for output shift operations. It has a 9-bit opcode. ALU o 4-bit o The ALU can read in data from its internal memory, external connections, or the Q- register. o 3-bit Opcode from overall 9-bit opcode to Am2901 o Can perform addition, subtraction, or, and, xor, and xnor operations. Memory o 16 addresses o 2 4-bit divisions, A and B o 2 output ports, A and B o Can read from A or B sections of memory independently o Write address for B is used for both A and B write address

o Memory is read and written to every clock cycle. Writes occur on the positive clock edge, and reads on the negative clock edge. Q-Register o 4-bit o Can shift left or right by 1 bit each clock cycle o Leftmost and rightmost bits have external bidirectional connections outside the Am2901 o Can receive input from itself or ALU output

Am2901 Block Diagram

Am2901 Internal Operation

Am2901 Op-Codes D. Am2901 Relation to Am9080a The Am2901 serves as the ALU and register file for the Am9080a. The Am9080a register file is stored within the Am2901 internal memory. Four AM2901 microprocessor slices are used to conduct math operations up to 16 bits. E. Differences Between Lab Implementation and Literal Am2901 The Am2901 used in the provided Am9080a code is expanded to 8-bits. This reduces the complexity of the Am9080a design while adding little to the complexity of the Am2901. In the current implementation of the Am9080a and Am2901, the C n+4 signal is omitted, which causes some 8080 instructions to fail. Extra credit will be awarded to students who implement the C n+4 signal and properly wire it into the Am9080a.

F. Verilog Basics Assignment Asynchronous Asynchronous signal assignment is done with the assign operator. Assign will connect two wires together. Assign can be used to connect multiple wires if a wire is already connected to another wire: wire A; wire B; wire C; assign B = A; assign C = B; // connects wires A and B together // connects wire C to wire B, which is also connected to wire A The above will connect wires A, B, and C together. Assign can also set outputs to high impedance, logic high, or logic low. assign C = 1 bz; // high impedance assign B = 1 b0 // logic low assign A = 1 b1 // logic high Assign can also be used to make decisions on what the output should be, instead of a simple assignment: assign B = (A)? 1 b1 : 1 bz; The above will set wire B to logic high if wire A is logic high. If wire A is logic low, wire B will be set to high impedance. This is very useful for making buses. Synchronous Synchronous signal assignment is done with the always operator. Always will conduct logic when a certain condition is met, such as a clock pulse transitioning to logic high. Output signals set in an always block must be registers, not wires. reg S; wire B; wire C; always @ (posedge clock) begin S = B + C; end The above will add B and C and set the result to register S whenever a positive transition occurs on clock.

Math Mathmatical operations are very simple in Verilog, for example, the following code will add signals A and B together for sum S. Addition can be done on multi-bit signals: assign S = A+B; OR is done in the following code snipet. The signal ored will be the result of the OR operation between A and B. You can place any signal name in place of ored, A, or B : assign ored = A B; Other operations are very similar to OR: assign result = A&B; // A AND B assign result = A^B; // A XOR B assign result = A~^B; // A XNOR B Modules All Verilog code must be within a module. A module will have inputs and outputs linking it to other modules. A Verilog HDL file can contain just one, or multiple modules. module example_module ( A, B, C ); input A; output B; inout C; // input to module // output from module // bidirectional // code here end

Below demonstrates how to link modules: // code in calling module wire D; wire E; wire F; example_module example_module_name { D, // first pin on module is connected to wire D E, // second pin on module is connected to wire E F // third pin on module is connected to wire F }; // more code in calling module An alternative syntax is below: // code in calling module wire D; wire E; wire F; example_module example_module_name {.A(D), // module pin A on child module is connected to wire D of parent module.b(e), // module pin B on child module is connected to wire E of parent module.c(f) // module pin C on child module is connected to wire F of parent module }; // more code in calling module

G. Testing on Am9080a When just beginning the lab, your AM2901 implementation will not be complete enough to produce meaningful output for the rest of the CPU. Therefore, to begin testing you should set the E2901_8.v file to be the Top-Level Entity. This will cause all files above the Am2901 to be ignored, letting you see the direct inputs and outputs to the Am2901 to debug operation. You will then need to create a new.vwf file to test the Am2901 directly.

When your Am2901 is nearing completion and you want to test if it produces the exact output required by the Am9080a, then switch the top level back to the combined.bdf file. 8080_TEST.vwf is already configured with many debug signals to test operation. Multiple test files are included to run full 8080 instructions. The way a test is run is by changing the system memory initialization file. The system memory is separate from the Am9080a. You can either change the memory settings within the default initialization file, which is sysinit3.txt, or you can make a new memory initialization file and change sysmem.v to load that file instead. When using the 8080_TEST.vwf file, it is difficult to find what registers were set to after an Am2901 operation. Some operations only write to the registers within the Am2901, resulting in no output from the Am2901. An easy way to find a result of an operation is to run an STA instruction, which will output the accumulator register. This will send the accumulator to memory, requiring it to be sent out from the Am2901 and allowing the result to be read. The opcode for an 8080 store instruction is 0x32, with 2 additional bytes for the memory destination.

When STA is run, the system memory will latch onto Am9080a data output on the falling edge of DB1 (a control signal for MEMW), so whatever is being sent out of ALU_2_Y (the high-byte Am2901) will be sent to memory, and was the data stored within the accumulator. In green you can see the 0x11 result after subtracting 0xAA from 0xBB, and in red you can see the 0x88, which is the result after rotating right once.

H. RTL Viewer Quartus II contains a highly useful debugging feature known as the RTL Viewer, which will generate visual blocks of each module and display connections. You can double click on each module to view the internal features of that module, single click on a wire to view all connection points for that wire, and zoom out to see the big picture. To use the RTL Viewer, compile your code and click Tools -> Netlist Viewers -> RTL Viewer.

I. Routed Am9080a Verilog is highly portable code that can be used by many programs in addition to Quartus II. Below Synopsys software is used to compile structural Verilog code describing point-to-point connections on an IBM 90nm process, then Cadence Encounter is used to route this structural Verilog as a microprocessor ready for production. High ALU refers to the high 8-bit Am2901, and LOW ALU refers to the low 8-bit AM2901. Other file types such as Altera Quartus II.bdf files are specific to Quartus II only, and cannot be used by other programs for other applications.