Hardware interview practice
Match out-of-order packets by ID
Implement a scoreboard for responses that may arrive in any cross-ID order while preserving order within each ID. Support more than one outstanding packet with the same ID.

Reviewed example
Work through one case
Input
expected: id1=A, id1=B, id2=C; responses: id2=C, id1=A, id1=BExpected output
all three match; per-ID queues emptyCross-ID reordering is legal, but the two id1 responses still consume A before B from that ID's FIFO.
What to cover
Requirements
- Store a FIFO of expected transactions for every ID instead of one value per ID.
- Reject an output whose ID has no pending expectation.
- Compare with the oldest expected packet for that ID and remove it only after selecting it.
- Report every nonempty per-ID queue at end of test.
