Sep 2026 – Present
RISC-V SoC with AXI4-Lite Bus
The next step after the pipelined core: a hand-written RV32I SoC where every fetch, load, and store goes over AXI4-Lite, progressing from simulation to an Artix-7 FPGA and a Tiny Tapeout ASIC.
Extends the 5-stage pipelined processor. The goal is a full SoC with caches, CSRs, and FreeRTOS, first on an Artix-7, then taped out through Tiny Tapeout on SkyWater 130 nm.
What I learned
- Passing tests is not the same as correct. The ISA suite stayed at 38/38 while every load and store hit the bus twice. Only a bus scoreboard with injected latency exposed it.
- Keep the core memory-agnostic. The core exposes only a fetch port and a data port. Swapping BRAM for AXI, and later for caches, changes
soc_topand nothing inside the CPU. - A stall must freeze everything. If flush is not masked during a bus stall, a taken branch in EX is lost while a slow fetch completes.
- Handshakes need explicit states. AW and W are independent channels, so the master needs a state for each order in which they can finish.
Milestones
Oct 19 · ISA regression, two cores at 38/38
A Verilator C++ harness and a Python runner execute the official riscv-tests. A test passes only on ecall with a0 == 0. a0 starts as 0xDEADBEEF, so a run that stops early cannot pass, and a PC frozen for 1000 cycles is reported as a hang. The single-cycle core passed first, then the 5-stage pipeline with forwarding and load-use stalls.
Oct 24 · AXI4-Lite data master
A 5-state FSM turns the core’s one-cycle memory requests into valid/ready handshakes on all five channels. AW and W can complete in either order, and WSTRB comes from the core’s byte enables. A separate read-only master handles instruction fetch.
First write and read-back against a cocotb RAM, plotted from the simulation dump:
Oct 25 · AXI4-Lite RAM slave
Three states. It takes AW and W together, gives writes priority over reads, and writes only the byte lanes set in WSTRB. Verified against cocotbext-axi bus models.
Oct 31 · Whole SoC over AXI4-Lite
The core holds no memory. soc_top adds the two masters and two RAMs (diagram at the top), and a busy bus freezes all five stages while masking flush. Every fetch, load, and store now goes over the bus, still 38/38.
A latency-injecting RAM and a bus scoreboard then found a bug the ISA tests missed. With a slow fetch, each load or store hit the bus twice, which would print every UART character twice. A one-shot request gate fixed it.
Next
UART and bare-metal C over MMIO, then M-mode CSRs with a CLINT timer for FreeRTOS, 2-way caches with AXI4 bursts, FPGA bring-up, and OpenLane sign-off.