Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
    • How to Dissect a Protocol
    • UART
    • SPI
    • I2C
    • APB
    • AHB
    • AXI4
    • AXI-Stream
    • PCI Express
    • DDR
    • CHI
    • Ethernet
    • USB
    • UCIe
    • CXL
    • Protocols Compared: Protocols Dissected
    • Drills: Protocols Dissected
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 16: Protocols Dissected
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 16: Protocols Dissected
  4. DDR

Part 16 · Protocols Dissected · Senior (S)

DDR

DDR SDRAM dissected through the twenty questions: a controller that issues every command, a DRAM that answers after fixed latencies with no handshake, strobes for timing, banks for concurrency, refresh, training and turnaround costs. A protocol where all the intelligence sits on one side.

On this page

    Note

    Level: Senior (S) · Answers: How do real protocols answer the fifteen questions?

    Before this: How to Dissect a Protocol, Source-Synchronous Clocks and Strobes

    A memory controller wants one cache line from DRAM. It cannot simply ask: it must open the right row in the right bank, wait a fixed number of cycles, issue a read, wait again, catch the data on a strobe, close the row before opening another in that bank, and every few microseconds stop everything to refresh. The DRAM never says "ready" or "done". It simply does what it is told, on schedule, and the controller must know every rule.

    How does DDR answer each question when one side does all the thinking?

    Constraints first: what DDR had to work with

    Constraint

    DDR

    C1 Distance and medium

    A board or module: short, but at very high data rates

    C2 Bandwidth and latency

    Very high bandwidth; tens of nanoseconds of latency set by the DRAM array

    C3 Wires

    Wide parallel data bus, a command/address bus, and strobes

    C4 Topology

    One controller, one or a few ranks of DRAM devices

    C5 Who builds each side

    DRAM vendors build to JEDEC standards; controllers must work with any compliant DRAM

    The DRAM never signals readiness: the controller waits fixed, configured delays between commands, and the data arrives a fixed latency after the read.

    DDR's answers to the fifteen questions

    Each answer links to the lesson that explains the idea behind it.

    #

    Question

    Answer

    1

    When is the data valid?

    Source-synchronous strobes: DQS is edge-aligned with data on reads and centre-aligned on writes (fact S6) (1.3)

    2

    Where does a message start and end?

    Commands on the command bus at clock edges; data in fixed-length bursts, BL8 in DDR4 and BL16 in DDR5 (fact S23) (5.8)

    3

    Is the receiver ready?

    No ready signal: the DRAM answers after fixed latencies, so the controller schedules everything (a valid-only response) (3.1)

    4

    How much may I send before I hear back?

    None from the DRAM: the controller owns all timing (4.1)

    5

    What exactly is being asked?

    ACTIVATE, READ, WRITE, PRECHARGE and REFRESH commands addressing banks, rows and columns (fact S23) (5.3)

    6

    How many requests can be in flight?

    Many banks and bank groups let the controller overlap accesses (16 banks in DDR4, 32 in DDR5) (fact S23) (6.3)

    7

    In what order do results become visible?

    The controller reorders requests to reuse open rows, but must keep same-address order (7.8)

    8

    Who gets the wire?

    The controller is the only master; it schedules the shared, bidirectional data bus and pays turnaround cycles to switch between reads and writes (facts S6, S23) (8.2)

    9

    Why can it hang?

    No protocol deadlock, but scheduling can starve requests (always favouring open-row hits), and refresh must never be postponed too long (fact S23) (9.1)

    10

    What if bits go wrong?

    ECC DIMMs widen the bus to 72 bits for SECDED (fact S23) (10.5)

    11

    How do the two sides agree at start-up?

    Initialisation and training (write levelling, read training) align strobes and data to the board (fact S23) (11.4)

    12

    How do we save power without losing data?

    Power-down and self-refresh modes when idle (fact S23) (12.2)

    13

    What if there are several copies of one value?

    Not applicable: coherence is handled above the memory controller

    14

    Who is allowed to ask?

    Not addressed by the protocol

    15

    How do we know it is correct?

    Compliance with JEDEC timing; controller verification with DRAM models and training validation on boards (15.8)

    The choices that define DDR

    • All intelligence in the controller: the DRAM is kept simple and dense; the controller tracks every bank's state and every timing rule.

    • No handshake: fixed latencies replace ready signals, so the bus can run at full speed with no feedback.

    • Bank-level concurrency: overlapping accesses to different banks hides the array's latency.

    • Training: high data rates on real boards require the controller to calibrate timing at start-up.

    What breaks

    A memory controller (illustrative) always served open-row hits first to maximise bandwidth. Under a streaming workload, one core's requests to a different row in a busy bank waited for tens of microseconds while another core kept hitting the open row. Capping how many hits may bypass an older request fixed the starvation at a small bandwidth cost: DRAM scheduling is an arbitration problem, with the usual fairness trade-off.

    Why this matters

    Senior lens. DDR is the extreme of putting all protocol intelligence on one side: the DRAM obeys commands on a fixed schedule and the controller carries the whole protocol state. Most DDR performance and correctness questions are therefore controller scheduling questions: bank conflicts, turnaround, refresh, fairness. Review the scheduler against starvation and refresh deadlines as carefully as against bandwidth.

    Interview

    Asked: "Why does DDR have no ready signal?"

    Weak answer: DRAM is always ready.

    Strong answer: Because the DRAM is deliberately simple: every operation takes a fixed, specified time, so the controller knows exactly when data will appear and when the next command is allowed. Fixed timing lets the bus run at full speed without feedback, and keeps the DRAM die dense and cheap. The cost is that all the intelligence moves to the controller: it tracks each bank's open row, enforces every timing parameter, schedules refresh, reorders requests for row hits while keeping same-address order, and pays turnaround cycles between reads and writes.

    Follow-ups: (1) What does the controller lose by reordering? (2) What is training for?

    Check yourself Why does switching from reads to writes cost cycles?

    The data bus is bidirectional; the drivers must turn around, so there are idle cycles between directions.

    Check yourself What happens if the controller postpones refresh too long?

    Cells lose charge and data is corrupted; refresh has a hard average interval.

    Key takeaways

    • DDR: the controller issues every command; the DRAM answers after fixed latencies, with no handshake.

    • Strobes for timing, banks for concurrency, refresh and training as mandatory duties.

    • Performance and fairness are controller scheduling problems.

    Keep going

    Next: Lesson 16.11, CHI. Coherence as messages: AMBA's protocol for large coherent systems.

    Related topics

    • Part 16 overview: Protocols Dissected

    Previous

    216 / 234

    Next: CHI

    Up next

    Up nextCHI

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • How to Dissect a Protocol
    • UART
    • SPI