DDR · Module 30
Why DRAM Refresh?
The refresh question is not a fact to recall. It is a causal chain from the destructive read to a controller obligation, and the level is set by whether you distinguish an average rate from a per-row deadline.
This is the first DDR question most engineers are asked, and it is usually answered badly for a specific reason: the fact is easy and the derivation is not.
Almost everyone can say DRAM must be refreshed because the capacitor leaks. That sentence is correct and it establishes very little. The follow-ups are where the interview actually happens, and they are answerable only from a model:
Why periodic rather than on demand? What breaks if one refresh is late? Why is meeting the average rate not enough? Which of this is generation-specific?
A strong answer is not a fact recalled. It is a correct model applied to the evidence given. This chapter builds that model, then stress-tests it the way an interviewer does.
1. What This Question Actually Tests
Interviewers rarely ask about refresh because they want to know whether you know the word. They ask it because it is the cheapest probe for four separate abilities, and a memorised answer reveals none of them.
| What the question probes | What a recalled answer shows |
|---|---|
| Can you derive a system requirement from a device property? | nothing |
| Do you distinguish an obligation from a command? | nothing |
| Do you understand why an average is not a guarantee? | nothing |
| Do you qualify generation-specific behaviour unprompted? | nothing |
So the useful preparation is not a better sentence. It is a model compact enough to reconstruct under pressure and general enough to answer questions you have not seen.
2. The Model, in One Causal Chain
CURRICULUM-DERIVED from 2.1 through 2.3, the entire topic follows from one property and three consequences:
THE PROPERTY
a DRAM cell stores a bit as charge on a capacitor (2.1, 2.4)
charge leaks away over time (2.2)
CONSEQUENCE 1 -- the data has a lifetime
left alone, a stored value becomes unreadable.
so something must periodically restore it. (2.3)
CONSEQUENCE 2 -- reading is already a restore
a DRAM read is destructive; the sense amplifier
restores the row as a side effect. (2.5, 2.6)
so REFRESH IS THE SAME OPERATION, applied on a
schedule rather than on demand.
CONSEQUENCE 3 -- the schedule is an obligation, not an event
the device requires a certain amount of refresh
service over a window. WHEN, within bounds, is the
controller's choice. (15.3)Consequence 2 is the one that separates a good answer from an adequate one, and it is the part almost nobody says. Refresh is not a special maintenance operation bolted onto DRAM. It is the restore that a read already performs, 2.5 and 2.6 own it, and once you see that, refresh stops being a curiosity and becomes structural.
Consequence 3 is where the follow-ups live. Chapter 15.3 owns the due / urgent / overdue distinction, and §5 is built on it.
3. Structuring the Answer Under Time Pressure
The registry calls this chapter explain refresh in 90 seconds. The constraint is real and it is not a reason to compress the model — it is a reason to order it.
A reasoning order that survives interruption:
| Order | Say | Why this order |
|---|---|---|
| 1 | the physical property — charge leaks | everything else is derived, so this must be first |
| 2 | therefore data has a lifetime | the requirement, stated as a consequence |
| 3 | a read already restores, so refresh is that on a schedule | the insight that shows a model rather than a fact |
| 4 | so the device defines an obligation, not an event | sets up every follow-up on your own terms |
| 5 | and which refresh mechanisms exist is generation-specific | pre-empts the scope question |
Steps 1 and 2 take about fifteen seconds and are the part everyone gets. Steps 3 and 4 are the part that changes the conversation, because step 4 tells the interviewer you already know the average-versus-deadline question is coming — and it is usually their next one.
4. Foundation Questions
Q1. Why does DRAM need refresh at all?
What a strong answer establishes: the causal direction — a device property forces a system obligation. Charge leaks, so a stored value has a finite lifetime, so something must restore it periodically.
Reasoning path: start at the cell, not at the controller. Chapter 2.4 owns the one-transistor-one-capacitor structure; the leakage is 2.2's subject.
Common wrong answer: because DRAM is volatile. Why it fails: volatility is about losing data when power is removed. SRAM is volatile too and needs no refresh. The property is leakage under power, not loss of power — and conflating them means the model is a label rather than a mechanism.
Follow-up you should expect: then why doesn't SRAM need refresh? Because an SRAM cell holds its value in a feedback loop that is actively driven while powered, so there is no decaying quantity. That answer also demonstrates you understand what the DRAM cell lacks, which is more informative than the original question.
Q2. Why is refresh periodic rather than triggered when a cell is about to fail?
What a strong answer establishes: that the device cannot report per-cell state, and that the specification therefore works from a guaranteed bound rather than a measurement.
Reasoning path: there is no mechanism by which a controller learns that a particular cell is close to losing its value — the interface exposes no such observation. So the requirement is expressed as a worst-case interval under specified conditions, which 15.4 owns as the distribution-to-specification bridge, with temperature as a specified operating condition rather than a physical model.
Assumption worth stating aloud: the guarantee is conditional. It holds under the specified operating conditions, and a condition change changes the requirement — which is §7's subject.
Common wrong answer: because checking every cell would be too slow. Why it fails: it implies the check exists and is merely expensive. There is no per-cell retention observation at the interface at all, so the argument is not about cost.
Q3. What is actually happening electrically during a refresh?
What a strong answer establishes: that refresh is a restore, and that it is the same restore a read performs.
Reasoning path: Chapter 2.5 owns the destructive-read property and 2.6 the restore. Activating a row transfers the cells' charge onto the bitlines, the sense amplifiers resolve it to full levels, and writing it back restores the row. A refresh is that sequence performed for its side effect rather than for the data.
Why this matters beyond the trivia: it explains why refresh costs the same resources as real traffic — the bank is busy, the row is opened and closed — which is 15.5's availability arithmetic and the reason refresh competes with traffic rather than happening invisibly.
Follow-up: does reading a row postpone its refresh need? The honest answer is that this is architecture- and generation-dependent and the safe reasoning is that the controller's refresh obligation is defined by the specification, not by incidental traffic. Claiming that normal reads can substitute for refresh is a real error — a row that happens not to be read still needs service, and a controller cannot know which rows traffic touched without tracking every one.
5. The Question That Separates Levels
Q4. A controller meets the average refresh rate exactly. Is the device guaranteed to retain its data?
No — and this is the question worth preparing properly.
What a strong answer establishes: that an average over a long window and a per-obligation deadline are different constraints, and that satisfying one does not satisfy the other.
Reasoning path. CURRICULUM-DERIVED from 15.3, which owns the verified postponement and pull-in allowance and the due / urgent / overdue state distinction: the specification permits a controller to postpone service by a bounded amount and to pull it in by a bounded amount. So the controller has scheduling freedom — but bounded freedom.
DERIVED under a stated ILLUSTRATIVE model — an allowance of 8 intervals:
a controller that satisfies the AVERAGE and violates a DEADLINE
intervals 1..8 : issue nothing. Obligations accrue: 8 pending.
Still legal -- this is what the allowance is for.
interval 9 : the oldest obligation is now 9 intervals old.
The allowance is spent. This one is LATE.
intervals 10..17 : issue two refreshes per interval, catching up.
over the 17 intervals the AVERAGE rate is met exactly.
and one obligation exceeded its deadline.
the average is a property of the window.
the deadline is a property of the OLDEST unserved obligation.
no average constrains a maximum.The sentence to have ready: the average is a statistic over a window; the requirement is a bound on the oldest unserved obligation, and a bound on a maximum is not implied by a mean.
Common wrong answer: yes, because refreshing at the average rate services every row on schedule. Why it fails: it assumes service is uniform. The specification's own allowance explicitly permits non-uniform service, so a controller can be simultaneously rate-compliant and deadline-violating — and 28.3 §3 is built on keeping those two counted separately.
Follow-up: so what would you measure? Not the refresh command rate. The age of the oldest unserved obligation, and a count of how many times that age exceeded the deadline — which §8 develops.
6. Follow-Up Chain — Removing One Assumption at a Time
The chain an interviewer actually walks, with what each step adds.
Start: why does DRAM need refresh? → §4 Q1.
Remove the uniformity assumption: must refreshes be evenly spaced? No — 15.3's allowance permits postponement and pull-in within bounds, and 17.3 owns the eager-versus-deferred policy dial a controller uses to decide. So irregular spacing can be correct behaviour rather than a defect, which is a finding 28.3 §7 had to make explicit because it is routinely reported as a bug.
Remove the free-lunch assumption: what does refresh cost? The bank is unavailable, a row is opened and closed, and 17.3 establishes that the manager must drain in-flight traffic first. So refresh costs a traffic interruption whose length exceeds the refresh itself — and 15.5 owns the availability arithmetic.
Remove the fixed-condition assumption: does the requirement change? Yes. Chapter 15.4 owns temperature as a specified operating condition and the band-change problem that invalidates prior accounting. So a system correct at one condition can be incorrect at another with no configuration change — the configuration stopped matching the conditions.
Remove the single-scope assumption: does one refresh command service the whole device? Architecture- and generation-dependent. Chapter 15.2 owns the mapping from command scope to controller bookkeeping: a device-wide command retires one device-level obligation, and a narrower-scope command retires an obligation for only the resources it names — which requires different bookkeeping. Answering yes unconditionally is the error §7 is about.
Arrive at diagnosis: errors correlate with refresh — is it a retention failure? Not established. §8.
7. Saying "It Depends" Correctly
Refresh is a topic where the correct answer is frequently conditional, and there is a large difference between a qualified answer and a vague one.
| Weak | Strong |
|---|---|
| "It depends on the generation." | "It depends on whether the device supports a narrower refresh scope. If it does, the controller needs per-resource bookkeeping and an aggregate count is insufficient — 15.2. If it does not, one counter suffices. I would check the device's supported refresh commands." |
| "It depends on the implementation." | "It depends on the controller's policy dial — 17.3. Eager service smooths latency and costs bandwidth; deferred service protects bursts and produces irregular spacing. The observation that distinguishes them is the distribution of inter-refresh gaps." |
| "Temperature matters." | "The requirement is specified against an operating condition — 15.4. Crossing into a different band changes the required rate, so I would read the configured interval alongside the temperature reading to check the rate tracked the condition." |
The pattern is always the same three parts: name the dependency, state the consequence under each branch, and name the observation that tells you which branch you are in. An answer missing the third part has not finished — it has identified an unknown without saying how to resolve it.
And this is the honest place to say what is generation-specific here. The existence of a refresh obligation is a property of DRAM and is not generation-specific. Which refresh commands exist, what scope each has, what postponement is permitted, and what temperature bands are defined are all specified per generation, and 15.2 explicitly labels its scope discussion with the generation for that reason. A candidate who volunteers that distinction unprompted has demonstrated the model.
8. The Senior Turn — What Would You Measure?
Q5. A system shows intermittent data errors that cluster near refresh activity. Is this a retention failure?
The correct first answer is that the symptom is insufficient, and saying so is not evasion — it is the finding.
CURRICULUM-DERIVED from 28.3 §9, which owns this exact investigation: a correlation with refresh is consistent with at least four mechanisms.
| Hypothesis | Mechanism | Evidence that would support it |
|---|---|---|
| Retention | charge genuinely lost before service | errors grow with the oldest obligation's age; deadline misses non-zero |
| Drain / restart | traffic stopped and restarted around refresh, and the restart is wrong | errors at the first access after traffic resumes, regardless of age |
| Timing interaction | a refresh-adjacent timing rule violated | a violation snapshot naming a refresh-adjacent rule — 28.2 |
| Thermal coincidence | refresh activity raises local temperature and something else is temperature-sensitive | errors track temperature, not refresh count |
The discriminating experiment, and it is cheap: bucket the failing accesses by their position within the refresh window. Chapter 28.3 §9 establishes that retention clusters errors at the end of the window and grows with age, while a restart bug clusters them at the first access after traffic resumes. Opposite distributions from the same top-level symptom, separated by one histogram.
And the first number to read is not about errors at all. It is whether the controller's refresh obligation was ever missed. If the deadline-miss count is zero, the obligation was met, and a retention story has no supporting evidence — so the investigation should start at the other three hypotheses.
Q6. What would you instrument, specifically?
A strong answer names fields and says what each distinguishes, rather than saying add counters:
| Field | What it distinguishes |
|---|---|
| Oldest-obligation age | how close to the deadline the controller is running |
| Deadline misses, counted separately from overdue events | correctness events from performance events — 28.3 §3 |
| A sticky miss flag | a system missing every window from one sampled clean |
| Error position within the refresh window | retention from a restart bug |
| Has the obligation ledger ever accrued | a healthy ledger at zero from a dead one — 28.3 §2 |
The last row is the one senior candidates get and others do not. A refresh ledger reading zero pending with zero misses looks perfect — and is exactly what a controller whose accrual path is broken reports, forever. One sticky bit separates them, and noticing that a clean report can be the signature of a dead instrument is the ability the question is really probing.
9. Common Wrong Answers, and Exactly Where They Fail
“DRAM needs refresh because it is volatile.” §4 Q1. Volatility is about power removal; SRAM is volatile and needs no refresh. The property is leakage under power.
“Refresh rewrites the data from a copy.” There is no copy. §4 Q3 — the row's own charge is sensed, resolved to full levels by the sense amplifiers, and written back. Chapter 2.6 owns it.
“Refresh happens in the background without cost.” §6. The bank is unavailable, a row is opened and closed, and 17.3 requires draining in-flight traffic first — so the interruption exceeds the refresh.
“Refreshing at the average rate guarantees retention.” §5. The average is a window statistic; the requirement bounds the oldest unserved obligation, and no mean constrains a maximum.
“Irregular refresh spacing is a scheduling bug.” §6. Chapter 17.3's deferred policy deliberately bunches service. Read the policy before investigating.
“Normal reads refresh the rows they touch, so busy systems need less refresh.” §4 Q3. A row not touched still needs service, and a controller cannot credit incidental traffic without tracking every row. Treating traffic as refresh is a correctness error, not an optimisation.
“One refresh command services the whole device.” §7. Architecture- and generation-dependent; 15.2 owns scope and the bookkeeping each scope requires.
“Errors near refresh mean the retention specification is wrong.” §8. Four mechanisms, and the cheapest to test is a restart bug that has nothing to do with charge.
“Doubling the refresh rate is a safe fix.” It changes retention margin, bus availability, the number of traffic interruptions and the thermal profile simultaneously — 28.3 §10 — and more refresh means more drain-and-restart events, so a restart bug gets worse.
10. Self-Check
If you can do these without notes, you have the model rather than the sentence.
-
Derive the need for refresh from the cell structure in three causal steps, without using the word volatile.
-
Explain why a read and a refresh are the same operation, and state one performance consequence that follows from it.
-
Construct a refresh schedule that satisfies the average rate and misses a deadline. State the allowance you assumed.
-
Give three conditional answers in §7's three-part form — dependency, branch consequences, distinguishing observation — for scope, policy and temperature.
-
A refresh telemetry block reports zero pending obligations, zero overdue events and zero deadline misses. Give two completely different system states consistent with that report, and the one field that separates them.
-
Errors cluster near refresh. Write the two histograms whose shapes distinguish retention from a traffic-restart bug, and say which end of the window each peaks at.
11. Where This Goes
Refresh is the cheapest probe an interviewer has, and it is a probe rather than a fact question. A strong answer derives the obligation from one physical property, recognises that refresh is the restore a read already performs, treats the schedule as a bounded obligation rather than an event, and volunteers which parts are generation-specific.
Three results carry forward into the rest of this module. An average is not a bound — the same distinction reappears for bandwidth in 30.8 and for coverage closure in 30.9. A correlation is not a cause, which is 30.10's entire subject. And a clean instrument reading can be the signature of a dead instrument, which is the observation that separates senior answers across every chapter here.
Chapter 30.2 takes the next question, and it is the one where recall fails fastest. What is a row hit? has a one-sentence answer that almost everyone gives — and the third follow-up, does maximising row hits maximise system performance, has no correct short answer at all. It requires holding a scheduler, a second requester and a fairness argument in mind at once, which is why interviewers use it to separate candidates who have read about DDR from candidates who have reasoned about it.
Continue learning
Related tutorials
- Related topic
The Refresh Requirement
Leakage produces a rule about the passage of time rather than about any operation. What the maintenance operation actually does, why it costs device availability, and how a digital design tracks a deadline, arbitrates it against traffic, and proves it never silently drops the obligation.
- Related topic
Refresh Scheduling
The specification does not require refresh at every nominal interval. It publishes an explicit allowance for postponing and pulling in commands, with hard limits — and states that each pulled-in command reduces the number required later by one.
- Related topic
DRAM
The smallest practical way to store a bit, and what a system must accept in exchange. The one-transistor one-capacitor cell, why its charge leaks, why reading it destroys it, and why an access becomes a sequence rather than an operation — the three consequences the whole DDR standard exists to manage.
- Related topic
Charge Storage and Leakage
Charge on an isolated node is supposed to stay there, and no process improvement removes the paths it escapes through. What leaks, why loss of margin rather than a flipped bit is the real failure, why retention is a distribution, and how a physical certainty becomes a system obligation.
Standards & specifications
- Governing standard
- JEDEC JESD79 (DDR SDRAM)(opens JEDEC Solid State Technology Association in a new tab)
Defines the DDR SDRAM device itself — signals, command encoding, mode registers, timing parameters and the initialisation sequence — one document per generation. Memory-controller microarchitecture, address-mapping policy, PHY training algorithms and board-level design are not specified by it.
This page also covers RTL structure, verification approach and debugging technique. Those are engineering practice built on the standard, not requirements the standard itself imposes.
Where this fits
Part of the DDR curriculum.
