EE Primers · DDR Memory · Interactive

DRAM array simulator: write, read, precharge, refresh and leak, one stage at a time

A small DRAM bank laid out the way the silicon is organized. Four rows sit on horizontal wordlines and eight columns on vertical bitline pairs. A row decoder is on the left; the equalizers, sense amplifiers and column multiplexer are below. Choose an operation, then step through it stage by stage or play it at any speed. You can watch the voltage on every cell capacitor, every bitline and every control line as the bank:

The circuit in each column is the folded-bitline sense amplifier drawn on How DDR Memory Works. Values are representative: Cs = 15 fF, Cbl = 100 fF, VARY = 1.1 V, VPP = 2.5 V. Nanosecond operations and millisecond leakage run on separate time scales.

01 · Simulator

Drive the bank

Choosing an operation does not run it. Set it up, then use the control bar that floats at the bottom of the screen while you scroll:

  • Step runs one stage and stops.
  • Play all runs to the end.
  • Back, Start and the timeline let you replay any stage.
  • Speed sets how fast it animates.

An operation's effect on the cells and the log is applied when it reaches its end.

Set up the next operation

Operation
Row address
Column address
Data to write

Rows 0 and 2 store on BL, rows 1 and 3 on BLB (folded bitlines); a wordline crossing a bitline without a dot does not connect. Colors and marks:
  • Line color shows voltage: blue at 0 V, grey at VARY/2, amber at VARY.
  • Each cell's fill is its capacitor voltage.
  • The dashed mark in a cell is the voltage above which that column's sense amp sees it as charged.
  • The digit is the data a read would return now. While a row's wordline is up, that is the value its column's sense amp holds or is about to latch. Red means it no longer matches what was written.
  • The dashed outline marks the word the setup above addresses.
Legend: what each label means
Column

