What you practice
System e2e TB (5.3). Drive the rv32_soc_top platform from a SystemVerilog testbench to verify end-to-end system behavior by instantiating the design and connecting all interface signals. It is in End-to-end system TB — 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
You will drive the rv32_soc_top platform from a SystemVerilog testbench to verify end-to-end system behavior. This lesson focuses on instantiating the design and connecting all interface signals correctly. You will also load a program image and verify GPIO and UART outputs. This is a critical step in validating the complete SoC platform.
Learning objectives
- Instantiate
dutinstudent/tb/tb_top.svwith correct port connections. - Load the program image from the hex file into the CPU memory.
- Verify
cpu_done,gpio_out, anduart_seensignals after simulation. - Understand the relationship between the testbench and the SoC platform.
Theory
The testbench acts as the environment that drives the Design Under Test (DUT). In this lesson, the DUT is a wrapper (dut) around the rv32_soc_top. The testbench must connect all control and data signals between the testbench and the DUT. The program image is loaded into the instruction memory of the CPU core. The testbench then waits for the CPU to finish execution and checks the output registers. This process validates that the entire system works together correctly.
| Signal | Direction | Description |
|---|---|---|
clk | Input | Clock signal for the system. |
por_n | Input | Power-on reset signal. |
gpio_in | Input | GPIO input pins. |
gpio_out | Output | GPIO output pins. |
gpio_oe | Output | GPIO output enable pins. |
uart_tx_valid | Output | UART transmit valid signal. |
uart_tx_data | Output | UART transmit data. |
uart_tx_busy | Input | UART transmit busy signal. |
cpu_done | Output | CPU execution done signal. |
Practice
- Open RtlStudio and select Lesson 5.3: System e2e TB from the Examples or Lecture list.
- Confirm that
student/tb/tb_top.svandstudent/rtl/design.svappear in the Explore tree. - Open
student/tb/tb_top.svin the editor. - Complete the tasks in Your TODO below.
- Click Simulation in the left sidebar and run the simulation.
- Check the Log panel for
INFO:lines. - Verify that the log contains
INFO: PASS. - If the simulation fails, check your port connections and the hex file path.
Summary
You successfully instantiated the RV32I core and system IP blocks within the design module to create a complete SoC platform. By completing the port connections and loading the program memory, you enabled the testbench to drive the chip top from a light UVM system environment. The simulation verified correct end-to-end execution by checking the CPU completion flag and peripheral outputs.
© 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 System e2e TB. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.