Hardware interview practice
Reset race in a forked driver
When reset wins the fork below, the code skips item_done and loops. What failure should be expected on the next request attempt?
Starting point
Question code
seq_item_port.get_next_item(req);
fork
begin drive(req); completed = 1; end
begin @(posedge reset); completed = 0; end
join_any
disable fork;
if (completed) seq_item_port.item_done();Choose one
Answer choices
- A. The prior get_next_item remains outstanding, so the sequence can stay blocked and a later get_next_item violates the one-outstanding handshake
- B. disable fork implicitly calls item_done on every sequencer
- C. Reset converts req into a response and routes it to all sequences
- D. The sequencer automatically rewinds finish_item when reset is sampled
