Skip to question
ASIC.FYI
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
ASIC.FYI/Interview questions/MSI Cache-Coherence Directory Scoreboard

Q091·Free·Design Verification

MSI Cache-Coherence Directory Scoreboard

Difficulty
Hard
Topic
Coherence
Language
SV
Interview prompt

Question

Track a sparse cache directory using the Modified, Shared, Invalid (MSI) protocol. Requests, snoops, invalidation acknowledgements, evictions, and data responses may appear on different interfaces.

Message-signaled-interrupt directory requests and reordered responses matched by identity
The scoreboard tracks directory state and compares each response against the corresponding accepted request.
Starting point

Question code

typedef enum {CPU_READ, CPU_WRITE, SNOOP_INV, INV_ACK,
              DATA_RSP, EVICT} coh_event_e;

class MsiDirectory #(int AGENTS = 8);
  void observe(coh_event_e event, int agent, longint line_addr,
               int txn_id, int data_version);
  int error_count();
endclass
Reviewed example

Trace one case

Input
line X initially I/I
core0 Read X
core1 Read X
core0 Write X
Expected output
directory states: S/I -> S/S -> M/I, with an invalidation sent to core1 before core0 writes

The scoreboard tracks sharers and enforces the single-writer invariant during the S-to-M transition.

What to cover

Requirements

  1. At most one agent may own a line in Modified state.
  2. Modified ownership implies that no other agent remains a Shared holder.
  3. Represent transient states while invalidations or data transfers are outstanding.
  4. Count required acknowledgements and reject duplicate, stale, or unexpected responses.
  5. Track a data version so the next reader receives the most recent completed write.
Exact question handoffPractice Q091

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

  • Coherence
  • Cache coherence
  • MSI
  • Transient states
Interview preparation guide →
Continue practicing

Related questions

Q106 · Performance AnalysisSize a FIFO under an unstable sustained rate→Q268 · Performance ControlToken-Bucket Rate-Limit Monitor→Q039 · Reference ModelsPriority Interrupt Controller Reference Model→
ASIC.FYI · Learn silicon end to end.info@asic.fyi