What you practice
Ultimate rv32i_core capstone (5.4). Integrate the RV32I core with memory and verify end-to-end execution of a sum loop and ECALL. It is in Ultimate rv32i_core — Part 5 · Core Capstone of the RISC-V RV32I Core Masterclass.
The RV32I core is Verilog you simulate in the browser IDE. Verilator runs the program; the waveform shows PC, the instruction, and the register write.
What you will learn
You will integrate the complete RV32I core subsystem and verify its end-to-end execution. This lesson demonstrates how to connect instruction memory, data memory, and the core to execute a loop and handle an ECALL instruction. Understanding this integration is critical for building functional processor subsystems in real-world SoC designs.
Learning objectives
- Connect the
rv32i_coreto instruction and data memory interfaces. - Verify the core executes a sum loop and halts correctly on ECALL.
- Inspect debug signals like
debug_pcanddebug_x10to confirm execution state. - Validate the complete testbench flow from stimulus to pass/fail reporting.
Theory
The RV32I core is a pipelined processor that fetches, decodes, and executes instructions. The core interacts with memory through address and data buses. The instruction memory provides the current instruction to the decoder. The data memory handles loads and stores via the load-store unit. The core asserts a halted signal when it executes an ECALL instruction. Debug signals provide visibility into the program counter and specific registers. This architecture allows the testbench to verify functional correctness without internal pipeline details.
| Component | Role | Key Signals |
|---|---|---|
rv32i_core | Central processing unit | pc, imem_addr, dmem_addr, halted |
rv32i_imem | Instruction storage | addr, rdata |
rv32i_dmem | Data storage | addr, wdata, we, rdata |
tb_top | Test environment | Stimulus, checking, VCD dump |
Practice
- Open this chapter in RtlStudio and confirm the file tree in Explore.
- Open
student/rtl/ip/riscv/rv32i_core.svand locate the__TODO__placeholders. - Replace
__TODO__[0]in theimem_addrassignment withpc. - Replace
__TODO__[0]in thepc_plus4assignment withpc + 32'd4. - Replace
__TODO__[0]in thedebug_pcassignment withpc. - Replace
__TODO__[0]in theinstassignment withimem_rdata. - Open
student/tb/tb_top.svand verify the stimulus loads the sum loop program. - Run Simulation from the sidebar and check the Log panel for results.
Summary
You completed the RV32I core capstone by wiring the internal datapath signals to their correct ports. The student verified the core executes a sum loop and halts correctly on the ECALL instruction. This exercise demonstrated how proper signal connectivity enables a functional RISC-V processor.
© 2026 RtlStudio. Licensed under CC BY-NC-ND 4.0. Commercial use and modifications by third parties are not permitted.
Run it in the Verilog IDE
- Open the RV32I lesson in the IDE. Fetch, decode, and execute are source you can simulate.
- Run Verilator and watch PC, the instruction, and the register write on the waveform.
- Treat a program printout as done only after the ISA step this lesson names matches the wave.
- Change the RTL in the editor, rerun Verilator, and read the waveform again in the same tab.
The lesson is done when the simulation matches Ultimate rv32i_core capstone. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.