Part 4 · TLM & Analysis · Intermediate
TLM FIFOs & Analysis FIFO Usage Hub
Hub - uvm_tlm_fifo basics, uvm_tlm_analysis_fifo monitor wiring, producer-consumer decoupling, FIFO insertion decisions, depth/backpressure sizing, and debug triage.
Overview
TLM FIFOs decouple when data is produced from when it is consumed. Instead of calling downstream logic synchronously inside write() or put(), producers enqueue transactions while consumers dequeue in independent run_phase threads.
In UVM, the two workhorse types are uvm_tlm_fifo #(T) for point-to-point put/get patterns and uvm_tlm_analysis_fifo #(T) for monitor-driven analysis broadcast paths that need pull-based consumption.
Sub-lessons in this topic
tlm_fifo-basics - uvm_tlm_fifo construction, put/get behavior, blocking semantics.
analysis-fifo-pattern - uvm_tlm_analysis_fifo as monitor-to-scoreboard bridge.
producer-consumer-fifo - thread decoupling pattern and timeline implications.
fifo-vs-direct-connect - objective criteria for inserting a FIFO layer.
fifo-depth-backpressure - queue sizing, overflow policy, and latency trade-offs.
fifo-debug-patterns - empty FIFO hangs, stuck consumers, and growth diagnostics.
Topic map
Legend: [TLM] [MON] [SCB] [SEQ]
┌─────────────────────────────────────────────────────────────────────────┐
│ FIFO PATTERNS IN UVM TLM │
├─────────────────────────────────────────────────────────────────────────┤
│ 1. BASICS [TLM] uvm_tlm_fifo put/get, blocking semantics │
│ 2. ANALYSIS FIFO [MON] monitor.ap -> analysis_export -> get thread │
│ 3. DECOUPLING [SCB] producer burst vs consumer pace │
│ 4. DESIGN CHOICE [TLM] direct write() vs FIFO queue boundary │
│ 5. DEPTH [TLM] capacity, backpressure, latency, memory │
│ 6. DEBUG [SCB] empty hangs, dead consumers, runaway growth │
└─────────────────────────────────────────────────────────────────────────┘[TLM] end-to-end FIFO data path
[MON] monitor samples bus_txn
│
│ ap.write(txn)
▼
[TLM] analysis_fifo.analysis_export
│
│ enqueue txn
▼
[TLM] FIFO storage (depth N / unbounded)
│
│ get() blocks until item available
▼
[SCB] scoreboard consumer thread
│
▼
compare / predict / coverage bookkeepingKey takeaways
FIFOs convert synchronous producer callbacks into asynchronous consumer workflows.
uvm_tlm_fifo and uvm_tlm_analysis_fifo solve related but distinct wiring problems.
Depth policy is a functional choice, not a cosmetic parameter.
Most FIFO bugs are liveness bugs: no producer, no consumer, or no balance.
Common pitfalls
Adding FIFO by default everywhere and hiding true ordering constraints.
Using direct write() for expensive checker logic and stalling monitor sampling.
Leaving queue depth and overflow behavior unspecified in project conventions.
How to study this topic
Start with tlm_fifo-basics if put/get semantics are still fuzzy.
Use analysis-fifo-pattern first when monitor-to-scoreboard throughput is unstable.
Apply fifo-depth-backpressure before large regressions to avoid memory surprises.
Keep fifo-debug-patterns open while triaging hangs or no-data symptoms.