
miniCPU is a minimal 8-bit accumulator-based processor designed for Tiny Tapeout ASIC fabrication. It implements a compact custom ISA and executes a small program that generates a visually observable LED pattern (Knight Rider-style scanner).
The design emphasizes:
A)B)uo_out)Instruction Format:
Core Instructions:
ALU Sub-operations (opcode 011):
next_aThe included ROM program implements a bidirectional LED scanning pattern:
This creates a Knight Rider-style sweeping LED effect on uo_out[7:0].
ui_in: Input port (read via IN instruction)uo_out: Output LED pattern (from OUT instruction)uio_*: Disabled (not used)clk (e.g., 100 kHz or slower for visibility).rst_n = 0) for at least 10 clock cycles.rst_n = 1).uo_out[7:0].The output should show a shifting LED pattern:
Example sequence on uo_out:
00000001
00000010
00000100
...
01000000
10000000
01000000
...
ui_in[0] is read by the CPU using the IN instruction. You can toggle it to verify input responsiveness (if enabled in program flow).Run the provided testbench:
make test
This verifies correct reset behavior, output sequence, and looping execution.
No external hardware is required for this project.
The design is fully self-contained and operates entirely using the Tiny Tapeout standard I/O:
uo_out[7:0]: Drives external LEDs (recommended for visualization)ui_in[7:0]: Optional digital input switches (not required for basic operation)uio_*: Not used (bidirectional pins disabled)Recommended optional setup: To observe behavior more clearly during bring-up, connect 8× LEDs to uo_out[7:0]. No PMODs, displays, or additional complex components are required.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | IN0 | LED0 | |
| 1 | IN1 | LED1 | |
| 2 | IN2 | LED2 | |
| 3 | IN3 | LED3 | |
| 4 | IN4 | LED4 | |
| 5 | IN5 | LED5 | |
| 6 | IN6 | LED6 | |
| 7 | IN7 | LED7 |