Hardware interview practice
Monitor a ready/valid interface
Implement a passive UVM monitor for a single-beat ready/valid interface. Publish exactly one transaction for each observed handshake and remain safe across reset and unknown control values.
Reviewed example
Work through one case
Input
successive samples: valid=1 ready=0; valid=1 ready=1 data=A; valid=X ready=1Expected output
publish exactly one fresh transaction carrying A; report the unknown valid controlThe passive monitor observes only known-high handshakes and neither a stall nor an unknown control creates an analysis transaction.
What to cover
Requirements
- Sample through a monitor clocking block and publish only when valid and ready are both known-high.
- Flush or ignore observations while reset is not known-deasserted.
- Report X or Z on handshake controls and on payload sampled during an accepted beat.
- Construct the analysis port and publish a fresh transaction object for every accepted beat.
