RTL Studio Open IDE

2.3 · UVM CLASS

Handshake: item_done() and wave analysis

Complete the driver handshake with item_done() and analyze timing on VCD waveforms.

Watch on YouTube

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’s run_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.

StepActionPurpose
1get_next_item(req)Fetch next transaction from sequencer
2Drive DUT pins (wr_en, data_in, etc.)Apply stimulus
3item_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.

  1. Open student/tb/tb_top.sv in the editor.
  2. In the initial block, locate the fork drv.run_phase(null); join_none line.
  3. Ensure drv.run_phase(null) calls get_next_item, drives vif.wr_en, vif.data_in, and then calls seq_item_port.item_done(req).
  4. Confirm $dumpfile("sim/dump.vcd") and $dumpvars(0, tb_top) are present to enable waveform capture.
  5. Run Simulation from the sidebar and check Log for INFO: messages.
  6. Open the Waveform tab to inspect wr_en, rd_en, data_in, full, and empty timing.

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

  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 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.