In this lab you will implement a General Purpose Processor (GPP) using techniques we've learned so far. A GPP unlike a Single Purpose Processor can accomplish various tasks via programs written in an Instruction Set that the microprocessor can recognize. Most processors are built from a controller, dataptath and memory. For the purposes of this lab we will deviate from this processor architecture and have the memory integrated into the controller.
A few things to note:
The General Purpose Processor we will be building will have to recognize the instruction set found below:
INSTRUCTION | OPCODE | FUNCTION |
MOVA Rd | 0000|dd00 | Accumulator = Register [dd] |
MOVR Rd | 0001|dd00 | Register [dd] = Accumulator |
LOAD Mem * | 0010|mmmm | Accumulator = Memory[mmmm] |
LOADI Imm | 0011|iiii | Accumulator = Immediate |
STORE Mem *,# | 0100|mmmm | Memory[mmmm] = Accumulator |
JZ Address | 0101|0000 aaaa|aaaa |
if (Acc == 0) PC = Address[aaaa] // goto address else NOP // do nothing |
JMP Address | 0110|0000 aaaa|aaaa |
PC = Address[aaaa] |
ADD Rd | 0111|dd00 | Accumulator = Accumulator + Register[dd] |
ANDR Rd | 1001|dd00 | Accumulator = Accumulator AND Register[dd] |
INV | 1011|0000 | Accumulator = NOT Accumulator |
SHR | 1010|0000 | Accumulator = Accumulator >> 1 |
SUB Rd # | 1000|dd00 | Accumulator = Accumulator - Register[dd] |
HALT | 1111|1111 | Stop execution |
The following files contain VHDL code for a microprocessor that only
operates on 2 instructions: LOADI and HALT.
When you download these you will need to rename them so the
extensions are .vhd.
Assignment