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_fifoin 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_exportin the scoreboard'srun_phaseto 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.
| Component | Role |
|---|---|
analysis_export | Sink for write() calls from monitor |
get_export | Source for get()/peek() calls in scoreboard |
| Internal FIFO | Stores 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.
- In
student/tb/tb_top.sv, locate theinitialblock that instantiates the test. - Inside the testbench, declare a
uvm_tlm_analysis_fifo #(fifo_seq_item)namedfifo_fifo. - Connect the monitor's
ap(analysis port) tofifo_fifo.analysis_export. - In the scoreboard's
run_phase, replace any directget()from the interface withfifo_fifo.get_export.get(item). - 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
- 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 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.