Skip to the selected question
ASIC.FYI

ASIC Question Bank

1,000+ hardware interview questions
DescriptionQ828
Page ↗
Q828DVGoogleASIC interview problem

Match out-of-order responses by ID

TechniquesDVUVMScoreboardOut-of-orderAssociative array
DifficultyMedium
TopicUVM
LanguageSystemVerilog
Requirements4 checkpoints
01

Problem

Requests use unique 8-bit IDs, and responses may return in any order. Build an ID-indexed scoreboard for operand-squared results, duplicate detection, exact comparison, and end-of-test leftovers.

Starting declarationSystemVerilog
req: id[7:0], operand[15:0]
rsp: id[7:0], result[31:0]
expected result = operand * operand
maximum 32 outstanding requests

Example input and output

Use this case to check your interpretation
Input
Requests (1,3), (2,4); responses (2,16), (1,9)
Output
Both responses pass and the associative array becomes empty
Explanation

Each response is matched by ID rather than arrival position.

02

Requirements (4)

  • On each request, compute the expected result and store it in an associative array indexed by ID; reject a duplicate outstanding ID.
  • On each response, require the ID to exist, compare result exactly, then delete that ID after the comparison.
  • Report an unexpected ID, duplicate request ID, data mismatch, and any entries still present at end of test as distinct errors.
  • Do not compare responses by arrival order; the only ordering key is the response ID.