RTL Studio Open IDE

5.4 · RISC-V CLASS

Ultimate rv32i_core capstone

Integrate the RV32I core with memory and verify end-to-end execution of a sum loop and ECALL.

Video coming soon. This lesson page stays at the same URL when the lecture publishes.

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_core to instruction and data memory interfaces.
  • Verify the core executes a sum loop and halts correctly on ECALL.
  • Inspect debug signals like debug_pc and debug_x10 to 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.

ComponentRoleKey Signals
rv32i_coreCentral processing unitpc, imem_addr, dmem_addr, halted
rv32i_imemInstruction storageaddr, rdata
rv32i_dmemData storageaddr, wdata, we, rdata
tb_topTest environmentStimulus, checking, VCD dump

Practice

  1. Open this chapter in RtlStudio and confirm the file tree in Explore.
  2. Open student/rtl/ip/riscv/rv32i_core.sv and locate the __TODO__ placeholders.
  3. Replace __TODO__[0] in the imem_addr assignment with pc.
  4. Replace __TODO__[0] in the pc_plus4 assignment with pc + 32'd4.
  5. Replace __TODO__[0] in the debug_pc assignment with pc.
  6. Replace __TODO__[0] in the inst assignment with imem_rdata.
  7. Open student/tb/tb_top.sv and verify the stimulus loads the sum loop program.
  8. 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

  1. Open the RV32I lesson in the IDE. Fetch, decode, and execute are source you can simulate.
  2. Run Verilator and watch PC, the instruction, and the register write on the waveform.
  3. Treat a program printout as done only after the ISA step this lesson names matches the wave.
  4. 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.