What you practice
Program integration lab (2.6). Integrate RISC-V core with GPIO, timer, and UART peripherals by configuring AXI address widths and verifying program execution via simulation. It is in Program integration lab — Part 2 · Peripheral Programs 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 lesson integrates the RISC-V core with GPIO, timer, and UART peripherals into a single SystemVerilog design. You will wire the interconnect and verify that a program can control outputs and communicate via UART. This simulates a real-world SoC boot and self-test sequence.
Learning objectives
- Instantiate the
periph_subsystemand connect it to the RISC-V core via AXI interfaces. - Configure the address width for the AXI interconnect to match the platform requirements.
- Run the integration testbench to verify GPIO and UART signal behavior.
- Interpret simulation logs to confirm successful program execution and peripheral response.
Theory
The System on Chip (SoC) architecture relies on a central bus to connect the processor with memory-mapped peripherals. In this lesson, the multi_slave_interconnect routes transactions from the RISC-V core to specific IP blocks. The axi_if interface standardizes the communication protocol between the CPU and peripherals like GPIO and UART. Correctly setting the address width ensures that memory addresses map to the correct peripheral registers. The testbench loads a program that exercises these peripherals to ensure they respond as expected.
Practice
Open this chapter in RtlStudio to load the workspace automatically. Navigate to Explore and open student/rtl/design.sv. Locate the axi_if instance declarations for cpu_bus, s_gpio, s_timer, and s_uart. Update the ADDR_WIDTH parameter to 32 for all four interface instances. Save the file after updating all four interface instances. Open student/tb/tb_top.sv in the Explore panel. Run the simulation by clicking Simulation in the left sidebar and selecting Run. Monitor the Log panel for progress messages and final status.
Summary
You integrated GPIO, timer, and UART peripherals into a single RISC-V program that self-checks its operation. You verified that the software correctly configures hardware and validates results through the testbench. This capstone exercise demonstrated how software drives complex hardware interactions in a real SoC environment.
© 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 Program integration lab. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.