Q170FreeDesign Verification
How a UVM Analysis Port Works
Question
Which statement best describes uvm_analysis_port::write?
Answer choices
- A. It is a zero-time, synchronous transaction-level modeling (TLM) broadcast to zero or more connected subscribers
- B. It blocks until every subscriber calls item_done
- C. It arbitrates among sequences and grants exactly one subscriber
- D. It creates a deep copy for every subscriber
Short answer
`uvm_analysis_port::write` distributes one transaction handle to every connected subscriber without a return handshake. It is a function-based observation broadcast, permits zero subscribers, performs no arbitration, and does not automatically clone the transaction for each recipient.
Why this reasoning works
Analysis ports model fan-out from producers such as monitors to consumers such as scoreboards, coverage collectors, and loggers. A single `write` invocation forwards the same published item through all connected analysis implementations. Because `write` is a function, subscribers cannot consume simulation time or wait for an `item_done` response.
The transmitted value is an object handle rather than an automatic snapshot. If the producer later mutates a reused transaction, consumers that retained that handle may observe the changed data. A verification environment should therefore define an ownership policy, such as creating a fresh object for every publication or cloning at an agreed boundary.
Interview takeaways
- Broadcasts to all subscribers
- No completion handshake
- Handles are not cloned
