What you practice
Multi-periph sequence (2.5). Complete the testbench port connections and program load for a multi-peripheral RISC-V sequence to verify GPIO, UART, and timer interactions. It is in Multi-peripheral sequence — 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
You will drive GPIO, the timer, and the UART from a single program image. This lesson demonstrates how a RISC-V core coordinates multiple peripheral subsystems in a real SoC environment. You will complete the testbench to verify this multi-peripheral interaction.
Learning objectives
- Complete the port connections in
student/tb/tb_top.svto link the DUT to testbench signals. - Load the correct program memory image for the multi-peripheral sequence.
- Verify GPIO output, UART transmission, and core halt status via simulation logs.
- Understand how the
periph_subsystemintegrates multiple IP blocks.
Theory
This lesson focuses on the integration of multiple peripherals within a System-on-Chip (SoC). The periph_subsystem module acts as a bridge between the CPU bus and individual peripheral interfaces. The testbench drives the CPU with a program that configures GPIO outputs, sends data over UART, and interacts with the timer. The core halts upon completing the sequence, allowing the testbench to verify the final state of all peripherals. This mirrors real-world embedded software that manages hardware resources sequentially.
Practice
- Open RtlStudio and select this chapter in the Examples or Lecture list.
- Navigate to Explore and open
student/tb/tb_top.sv. - Locate the
dut_iinstance and replace the__TODO__placeholders with the correct signal names forgpio_in,gpio_out, andgpio_oe. - Replace the
__TODO__string in the$readmemhcall with the correct program file path:tb/programs/02_05_multi_periph_sequence.hex. - Open Simulation from the sidebar and run the simulation.
- Check the Log panel for
INFO:messages and the finalINFO: PASSstatus.
Summary
You practiced integrating GPIO, timer, and UART peripherals within a single program image to execute a coordinated sequence. By completing the testbench port connections and memory loading, you verified that the core correctly halts after exercising all three IP blocks. This exercise demonstrated how a single embedded application can manage multiple hardware resources sequentially through the AXI bus.
© 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 Multi-periph sequence. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.