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_itemobjects 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.
| Component | Role |
|---|---|
uvm_monitor | Base class for passive observation; no drive capability. |
virtual if | Reference to the DUT interface; sampled on clock edges. |
uvm_analysis_port | Publishes 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
- Open RtlStudio and select Lesson 2.4.
Confirm files appear in Explore.
- Open
student/tb/env/fifo_monitor.svin the editor. - In the
run_phasetask, 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
- Run Simulation from the left sidebar and check the Log panel for
INFO:messages. - 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
- Open the UVM workspace in the IDE. The DUT and the testbench compile together in the browser.
- Run the SystemVerilog simulation with Verilator and read the phase and scoreboard lines in the log.
- When the check is on pins rather than a print, open the VCD next to that log.
- 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.