RISC-V
“RISC architecture is going to change everything.” — Acid Burn
To build a 32-bit RISC-V (RV32I) core from scratch in VHDL, I'm taking a strict bottom-up approach. I start at the gate level, building and verifying basic arithmetic and logic primitives, before moving on to functional units like the ALU and register file. Then finally wiring everything together into a 5-stage pipeline.
Every released module is published as a complete, reproducible design package. Clicking into each component gives you full schematics, GHDL simulations backed by verification test vectors, synthesis-ready project files tested on both Xilinx (Vivado) and Intel/Altera (Quartus Prime) FPGAs, and more.
This is our world now. The world of the electron and the switch...
1. Digital Logic
These are the "atoms", the building blocks of the design. I build these first because every other component relies on them.
- Gates - The primitive logic: AND, OR, NOT, NAND, NOR, XOR, XNOR Download ↓ Details →
- Full Adder - The basic building block of all arithmetic Prerelease →
- N-bit Adder - Constructed from multiple full_adders Prerelease →
- Funnel Shifter - Essential for the "S" and "I" type instructions Prerelease →
2. RISC-V Core Components
These are the primary functional units that decode instructions, manage state, and execute core RV32I operations
- Arithmetic Logic Unit (alu) - Uses the `N-bit Adder` and `Funnel Shifter` to perform operations Q4 2026
- Register File - The storage for the registers; logic to read/write Q4 2026
- Immediate Generator - Extracts and signs the "immediates" from the instruction Q4 2026
- Instruction Decoder - Translates the machine code into control signals Q4 2026
3. Memory & Alignment
These components handle the transition between the processor's internal logic and the memory system.
- Load Aligner - Handles the alignment of data coming from memory Q1 2027
- Write Aligner - Ensures data is correctly aligned before being written back Q1 2027
- Cache - The first level of memory management Q1 2027
4. Control Logic
Now I connect the pieces to create a "brain" that can handle branching and flow.
- Program Counter - The heartbeat; moves the execution to the next instruction Q2 2027
- Branch Resolution - Determines if the PC should jump based on ALU results Q2 2027
5. System Integration
Finally, I take all the pieces above and "pipe" them together.
- Hazard Detection - The logic that detects data/structural hazards Q2 2027
- Pipeline - The final "wrapping" that connects everything into the 5-stage flow Q2 2027