RTL Studio Open IDE

3.1 · UVM CLASS

UVM agent: active vs passive is_active

Build a reusable agent with is_active to switch between active and passive (monitor-only) modes.

Watch on YouTube

What you practice

UVM agent: active vs passive is_active (3.1). Build a reusable agent with is_active to switch between active and passive (monitor-only) modes. It is in UVM agent — Part 3 · Env and Coverage of the UVM Masterclass. Assemble the verification environment, compare data, and hunt coverage.

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

Today you will learn how to build a reusable UVM agent that adapts its components based on the is_active configuration, enabling both active (driver + sequencer) and passive (monitor-only) agents in verification environments.

Learning objectives

  • Understand the difference between active and passive UVM agents.
  • Use get_is_active() to conditionally build driver and sequencer in build_phase.
  • Connect components in connect_phase only when active.

Theory

An active UVM agent contains a sequencer, driver, and monitor, and can drive stimuli to the DUT. A passive agent contains only a monitor and observes transactions without driving the DUT. The is_active field (UVM_ACTIVE or UVM_PASSIVE) controls which components are built.

Agent TypeSequencerDriverMonitorDrives DUT?
ActiveYesYesYesYes
PassiveNoNoYesNo

The build_phase method typically uses if (get_is_active() == UVM_ACTIVE) to conditionally instantiate driver and sequencer. The monitor is always instantiated. In connect_phase, sequencer–driver connection (driver.seq_item_port.connect(sequencer.seq_item_export)) is done only when active.

Practice

  1. Open this chapter in RtlStudio.

Confirm files appear in Explore — no manual setup needed.

  1. Open student/tb/tb_top.sv and golden/tb/env/fifo_agent.sv (if not visible, check golden/tb/env/).
  2. In golden/tb/env/fifo_agent.sv, observe how build_phase uses get_is_active() to conditionally create driver and sequencer.
  3. In student/tb/tb_top.sv, ensure the testbench configures is_active via uvm_config_db before run_test.

The testbench already sets up fifo_env_config and passes it to the environment.

  1. Run Simulation and check the Log panel for INFO: output.

Summary

You practiced building a reusable UVM agent by conditionally instantiating the driver and sequencer based on the agent's is_active setting, while always creating the monitor. This approach allows the same agent to operate in active mode for stimulus generation or passive mode for observation-only scenarios. The key takeaway is that is_active controls the agent’s behavior, enabling flexible reuse across different testbench environments.

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 UVM agent: active vs passive is_active. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.