RTL Studio Open IDE

2.4 · UVM CLASS

UVM monitor: sample FIFO pins

Sample FIFO interface signals on the clock edge and reconstruct transactions.

Watch on YouTube

What you practice

UVM monitor: sample FIFO pins (2.4). Sample FIFO interface signals on the clock edge and reconstruct transactions. It is in Monitor — Part 2 · Agent: Driver & Monitor of the UVM Masterclass. Connect software UVM components to hardware FIFO pins.

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 to build a UVM monitor that samples DUT interface signals on clock edges and reconstructs protocol transactions in software.

Learning objectives

  • Understand the role of a UVM monitor in a verification environment.
  • Sample virtual interface signals on clock edges inside run_phase.
  • Construct fifo_seq_item objects from sampled interface values.
  • Report sampled transactions using uvm_report_info.
  • Connect the monitor’s analysis port to the rest of the testbench.

Theory

A UVM monitor observes DUT activity via a virtual interface and converts pin-level behavior into high-level sequence items.

ComponentRole
uvm_monitorBase class for passive observation; no drive capability.
virtual ifReference to the DUT interface; sampled on clock edges.
uvm_analysis_portPublishes sampled items to subscribers (e.g., scoreboards, coverage).

Monitors are passive: they do not drive the DUT, only observe and report. Sampling occurs in run_phase using blocking event controls like @(posedge vif.clk).

Practice

  1. Open RtlStudio and select Lesson 2.4.

Confirm files appear in Explore.

  1. Open student/tb/env/fifo_monitor.sv in the editor.
  2. In the run_phase task, replace each __TODO__ with the corresponding virtual interface signal sampled on the clock edge:

- mon_item.data → vif.data_out - mon_item.write_en → vif.wr_en - mon_item.read_en → vif.rd_en

  1. Run Simulation from the left sidebar and check the Log panel for INFO: messages.
  2. Confirm the monitor reports each transaction and the testbench ends with INFO: PASS.

Summary

You implemented a UVM monitor to sample FIFO interface signals on each clock edge and reconstruct transaction objects in software. This reinforced the pattern of capturing hardware activity via virtual interfaces and translating it into UVM sequence items for verification. Your monitor now mirrors the DUT’s behavior by observing pin transitions and emitting high-level items for scoreboard or coverage analysis.

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 monitor: sample FIFO pins. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.