Skip to question
ASIC.FYI
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
ASIC.FYI/Interview questions/Release reordered responses in request order

Q178·Free·Design Verification

Release reordered responses in request order

Difficulty
Hard
Topic
Reference Models
Language
SV
Interview prompt

Question

Responses may arrive out of order, but completed transactions must be emitted downstream in original global request order.

Starting point

Question code

function void on_req(int id, longint addr);
function bit on_rsp(int id);
function void drain_ready(ref longint released[$]);
Reviewed example

Trace one case

Input
global requests A(id1),B(id2),C(id1); responses arrive for id2 then id1
Expected output
after id2 response emit []; after id1 response emit [A,B]; C remains pending

B is complete but blocked behind A in global order; completing A releases the longest completed prefix without retiring C.

What to cover

Requirements

  1. Record global request order across all IDs.
  2. Assume responses remain FIFO within each ID.
  3. Mark a request complete without immediately removing it from global order.
  4. Emit and retire only the longest completed prefix.
Exact question handoffPractice Q178

Solve it in the question bank, keep your progress, and reveal the reviewed solution when your access allows.

Open in question bank →
Solution accessA Free account unlocks the complete reviewed solution.
Continue learning

Design Verification

  • Reference Models
  • Scoreboard
  • Reorder buffer
  • In-order retirement
Interview preparation guide →
Continue practicing

Related questions

Q009 · Reference ModelsMatch out-of-order packets by ID→Q048 · Reference ModelsScoreboard a maximum-interval accelerator→Q097 · Temporal ChecksMonitor ready/valid without SVA→
ASIC.FYI · Learn silicon end to end.info@asic.fyi