Skip to question
ASIC.FYI
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
ASIC.FYI/Interview questions/Expire memory expectations without full scans

Q131·Free·Design Verification

Expire memory expectations without full scans

Difficulty
Hard
Topic
Reference Models
Language
SV
Interview prompt

Question

Replace the full pending-memory scan with a deadline-ordered structure while preserving fast per-address matching.

Address lookup map and deadline-ordered queue sharing transaction objects
Matching marks the shared object, while expiration examines only ordered queue heads and skips matched entries lazily.
Starting point

Question code

expected_txn by_addr[longint][$];
expected_txn deadlines[$];

function void golden_write(longint addr, int data);
function void dut_write(longint addr, int data);
function void tick();
Reviewed example

Trace one case

Input
expect A due cycle 5 and B due cycle 7; match B at cycle 3; process deadlines at cycle 5 then 7
Expected output
A expires once at cycle 5; matched B is lazily skipped at cycle 7

The deadline queue visits only its expired head objects and the matched marker prevents B from being reported after successful lookup removal.

What to cover

Requirements

  1. Store the same transaction object in both lookup structures.
  2. Mark a matched object so deadline processing can skip it lazily.
  3. Process only expired objects at the deadline queue head.
  4. Assume expectations enter in nondecreasing cycle order.
Exact question handoffPractice Q131

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
  • Deadline queue
  • Lazy deletion
Interview preparation guide →
Continue practicing

Related questions

Q074 · Reference ModelsCheck delayed and reordered memory writes→Q009 · Reference ModelsMatch out-of-order packets by ID→Q178 · Reference ModelsRelease reordered responses in request order→
ASIC.FYI · Learn silicon end to end.info@asic.fyi