Skip to question
ASIC.FYI
DesignVerificationSystemVerilogFirmwareArchitectureInterviews
ASIC.FYI/Interview questions/DRAM Bank Timing Checker

Q069·Free·SystemVerilog

DRAM Bank Timing Checker

Difficulty
Hard
Topic
Timing Models
Language
SV
Interview prompt

Question

Check a simplified dynamic random-access memory (DRAM) command stream against per-bank and global timing rules. Commands carry an explicit cycle number, bank, and row.

Starting point

Question code

typedef enum {ACT, READ, WRITE, PRECHARGE, REFRESH} dram_cmd_e;
class DramTimingChecker #(int BANKS = 16);
  void observe(dram_cmd_e cmd, int bank, int row, longint cycle);
  int error_count();
endclass
Reviewed example

Trace one case

Input
configure tRCD=4 and tRAS=8
t=0 ACT bank0
t=2 READ bank0
t=4 READ bank0
t=7 PRE bank0
t=8 PRE bank0
Expected output
errors at t=2 and t=7; commands at t=4 and t=8 are legal

The timing model checks elapsed cycles against both activation-to-read and minimum-active-time constraints.

What to cover

Requirements

  1. Track open/closed bank state and the active row in every bank.
  2. Enforce tRCD, tRAS, tRP, and tRC with correctly defined inclusive/exclusive boundaries.
  3. Enforce global ACT spacing and the four-activate window (tRRD and tFAW).
  4. Allow refresh only when all banks satisfy the stated precharge requirement.
  5. Reject nonmonotonic cycle observations and continue reporting useful diagnostics after errors.
Exact question handoffPractice Q069

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

SystemVerilog

  • Timing Models
  • DRAM
  • Timing checker
  • Rolling window
Interview preparation guide →
Continue practicing

Related questions

Q039 · Reference ModelsPriority Interrupt Controller Reference Model→Q045 · Clock and ResetMulti-Domain Reset Sequencing Monitor→Q078 · Clock and ResetClock-Gating Behavior Checker→
ASIC.FYI · Learn silicon end to end.info@asic.fyi