What you practice
Handshake: item_done() and wave analysis (2.3). Complete the driver handshake with item_done() and analyze timing on VCD waveforms. It is in Handshake — 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
Today you will implement the driver’s item_done() handshake in UVM and verify signal timing using VCD waveform analysis.
Learning objectives
- Call
seq_item_port.item_done(req)after driving FIFO signals in the driver’srun_phase. - Enable VCD dump in the testbench and observe signal transitions aligned with stimulus.
- Connect driver, sequencer, and sequence to complete the UVM handshake.
- Interpret simulation log and waveform to confirm correct FIFO operation.
Theory
UVM drivers complete each transaction by calling item_done() after driving the DUT’s pins. This signals the sequencer that the item is consumed and frees it for the next item. Without item_done(), the sequencer stalls, and the sequence hangs.
| Step | Action | Purpose |
|---|---|---|
| 1 | get_next_item(req) | Fetch next transaction from sequencer |
| 2 | Drive DUT pins (wr_en, data_in, etc.) | Apply stimulus |
| 3 | item_done(req) | Signal completion and release item |
The testbench uses a virtual interface (fifo_if) to drive signals in lockstep with clock cycles. VCD dumping ($dumpfile, $dumpvars) records all signals for waveform inspection.
Practice
Open this chapter in RtlStudio. Files appear in Explore — no project setup needed.
- Open
student/tb/tb_top.svin the editor. - In the
initialblock, locate thefork drv.run_phase(null); join_noneline. - Ensure
drv.run_phase(null)callsget_next_item, drivesvif.wr_en,vif.data_in, and then callsseq_item_port.item_done(req). - Confirm
$dumpfile("sim/dump.vcd")and$dumpvars(0, tb_top)are present to enable waveform capture. - Run Simulation from the sidebar and check Log for
INFO:messages. - Open the Waveform tab to inspect
wr_en,rd_en,data_in,full, andemptytiming.
Summary
You implemented the driver’s run_phase to pull a transaction, drive FIFO control and data signals, and call item_done() to complete the UVM handshake. You enabled VCD dumping and used the Waveform tab to verify timing alignment between the simulation log and signal transitions. The key takeaway is that item_done() is essential for synchronizing the driver and sequencer, ensuring smooth transaction flow and preventing stalls. This hands-on practice solidified how handshake mechanics and waveform analysis work together to validate protocol behavior.
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 Handshake: item_done() and wave analysis. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.