D6 · Lesson 8 · Memory devices
How a bit is stored as a latch, a charge on a tiny capacitor or charge trapped in a gate, the SRAM cell, the DRAM cell with its charge sharing, leakage and refresh, flash memory with several bits per cell, and the newer resistive and magnetic memories
A smartphone holds three very different kinds of memory, each a different physical way of keeping a bit. SRAM, inside the processor, is a pair of cross-coupled inverters that hold a 1 or 0 as long as power stays on: fast but bulky. DRAM stores each bit as a few femtocoulombs on a capacitor smaller than a bacterium, which leaks away and must be refreshed many times a second. Flash traps electrons in an insulated layer where they stay for years with the power off. Their trade-offs of speed, density, cost and persistence explain why computers have a memory hierarchy at all.
- A DRAM read: the cell's capacitor , charged to or 0, is connected to a bitline of capacitance precharged to . The charge shares, moving the bitline by .
- A sense amplifier must detect that small swing. Long bitlines (large ) and shrinking cells (small ) both shrink it.
- The readout gives the swing for = 1.1 V.
Predict
A 20 fF DRAM cell at 1.1 V shares its charge with an 80 fF bitline precharged to 0.55 V. How much does the bitline move?
The cell starts 0.55 V away from the bitline, and after sharing the bitline has moved by 0.55 × 20/(20 + 80) = 0.11 V. The sense amplifier, a latch balanced on the bitline pair, amplifies that 110 mV to a full logic level, which also writes the value back into the cell, since the read destroyed it.
Name it
SRAM
Six transistors: two cross-coupled inverters that hold the bit, and two access transistors connecting them to a pair of bitlines. Reads are fast and non-destructive; the cell needs no refresh but occupies about 100 to 150 F² (F being the feature size). It's used for caches and registers.
DRAM
One transistor and one capacitor, about 6 F². A read connects the cell to its bitline and shares charge, giving a swing of
The stored charge leaks away through the access transistor and junctions; the time for a leakage current I to droop the cell by ΔV is . Every row is therefore rewritten every 64 ms (refresh), spread out so that one of the rows is refreshed every .
Flash
A transistor with an extra, insulated gate (floating gate or charge-trap layer) under its control gate. Tunneling electrons onto it raises the threshold voltage; reading checks whether the transistor turns on at a given gate voltage. Packing threshold levels into a window stores b bits per cell: SLC 1, MLC 2, TLC 3, QLC 4, with the levels spaced by the window over . More bits per cell means less margin, slower writes and fewer program–erase cycles. 3D NAND stacks more than 200 layers of cells vertically.
Newer memories
- MRAM: a magnetic tunnel junction whose resistance depends on whether two magnetic layers are parallel.
- ReRAM and phase-change memory: a material switched between high and low resistance by forming filaments or by melting and crystallizing.
All are non-volatile and faster than flash, aiming to fill the gap between DRAM and storage.
Worked example
A 20 fF cell may droop by 0.3 V before it becomes unreadable. If it leaks 10 fA, how long does it hold? How often is each of 8192 rows refreshed?
Show the solution
- Retention time. comfortably beyond the 64 ms refresh period (worst-case cells at high temperature leak far more).
- Row refresh interval.
Answer the cell holds for 0.6 s, and one row is refreshed every 7.8 µs.
Worked example
A flash cell has a 6 V threshold window. How far apart are the levels for TLC and for QLC?
Show the solution
- TLC. It needs 8 levels, 7 gaps across the window:
- QLC. It needs 16 levels:
- Errors. Charge loss or noise of a few tenths of a volt then causes errors, which strong error correction (D4) handles.
Answer the levels are 0.86 V apart for TLC and 0.40 V apart for QLC.
Worked example
A 20 fF DRAM cell storing 1 V is connected to a 100 fF bit line precharged to 0.5 V. What signal does the sense amplifier see?
Show the solution
- Charge sharing.
- Signal. That's a swing of 83 mV above the precharge level.
- Bit-line length. Bigger bit lines would shrink it further, which is why DRAM arrays are cut into short segments.
Answer the sense amplifier sees 83 mV above the 0.5 V precharge.
Check
A 20 fF DRAM cell at 1.2 V shares charge with a 50 fF bitline precharged to . How far does the bitline move?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
Check
A 10 fF cell can droop 0.2 V before failing and leaks 100 fA. How long can it go between refreshes?
Write units the way you normally would: 1.5 s and 1500 ms are the same answer.
Check
A DRAM refreshes all 4096 rows every 32 ms, spread evenly. How often does it refresh a row?
Write units the way you normally would: 1.5 µs, 1500 ns and 0.0015 ms are the same answer.
Check
A flash cell has a 6 V threshold window and stores 2 bits. How far apart are its levels?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Check
A DRAM cell of 20 fF stores 1.2 V and shares charge with a 60 fF bit line precharged to half that.
(a)
How big a signal reaches the sense amplifier?
Write units the way you normally would: 1.5 mV, 1500 µV and 0.0015 V are the same answer.
(b)
How many electrons hold the 1?
Check
A flash cell has a 6 V threshold window and stores 2 bits.
(a)
How many levels must it distinguish?
(b)
How far apart are they?
Write units the way you normally would: 1.5 V, 1500 mV and 0.0015 kV are the same answer.
Explain why
Why does DRAM need refreshing while SRAM doesn't?
An SRAM cell holds its bit in two cross-coupled inverters, each driving the other's input, so any small disturbance is actively corrected by the transistors as long as power is applied: the stored state is regenerated continuously. A DRAM cell holds its bit as charge on a tiny capacitor isolated by an access transistor that is off, and no switch is perfectly off: leakage through the transistor and the junctions slowly drains or fills the capacitor. After long enough the voltage drifts past the point where the sense amplifier can tell a one from a zero, so every cell must be read and rewritten periodically, which is what refresh does.
Practice
Keep practicing
8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.