
This project is a minimal SAP-1 style CPU with an 8-bit data path and a 4-bit address space (16 bytes). The micro-architecture includes:
Z, C).Z (zero) and C (carry).CO, MI, RO, IO, II, AI, AO, BI, EO, SU, FI, OI, JP, CE, HT).Program: the built-in demo computes successive Fibonacci numbers by alternating loads/adds/stores and outputs via the OUT instruction (mirrored to the 7-segment via bin_to_bcd → seven_seg).
Display: the 8-bit OUT value is converted to BCD (0–255) and scanned across three digits. Segment lines are active-high; digit enables are active-low.
Clocks: a counter divides the external clk to make (1) a CPU clock (slow enough to watch values change) and (2) a faster scan clock. uo[7] exposes a divided-down heartbeat so you can verify liveness on a scope/LED.
The project was influenced by:
Wire the outputs like this:
Let the project run and you should see the fibonacci numbers being counted up to 233.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | RESET (manual, active-high) | SEG_G | DIG0_EN_N |
| 1 | SEG_F | DIG1_EN_N | |
| 2 | SEG_E | DIG2_EN_N | |
| 3 | SEG_D | DIG3_EN_N (unused/off by default) | |
| 4 | SEG_C | ||
| 5 | SEG_B | ||
| 6 | SEG_A | ||
| 7 | HEARTBEAT |