Katz: Chapter 8: pp. 383-433
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 executionThe 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.