RTL Studio Open IDE

0.2 · RV SYS CLASS

Stub to core swap

Swap the fixed cpu_stub master for rv32i_core_bus and prove it runs.

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

What you practice

Stub to core swap (0.2). Swap the fixed cpu_stub master for rv32i_core_bus and prove it runs. It is in Replace stub with rv32i_core — Part 0 · Platform Recap of the RISC-V on SoC & System Masterclass.

The core and the mini-SoC simulate as one workspace in the IDE. Follow MMIO, interrupts, and the program on the Verilator waveform, not only a pass line.

What you will learn

You will replace the placeholder stub with the real rv32i_core_bus and verify the core runs code.

Learning objectives

  • Instantiate rv32i_core_bus with correct address width.
  • Connect the clock and reset to the AXI interface.
  • Verify the core halts on ECALL with the expected register value.

Theory

The rv32i_core_bus module implements the RV32I core with an AXI4-Lite bus interface. It requires a clock, reset, interrupt request, and the AXI bus interface itself. The axi_if interface must be sized to match the core's address width. Connecting the clock and reset correctly ensures the core starts executing instructions.

Practice

Open student/rtl/design.sv in RtlStudio. Replace __TODO__[0] with 32 to set the address width. Replace __TODO__ with clk to connect the clock to cpu_bus.aclk. Open student/tb/tb_top.sv in RtlStudio. Run Simulation from the sidebar. Check the Log panel for the INFO lines.

Summary

You successfully replaced the CPU stub with the rv32i_core_bus to enable actual instruction execution. By correctly instantiating the core and connecting its AXI interface to the system clock and reset, you verified the hardware integration. The simulation confirmed the core's functionality by reaching a halted state with the expected register values.

© 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 system lesson in the IDE. The RV32I core and the mini-SoC fabric simulate together.
  2. Run Verilator and trace the program through MMIO: address, load/store data, and the peripheral response.
  3. Interrupts and DMA belong on the waveform next to the instruction stream, not only in a pass/fail line.
  4. Edit the integration RTL, resimulate, and run Yosys on the structural block when you want a netlist.

The lesson is done when the simulation matches Stub to core swap. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.