RTL Studio Open IDE

3.2 · UVM CLASS

TLM analysis FIFO into the scoreboard

Connect a TLM analysis FIFO between monitor and scoreboard so samples are not lost.

Watch on YouTube

What you practice

TLM analysis FIFO into the scoreboard (3.2). Connect a TLM analysis FIFO between monitor and scoreboard so samples are not lost. It is in TLM analysis FIFO — 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

You will learn how to decouple monitor and scoreboard transactions using a UVM TLM analysis FIFO, ensuring the scoreboard never drops samples due to timing mismatches.

Learning objectives

  • Understand the purpose of a UVM uvm_tlm_analysis_fifo in a scoreboard interface.
  • Instantiate and connect the FIFO between a monitor's analysis port and the scoreboard's analysis export.
  • Use the FIFO's get_export in the scoreboard's run_phase to pull buffered transactions.
  • Verify correct buffering and consumption using simulation logs.

Theory

A UVM uvm_tlm_analysis_fifo acts as a thread-safe, first-in-first-out buffer between components (e.g., monitor and scoreboard) that operate at different speeds or phases. It prevents data loss by decoupling analysis port writes from get-phase reads.

ComponentRole
analysis_exportSink for write() calls from monitor
get_exportSource for get()/peek() calls in scoreboard
Internal FIFOStores transactions until scoreboard consumes them

The monitor calls ap.write(item) in its write() method (often in extract_phase or run_phase). The scoreboard calls fifo.get(item) in its run_phase to retrieve buffered items.

Practice

Open this chapter in RtlStudio; all files appear in Explore. Edit only student/ files.

  1. In student/tb/tb_top.sv, locate the initial block that instantiates the test.
  2. Inside the testbench, declare a uvm_tlm_analysis_fifo #(fifo_seq_item) named fifo_fifo.
  3. Connect the monitor's ap (analysis port) to fifo_fifo.analysis_export.
  4. In the scoreboard's run_phase, replace any direct get() from the interface with fifo_fifo.get_export.get(item).
  5. Run Simulation and check the Log panel for INFO: output.

Summary

The student instantiated a UVM TLM analysis FIFO to decouple the monitor from the scoreboard, ensuring no transaction samples are lost during simulation. They connected the monitor’s analysis port to the FIFO’s analysis export and configured the scoreboard to pull items from the FIFO’s get export in the run_phase. This pattern provides robust buffering and synchronization between components in the verification environment. All monitor transactions were successfully captured and consumed, confirming the FIFO prevented drops as intended.

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 TLM analysis FIFO into the scoreboard. Change the source, run the Verilog simulator again, and read the waveform without leaving the IDE. Simulation guide · Yosys guide.