Command log

    02 · Stages

    What happens at each stage

    StageCommandWhat happens electricallySignalsTypical time
    Precharge / equalizePRE (end)Both bitlines of every column are shorted together and tied to VBLEQ = VARY/2. Coming from opposite rails, they meet at the midpoint by charge sharing between equal capacitances.EQ high; SAN = SAP = VARY/2tRP ≈ 14 ns
    Row decode, wordline riseACTEQ releases the bitlines. The row address (or, for REF, the refresh counter) is decoded and one wordline is driven to VPP, turning on every access transistor in that row.EQ low, WL → VPP~2–3 ns
    Charge sharingACTEach cell shares its charge with its own bitline: ΔV = (Vcell − VARY/2)·Cs/(Cs + Cbl), about ±72 mV for a full cell. The other bitline of the pair stays at VARY/2 as the reference. The cell is left near the midpoint: the read is destructive.own bitline moves~5 ns
    SensingACTSAN falls and each NMOS pair discharges the lower bitline; SAP rises and each PMOS pair lifts the higher one. A signal smaller than the latch's offset resolves the wrong way.SAN → 0, SAP → VARY~5 ns
    RestoreACT (until tRAS)The latched bitline, still connected through the open access transistor, drives the cell back to a full 0 V or VARY. All eight columns of the row now sit in the sense amps: the row buffer.WL high, latches holdingtRAS ≈ 32 ns
    Column readRDThe column decoder raises one CSL, which connects four of the eight sense amps (one word) through the column multiplexer to the four local I/O pairs, precharged high. In each pair the line on the side at 0 V discharges; the data path reads the difference.CSL high, LIO/LIOB splitCL ≈ 14 ns to pins
    Column writeWRWrite drivers force the LIO pairs to the new word. With CSL high they overpower the four selected latches, which flip wherever a bit changes. The other word's latches are untouched.CSL high, write drivers on~5 ns
    Write recoveryWR → PREThe latches, now holding the new data, keep driving their bitlines and charge or discharge the cells to full level.WL high, latches holdingtWR ≈ 15 ns
    Row closePRE (start)The wordline falls first, isolating each cell with its restored charge; then the sense amps turn off and EQ equalizes the bitlines.WL low, then SAN/SAP to mid, then EQpart of tRP
    Retention(none)With every wordline low, junction and transistor leakage drain each charged cell toward 0 V. Leakage roughly doubles for every 10 °C.nonespec: 64 ms, 32 ms above 85 °C
    RefreshREFThe device activates the row named by its refresh counter (sense and restore, as above), precharges it, and advances the counter. No data moves on the pins. Every row must be refreshed within the retention window.internal ACT + PREtRFC per REF, every tREFI
    03 · Experiments

    Things to try

    1 · Destructive read

    Watch a cell during ACT

    Write 1010 to row 0, word 0. Then choose ACT for row 0 and step through it. During Charge sharing, each cell and its bitline settle at a common voltage. The charged cells fall from 1.1 V to about 0.62 V and the empty ones rise from 0 V to about 0.48 V, either side of the 0.55 V reference. For that moment the data exists only as ±72 mV on the bitlines. The next two stages sense and restore them.

    2 · Whole-row sensing

    ACT senses all eight columns

    A read of word 0 still activates, senses and restores word 1's four cells: every column of the row passes through its sense amp. Column select only chooses which four reach the I/O lines. That is why an activate costs the same whichever word you read.

    3 · True and anti-cells

    A 1 is not always a charged cell

    Write 1111 to word 0 of row 0, then of row 1. Row 0's cells end at 1.1 V and row 1's at 0 V, because they sit on BLB. In rows 1 and 3 a stored 0 is the charged state, so leakage there turns a 0 into a 1.

    4 · Retention

    How long does charge last?

    Write 1111 to row 0, let 128 ms pass and read: still correct, with +22 mV of signal left against at most 15 mV of offset. The read also restored the row. Reset, write 1111 again and let 256 ms pass before reading: three of the four bits are lost. Reset, set 95 °C, write, wait 64 ms and read: the bits whose sense-amp offset works against a charged cell fail first. A misread is restored as the wrong value, so the data stays lost.

    5 · Refresh rate

    Why refresh doubles when hot

    At 95 °C, with auto-refresh at 1×, let 256 ms pass. A REF fires every 16 ms and cycles through the four rows, so each row is refreshed every 64 ms. That is longer than a hot cell lasts. Switch to 2× (each row every 32 ms) and repeat: nothing is lost.

    6 · Row hit and conflict

    Open-page behavior

    Run ACT on row 0, then RD twice: the second read is a row hit and needs no activate. Then try ACT on row 2. It is refused, because a bank can hold only one open row: PRE must come first. That extra PRE + ACT is the cost of a row conflict.

    04 · The model

    What is simulated, and what is simplified

    • Circuit. Each node relaxes toward the value driving it with a first-order time constant (0.3–1.4 ns). An access transistor's conductance rises with its wordline voltage, and the charge it moves is conserved between Cs and Cbl, so the charge-sharing result is exact for the chosen capacitances.
    • Sense amplifier. Each column decides when SAN fires: BL wins if VBL − VBLB exceeds that column's offset. The offsets are fixed multiples of the slider value: +0.8, −1, +1, −0.6 for columns 0–3 and −0.9, +0.7, −0.5, +1 for columns 4–7. The latch then drives the losing side toward SAN and the winning side toward SAP.
    • Data polarity. The data path is fixed: a 1 is BL high. Cells on BL (rows 0 and 2) are true cells and store a 1 as VARY. Cells on BLB (rows 1 and 3) are anti-cells and store a 1 as 0 V. Real devices differ in how they map data and addresses onto cells.
    • Leakage. Charged cells decay exponentially toward 0 V with τ = 300 ms (normal) or 110 ms (95 °C). Real cells have a wide spread of retention times, and the weakest few set the refresh requirement.
    • Refresh. With four rows, the 1× setting issues a REF every 16 ms and visits each row every 64 ms. A real bank has tens of thousands of rows, so refresh commands arrive every tREFI = 7.8 µs, each covering several rows.
    • Left out. Several parts of a real device are not modeled:
      • prefetch and the serializer;
      • wordline-to-bitline coupling;
      • isolation and offset-cancellation transistors;
      • the secondary sense amplifier;
      • the open-bitline layout most modern dies use;
      • the maximum time a row may stay open.
      The operation plot uses real nanoseconds; the animation speed is yours to set.
    05 · Self-check

    Questions

    Right after charge sharing, where does the stored data exist?

    Only as a ±72 mV difference between each column's two bitlines. The cells have been pulled most of the way to VARY/2. Until the sense amps latch and restore, a disturbance on the bitlines would destroy the data.

    Why must the wordline fall before EQ turns on during precharge?

    If EQ pulled the bitlines to VARY/2 while the wordline was still high, every cell in the row would be dragged to the midpoint and lose its data. Closing the wordline first isolates the restored charge.

    A refresh happens just after a charged cell has decayed below its threshold. What happens?

    The sense amp sees the cell as empty, and the restore writes a full empty level back. Refresh cannot recover data. It only preserves cells that are still readable, which is why the refresh interval must be shorter than the weakest cell's retention.

    Reading one 4-bit word: how many cells are activated and restored?

    All eight in the row. Activation senses and restores every column; column select then connects only the four columns of the addressed word to the I/O lines.

    Why is a 1 stored as 0 V in rows 1 and 3?

    Their cells hang on BLB, and the data path reads a 1 as BL high. Writing a 1 drives BLB low, which discharges the cell. These are anti-cells, the counterpart of the true cells on BL.

    06 · Further reading

    References

    1. B. Keeth, R. J. Baker, B. Johnson and F. Lin, DRAM Circuit Design: Fundamental and High-Speed Topics, 2nd ed., Wiley-IEEE Press, 2008: the array, sense amplifiers, true and complement cells, and refresh.
    2. B. Jacob, S. W. Ng and D. T. Wang, Memory Systems: Cache, DRAM, Disk, Morgan Kaufmann, 2008.
    3. JEDEC JESD79-4 and JESD79-5: refresh requirements and temperature-dependent refresh rates.
    ← The cell and sense amplifierDDR glossaryDRAM evolutionDDR3 →