
This is an 8-bit MIPS-inspired single-cycle processor designed for Tiny Tapeout. It preserves the core architectural concepts of a full 32-bit MIPS processor, scaled down to fit in a single tile:
| Opcode | Name | Format | Operation |
|---|---|---|---|
| 0000 | R-type | R | ADD, SUB, AND, OR, SLT (based on funct field) |
| 0001 | ADDI | I | R[rt] ← R[rs] + sign_ext(imm) |
| 0010 | ANDI | I | R[rt] ← R[rs] & zero_ext(imm) |
| 0011 | ORI | I | R[rt] ← R[rs] | zero_ext(imm) |
| 0100 | BEQ | I | if R[rs]==R[rt]: PC ← PC+1+imm |
| 0101 | BNE | I | if R[rs]!=R[rt]: PC ← PC+1+imm |
| 0110 | J | J | PC ← addr |
| 0111 | LUI | I | R[rt] ← imm << 2 |
| 1111 | HALT | - | Stop execution |
The hardcoded ROM contains a Fibonacci + ALU test program that:
ui_in[2:0] to select which register (R0-R7) to observe on uo_out[7:0]uio_out[4:0] for the current Program Counter valueuio_out[5] for the halt flag (goes high when HALT is reached)| Register | Value | Description |
|---|---|---|
| R0 | 0x00 | Hardwired zero |
| R1 | 0x03 | Fibonacci intermediate |
| R2 | 0x05 | Fibonacci result |
| R3 | 0x05 | Fibonacci result |
| R4 | 0x15 | ADDI result (21) |
| R5 | 0x0F | ORI result (15) |
| R6 | 0xFE | SUB result (-2 signed) |
| R7 | 0x01 | SLT result (3 < 5 = true) |
No external hardware required. Connect LEDs to outputs for visual observation:
uo_out to display the selected register valueuio_out[4:0] to show PCuio_out[5] for halt indicatorui_in[2:0] for register selection| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | reg_sel[0] | reg_data[0] | pc[0] |
| 1 | reg_sel[1] | reg_data[1] | pc[1] |
| 2 | reg_sel[2] | reg_data[2] | pc[2] |
| 3 | reg_data[3] | pc[3] | |
| 4 | reg_data[4] | pc[4] | |
| 5 | reg_data[5] | halt | |
| 6 | reg_data[6] | alu_zero | |
| 7 | reg_data[7] |