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_topmodule 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.
| Component | Role in SoC |
|---|---|
rv32i_core_bus | Executes the RISC-V instruction set and manages bus transactions. |
multi_slave_interconnect | Routes CPU requests to the correct peripheral based on address. |
periph_subsystem | Contains GPIO, UART, and Timer IP blocks with shared interrupt logic. |
sysctrl_block | Manages boot address and system-wide reset/soft-reset signals. |
Practice
- Open RtlStudio and select this chapter (5.4) from the Examples or Lecture list.
- Confirm that
student/rtl/ip/riscv/rv32_soc_top.svandstudent/tb/tb_top.svappear in the Explore tree. - Open
student/rtl/ip/riscv/rv32_soc_top.svin the editor. - Locate the
axi_ifinstance declarations forcpu_bus,s_gpio,s_timer,s_uart, ands_irq. - Replace the
__TODO__[0]placeholder in theADDR_WIDTHparameter with32for all five AXI interfaces. - Save the file and open
student/tb/tb_top.sv. - Ensure the testbench correctly instantiates the
dutmodule and loads the firmware program fromtb/programs/05_04_rv32_soc_capstone.hex. - 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
- Open the system lesson in the IDE. The RV32I core and the mini-SoC fabric simulate together.
- Run Verilator and trace the program through MMIO: address, load/store data, and the peripheral response.
- Interrupts and DMA belong on the waveform next to the instruction stream, not only in a pass/fail line.
- 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.