
Basic8 is a minimal 8-bit CPU with the following features:
Instructions are 16-bit and loaded in two cycles via ui_in:
The program counter (PC) is output on uo_out, allowing an external controller to feed instructions from a ROM.
Connect a ROM (instruction memory) externally. On each instruction:
See test/test.py for a cocotb testbench with full instruction set coverage.
None required. The CPU is driven entirely through the ui_in and uio_in pins.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | instruction byte (high or low) | PC bit 0 | load_hi - latch high byte of instruction |
| 1 | instruction byte (high or low) | PC bit 1 | exec - execute instruction |
| 2 | instruction byte (high or low) | PC bit 2 | |
| 3 | instruction byte (high or low) | PC bit 3 | |
| 4 | instruction byte (high or low) | PC bit 4 | |
| 5 | instruction byte (high or low) | PC bit 5 | |
| 6 | instruction byte (high or low) | PC bit 6 | |
| 7 | instruction byte (high or low) | PC bit 7 |