Submitted 15 September 1998
For our project we propose a 4-bit, accumulator style mini-CPU. It will have an external memory interface and a 4-bit ALU. The instruction set will include instructions listed below:
We have discussed both fixed length instructions and variable length instructions. Instructions will have a 4 bit op-code. Some instructions will need only this opcode and could be 4 bit instructions (reset, nop and branch instructions). Instructions involving memory accesses could be 12 bit instructions, including an 8 bit memory address (load, store instructions). Others would require the 4 bit op-code and a 4 bit operand. By having variable length instructions we could potentially save a significant amount of memory when storing the program. Additionally, by having the entire memory address available in one instruction rather than requiring multiple instructions to obtain it reduces processing time. Fixed length instructions require less hardware for decoding, but waste memory space and, if the length chosen is not enough to contain an entire memory address, can also complicate the software programming necessary to accomplish a memory read or write.
Our CPU will have several registers. The accumulator will be the main focus of the chip. In an accumulator style CPU, the accumulator acts as one of the source registers and also the destination register. This reduces hardware complexity, but at the cost of more reads and writes. We will also have an 8 bit program counter, a 4 bit instruction register for storing the opcode, a data register for storing information in a second source register for some instructions, and a memory address register, if necessary.