DescriptionQ178
Q178DVArchFollow-up to Q867ASIC interview problem
Release reordered responses in request order
TechniquesScoreboardReorder bufferIn-order retirement
DifficultyHard
TopicReference Models
LanguageSystemVerilog
Requirements4 checkpoints
01
Problem
Responses may arrive out of order, but completed transactions must be emitted downstream in original global request order.
Function headerSystemVerilog
function void on_req(int id, longint addr);
function bit on_rsp(int id);
function void drain_ready(ref longint released[$]);Example input and output
Use this case to check your interpretationInput
global requests A(id1),B(id2),C(id1); responses arrive for id2 then id1Output
after id2 response emit []; after id1 response emit [A,B]; C remains pendingExplanation
B is complete but blocked behind A in global order; completing A releases the longest completed prefix without retiring C.
02
Requirements (4)
- Record global request order across all IDs.
- Assume responses remain FIFO within each ID.
- Mark a request complete without immediately removing it from global order.
- Emit and retire only the longest completed prefix.
