CS3421, Fall 2008

Lab Assignment 6
Complete CPU Implementation

Due Monday, December 1, 2008 at 10 PM

The Problem

Your task is to complete the CPU implementation begun in lab 5. This includes circuitry to execute the remaining instructions in the instruction set, and circuitry to fetch instructions and increment the pc.

You must have a multi-cycle implementation. This can be as simple as fetching the instruction and incrementing the PC in one cycle, then decoding and executing the instruction in the next cycle using the circuitry you already have. This will give you a very simple two-state state machine. However, you may want to do "better" (see below).

Circuit Restrictions

You must have a memory element in which the program being simulated is stored. It MUST be named "MEMORY" (all upper case). It MUST have an access time of 2000. It CANNOT be in a subcircuit.

You MUST have a program counter named "PC" (all upper case) with initial value 0. It CANNOT be in a subcircuit. The CPU.jls file already has this element - don't delete it.

Use "named wires" with nice names to avoid long wires in the diagram. Feel free to define subcircuits as you see fit to make your circuit easier to understand (except don't put the items above in any subcircuits).

Propogation Delay and Cycle Time

Don't worry about minimizing propagation delay in order to make the cycle time as small as possible. I'm more interested in getting a correctly working slow machine than a fast machine that doesn't work. However do try to set the clock cycle time reasonably small given the circuitry you have. Do not change the propagation delays of any elements except DELAY elements.

Testing

I would advise creating short test memory files that test just a few instructions at a time.

Tools

The following tools are in /classes/cs3421/common/lab5.

Submitting

Before you submit, make sure you have your name (and your partner's name if you have one) on your circuit.

Do not change the propagation delays of any elements except DELAY elements.

Also, make sure your program counter is called "PC" (all upper case) and your memory element is called "MEMORY" (all upper case), and that both are not in any subcircuits. If you don't you will get 0 on this assignment.

Use the submit command to electronically submit your "CPU.jls" file to "cs3421", assignment "lab6" by the due date.

You must submit your file by the due date/time in order to receive credit.

Late assignments will get a grade of 0.

The Fastest CPUs...

The students who submit the three fastest working CPU circuits will be excused from the taking final exam. I will write a test program that will be used to measure the speed of your circuit, but you will not get to see it. You can assume it will use every one of the instructions.