RTL Studio Open IDE

5.4 · RV SYS CLASS

Ultimate rv32_soc

Capstone lesson integrating RV32I core with GPIO, UART, and timer interrupts in the rv32_soc_top platform.

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

What you practice

Ultimate rv32_soc (5.4). Capstone lesson integrating RV32I core with GPIO, UART, and timer interrupts in the rv32_soc_top platform. It is in Ultimate rv32_soc — Part 5 · System Capstone 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

This capstone lesson integrates the RV32I core with system peripherals to demonstrate a complete SoC workflow. You will connect the timer interrupt and GPIO/UART interfaces to verify a running firmware program. This exercise reinforces how software interacts with hardware registers in a real-world embedded context.

Learning objectives

  • Instantiate the rv32_soc_top module within the design wrapper.
  • Connect the AXI bus interfaces between the CPU and peripheral subsystems.
  • Verify the system by running a firmware program that exercises GPIO and UART.
  • Interpret simulation logs to confirm correct CPU execution and peripheral output.

Theory

The rv32_soc_top module acts as the central platform for the RISC-V system. It contains a reset sequencer, an interconnect, and a peripheral subsystem with GPIO, UART, and timer blocks. The CPU communicates with these peripherals via AXI-Lite bus interfaces. The testbench loads a compiled firmware program into the CPU's instruction memory. The firmware configures the GPIO and UART, then triggers a timer interrupt to demonstrate interrupt handling. The simulation verifies that the CPU executes the program correctly and produces the expected output signals.

ComponentRole in SoC
rv32i_core_busExecutes the RISC-V instruction set and manages bus transactions.
multi_slave_interconnectRoutes CPU requests to the correct peripheral based on address.
periph_subsystemContains GPIO, UART, and Timer IP blocks with shared interrupt logic.
sysctrl_blockManages boot address and system-wide reset/soft-reset signals.

Practice

  1. Open RtlStudio and select this chapter (5.4) from the Examples or Lecture list.
  2. Confirm that student/rtl/ip/riscv/rv32_soc_top.sv and student/tb/tb_top.sv appear in the Explore tree.
  3. Open student/rtl/ip/riscv/rv32_soc_top.sv in the editor.
  4. Locate the axi_if instance declarations for cpu_bus, s_gpio, s_timer, s_uart, and s_irq.
  5. Replace the __TODO__[0] placeholder in the ADDR_WIDTH parameter with 32 for all five AXI interfaces.
  6. Save the file and open student/tb/tb_top.sv.
  7. Ensure the testbench correctly instantiates the dut module and loads the firmware program from tb/programs/05_04_rv32_soc_capstone.hex.
  8. Navigate to the Simulation panel in the sidebar and click Run.

Summary

You successfully integrated the complete RISC-V SoC platform by instantiating rv32_soc_top with correct AXI interface widths and connecting the CPU core ports. The capstone exercise demonstrated how timer interrupts drive execution flow while GPIO and UART peripherals provide external I/O visibility. Verifying the simulation output confirmed that the system correctly processes interrupts and handles peripheral traffic before halting.

© 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 Ultimate rv32_soc. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.