CSE370 Assignment 8

Distributed: Feb. 27, 1998
Due: March 6, 1998


Reading:

Katz: Chapter 8: pp. 383-433


Project Description

The project is a simple processor that uses 8-bit data and 8-bit instructions. Here is the overall processor description to let you know what you are getting into. For this assignment, however, you will be just designing the components. In the next assignment, you will put the components together into a complete processor.

The processor uses two memories, instruction memory, which contains 32 8-bit instructions, and data memory, which contains 16 8-bit words. The processor also has a register file with 4 registers. This processor has the following instruction set:

Mnemonic    Format         Description
--------------------------------------------
LOAD        00 AAAA RR    Load register RR with data at address AAAA
STORE       01 AAAA RR    Store register RR to address AAAA
JMP         100  AAAAA    Jump to instruction at address AAAAA
JMPZ        101  AAAAA    Jump to address AAAAA if the last ALU result was zero
ADD         1100 SS DD    Add register SS to register DD
SUB         1101 SS DD    Subtract register SS from register DD
CLR         111000  RR    Clear register RR
INC         111001  RR    Increment register RR
DEC         111010  RR    Decrement register RR
HALT        11111111      Halt execution
The processor uses two registers to help execute the program, the program counter (PC) and the instruction register (IR). When the processor starts, the PC is set to 0. The processor then executes one instruction at a time, using two clock cycles, as follows:

In the first clock cycle, the instruction memory is read using the PC as the address. This instruction is stored in the IR and the PC is incremented.

In the second clock cycle, the processor executes the instruction in the IR. It does this by asserting the appropriate control signals to the processor datapath (ALU, registers and memories) so that the right thing happens on the next clock tick.

In this assignment, you will design the components you need. In the next assignment, you will put them together to make the processor.

  1. Design the PC register. This register can be cleared, incremented and loaded. Use an ABEL program, make a block symbol for it, test it out.

  2. Design the register file with four registers. The ADD and SUB instructions need two register values, so your register file should allow two simultaneous reads along with one write. That is, your register file has three ports. (You can just extend the 2-ported memory you designed already.) Design this register file as a schematic and make a block symbol for it. Test it out.

  3. Design the ALU. This is a combinational block that performs add, subtract, increment and decrement according to control inputs. (You can decide how you want to define the control - you might want to look at the instruction set.) Design this as an ABEL program, or as a combination of ABEL and schematic. Make a block symbol for it. Test it out.

  4. Katz exercise 8.13

  5. Katz exercise 8.18 Implement this FSM by following our FSM construction methodology.

  6. Katz exercise 8.26


      Comments to: cse370-webmaster@cs.washington.edu (Last Update: )