Hardware interview practice
How to Connect a UVM Sequencer and Driver
Which connection enables a uvm_driver to pull sequence items from its sequencer?
Answer choices
- A. sequencer.seq_item_port.connect(driver.seq_item_export)
- B. driver.seq_item_port.connect(sequencer.seq_item_export)
- C. driver.analysis_port.connect(sequencer.analysis_imp)
- D. sequencer.req_port.connect(driver.rsp_export)
Concise answer
The answer and the key reason
Deeper explanation
Work through the implementation and tradeoffs
The driver-side `seq_item_port` is the calling endpoint for methods such as `get_next_item`, `item_done`, and related request-response operations. The sequencer-side `seq_item_export` presents the implementation of that protocol. UVM TLM connections are written from the port that makes calls toward the export that serves them.
Both components should already have been created before this binding occurs, making `connect_phase` the natural location. An active agent builds and connects the driver and sequencer because it generates stimulus. A passive agent generally contains only observation infrastructure, so creating or wiring this pull path there would serve no purpose.
What to remember
- Driver port is initiator
- Sequencer export provides items
- Connect in connect_phase
Practice the complete prompt
