Skip to the selected question
ASIC.FYI

ASIC Interview Question Bank

1,000+ hardware interview questions.Curated and reviewed by industry engineers.1,000+ hardware questions1,000+ questionsEngineer-reviewed
DescriptionQ131
Page ↗
Q131DVArchFollow-up to Q074ASIC interview problem

Expire memory expectations without full scans

TechniquesScoreboardDeadline queueLazy deletion
DifficultyHard
TopicReference Models
LanguageSystemVerilog
Requirements4 checkpoints
01

Problem

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 declarationSystemVerilog
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();

Example input and output

Use this case to check your interpretation
Input
expect A due cycle 5 and B due cycle 7; match B at cycle 3; process deadlines at cycle 5 then 7
Output
A expires once at cycle 5; matched B is lazily skipped at cycle 7
Explanation

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

02

Requirements (4)

  • Store the same transaction object in both lookup structures.
  • Mark a matched object so deadline processing can skip it lazily.
  • Process only expired objects at the deadline queue head.
  • Assume expectations enter in nondecreasing cycle order.