What you practice
Mini-UVM: Full Integration (Capstone) (3.11). Wire the virtual interface and mailbox inside the environment class to complete a Mini-UVM skeleton. It is in Mini-UVM — Part 3 · Advanced SV & Mini-UVM of the SystemVerilog Masterclass. Timing, concurrency, constrained-random verification, assertions, and a pure-SV Mini-UVM environment.
The same IDE is the SystemVerilog simulator. Slang lints the file, Verilator runs it, and the waveform viewer sits next to the source.
What you will learn
You will build a complete Mini-UVM verification environment from scratch, connecting the Generator, Driver, and Mailbox inside the Environment class using virtual interfaces.
Learning objectives
- Understand how to wire a virtual interface to a Driver class in SystemVerilog.
- Implement mailbox communication between Generator and Driver.
- Construct an Environment class that ties together all UVM-lite components.
- Verify end-to-end stimulus flow through the testbench.
Theory
Mini-UVM is a stripped-down UVM-style framework built entirely from scratch using SystemVerilog classes.
| Component | Role | Key Connection |
|---|---|---|
Generator | Generates random stimulus data | gen_data() → get_data() |
Mailbox | Thread-safe FIFO for data transfer | put() / get() |
Driver | Drives data onto DUT via virtual interface | vif.data_in <= data |
Environment | Wires all components together | Constructor injects vif & mbx |
The virtual interface (mem_if) provides a typed connection between the testbench and DUT. The Driver receives both vif and mbx via its constructor, enabling it to fetch data from the mailbox and drive it onto the interface.
Practice
Open this chapter in RtlStudio; all files appear in Explore. Edit only student/ files — golden/ is the reference.
- Open
student/tb/tb.svin the editor. - Complete the
Driverconstructor to store the virtual interface. - Complete the
Driver::run()task to fetch data from the mailbox. - Complete the
Environmentconstructor to store the virtual interface and instantiate the Driver. - Complete the
Environment::run()task to push generated data into the mailbox. - Run Simulation and verify the Log panel shows expected output.
- Open the Waveform tab to inspect signal transitions aligned with stimulus.
Summary
Students built a complete Mini-UVM environment from scratch, wiring the Generator, Driver, and Mailbox inside the Environment’s run phase. They practiced integrating advanced SystemVerilog constructs—including virtual interfaces and mailbox communication—to create a functional verification framework. The key takeaway is that a modular, object-oriented approach enables scalable and reusable testbenches without relying on full UVM libraries.
Run it in the Verilog IDE
- Open the lesson in the IDE. The SystemVerilog for this topic is already in the editor.
- Lint with Slang before you simulate. It covers both Verilog and SystemVerilog in this IDE.
- Run Verilator and inspect the VCD. Interfaces, classes, and assertions count only if the simulator agrees.
- Run Yosys when the lesson is synthesizable RTL, and keep testbench-only constructs out of that module.
The lesson is done when the simulation matches Mini-UVM: Full Integration (Capstone). Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.