The Data bus is a bidirectional bus, that is input for instructions, and might be input, output, or neither depending upon whether a load, store or some other instruction is being executed. The CPU applies a z (is disconnected from) the Databus when theCPU is not reading or writing to memory. clk is the input clock.The low order Cin is tied to 0 for this project. The output Address is a 32 bit address bus. The Address bus is equal to PC (just a simple counter starting at 0) during the fetch cycle, it is equal to the last 16 bits of the instruction for a store instruction, and set to z for other instructions. The output signal RW is the read/write control signal from CPU to memory. RW=1 when the CPU is writing to memory, and RW=0 when the CPU is reading (or not using) the DATA bus. The output signal Overflow is the high order Cout.
| Instruction | Opcode | destination register address | source y register address | source x register address | immediate value (address for jmp, load, and store) |
|---|---|---|---|---|---|
| 7 bits | 3 bits | 3 bits | 3 bits | 16 bits | |
| NOP | 0000000 | 000 | 000 | 000 | 0000000000000000 |
| load R3, hff | 1010100 | 011 | 000 | 000 | 0000000011111111 |
| store hAAAA,R5 | 1001100 | 000 | 101 | 000 | 1010101010101010 |
| and R1, R0, R7 | 0101000 | 001 | 000 | 111 | 0000000000000000 |
| or R1, R0, R7 | 0011000 | 001 | 000 | 111 | 0000000000000000 |
| xor R1, R0, R7 | 1011000 | 001 | 000 | 111 | 0000000000000000 |
| add R1, R0, R7 | 1100001 | 001 | 000 | 111 | 0000000000000000 |
| mov R1, R0 | 1000000 | 001 | 000 | 000 | 0000000000000000 |
| not R1, R0 | 0111111 | 001 | 000 | 000 | 0000000000000000 |
| jmp hAA | 1111110 | 000 | 000 | 000 | 0000000010101010 |
| Halt | 1111111 | 000 | 000 | 000 | 0000000000000000 |
When you upload the files there are two filenames to enter, your local filename (which can be anything) and the upload filename, which for the module files must end in .v and for the list of files must be simplecpu.ver. Also, for the testbench in the autograder you need to save and upload the floatbus module. The floatbus module is in click here to get floatbus module and be sure to add the file to your simplecpu.ver list of files.
Feel free to email comments and suggestions to
acken@okstate.edu
Today is
And the time is ?
![]()
![]()
![]()
![]()