Hardware interview practice
Drive a multi-beat ready/valid transaction
Expand one logical sequence item containing a queue of data beats into a ready/valid burst. Support backpressure, an accurate last flag, and optional idle bubbles between accepted beats.
Reviewed example
Work through one case
Input
logical item beats=[A,B]; A handshakes; insert one idle bubble; present B with ready=0 then ready=1Expected output
accepted burst=A then B; last=0 on A and last=1 held with B through its stall; item_done onceThe beat index advances only on handshakes, and an optional bubble occurs before valid is reasserted for the final beat.
What to cover
Requirements
- Do not advance the beat index until the current beat handshakes.
- Assert last only for the final beat and hold it stable with the data while stalled.
- Insert a bubble only while valid is low; never ignore a possible handshake after asserting valid.
- Call item_done() once for the complete logical transaction, not once per physical beat.
- Reject an empty beat queue as an invalid burst item.
