~/projects/ooo-cpu
← all projectsOoO RISC-V CPU
A 2-wide superscalar, out-of-order RISC-V core in SystemVerilog, built in the style of the MIPS R10K. EECS 472 team project with Niki Lin, Shaoqian Zhou, and Sophia Chen.
The problem
In a simple in-order pipeline, one slow load (like a cache miss) stalls every instruction behind it, even ones that don't depend on it. An out-of-order core runs ready instructions early and commits them in program order, so the program still behaves correctly.
mul and sub stall
behind it. Out of order, they run during the miss and the program finishes 2 cycles sooner.
Architecture
The core is split into a front end that fetches and decodes, a middle that renames registers and tracks instructions, and a back end that executes them and commits results in order.
Key features
- Register renaming with a map table and free list, R10K-style
- Reorder buffer (ROB) for in-order commit and precise exceptions
- Reservation stations that issue instructions as soon as their operands are ready
- Branch prediction with a BTB, and recovery on a mispredict
- Load/store queue for memory ordering
My role
I designed and verified the reorder buffer and the rename logic, and helped integrate the middle of the core with the front and back ends.
Process
We agreed on interfaces first, then built each module in small, tested pieces and integrated them one feature at a time. The goal was a working core by Oct 29 and the full CPU by Nov 20.