Pipelined RISC-V CPU
A 6-stage RV32IM processor in SystemVerilog with AXI4-Lite instruction and data memory, running on a ULX3S (Lattice ECP5) FPGA board.
83 / 83ISA and benchmark tests pass
1.49CPI on Dhrystone
30.7 MHzFmax on the ECP5
~9.4klogic cells, 4 DSP multipliers
The pipeline
- Bypasses: MX and WX forward results into Execute, and WD forwards into Decode, so only a load followed by its use stalls.
- Memory: instruction fetch takes two stages (F requests, G waits). Loads and stores are requested in X and answered in M. During stalls the fetch handshake holds so no instruction is lost or fetched twice.
- Divides: a pipelined divider with a scoreboard, so only instructions that depend on a pending divide wait.