RTL Studio Open IDE

0.2 · UVM CLASS

Time master: UVM phase schedule

Implement build, connect, run, and report phases in a test class and observe execution order.

Watch on YouTube

What you practice

Time master: UVM phase schedule (0.2). Implement build, connect, run, and report phases in a test class and observe execution order. It is in Hello UVM — Part 0 · UVM Warming Up of the UVM Masterclass. How SystemVerilog classes evolve into the UVM verification framework.

The UVM bench compiles in that same browser SystemVerilog simulator. You edit the test in the IDE, run Verilator, and read the log beside the waveform.

What you will learn

You will learn how UVM splits simulation into distinct phases—build, connect, run, and report—and how each phase executes in a predictable order, independent of the hardware clock.

Learning objectives

  • Understand the UVM phase schedule and its standard phases.
  • Implement stubs for build_phase, connect_phase, run_phase, and report_phase.
  • Use uvm_info to log phase execution and $display to signal test completion.

Theory

UVM runs simulation in a fixed sequence of phases: build, connect, run, and report. Each phase serves a specific purpose: build instantiates components, connect wires them, run executes stimulus, and report aggregates results. Phases are methods on uvm_component-derived classes like uvm_test. The run_phase is a task (time-consuming), while others are functions (instantaneous). All phases (except run_phase) must call super.phase_name(phase) to ensure proper UVM infrastructure execution.

PhaseTypePurpose
build_phasefunctionInstantiate components
connect_phasefunctionConnect ports and exports
run_phasetaskExecute stimulus and verification
report_phasefunctionPrint summary and final results

Practice

Open this chapter in RtlStudio; files appear in Explore. Edit only files under student/—golden/ is the verified reference.

  1. Open student/tb/tb_top.sv.
  2. Fill the __TODO__; blanks on L18–L19 inside build_phase (super.build_phase(phase); then the uvm_info BUILD banner).
  3. Fill the __TODO__; blanks on L28–L29 inside run_phase (super.run_phase(phase); then uvm_phase_raise_objection(...)); the remaining run-phase body is already present.
  4. Run Simulation and check the Log panel for phase execution order and final INFO: PASS.

Summary

You practiced implementing the standard UVM phase schedule by extending uvm_test and overriding build_phase, connect_phase, run_phase, and report_phase. Each phase called super.phase() and logged its name using uvm_info, reinforcing the separation between simulation time and hardware clock. You confirmed correct execution by printing INFO: PASS in run_phase, validating the phase flow and timing semantics. The key takeaway is that UVM phases provide a structured, deterministic simulation timeline independent of the DUT’s clock domain.

Run it in the Verilog IDE

  1. Open the UVM workspace in the IDE. The DUT and the testbench compile together in the browser.
  2. Run the SystemVerilog simulation with Verilator and read the phase and scoreboard lines in the log.
  3. When the check is on pins rather than a print, open the VCD next to that log.
  4. Edit the sequence, driver, or scoreboard in the IDE and rerun. You stay in the same simulator.

The lesson is done when the simulation matches Time master: UVM phase schedule. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.