Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ023
Page ↗
Q023DVASIC interview problem

Match out-of-order packets by ID

TechniquesScoreboardOut-of-orderID matchingAssociative array
DifficultyMedium
TopicReference Models
LanguageSystemVerilog
Requirements4 checkpoints
01

Problem

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.

Scoreboard architecture with a FIFO of expected packets for each transaction ID and out-of-order actual responses matched within each ID.
The per-ID queues preserve order within an ID while allowing different IDs to complete out of order.

Example input and output

Use this case to check your interpretation
Input
expected: id1=A, id1=B, id2=C; responses: id2=C, id1=A, id1=B
Output
all three match; per-ID queues empty
Explanation

Cross-ID reordering is legal, but the two id1 responses still consume A before B from that ID's FIFO.

02

Requirements (4)

  • 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.