EE Primers · Memory · SRAM

How SRAM works: six transistors, two inverters, no refresh

Static RAM stores each bit in a pair of cross-coupled inverters. It holds its data for as long as power is applied, needs no refresh, reads without destroying the data and responds in nanoseconds or less. That is why every cache, register file and on-chip buffer is SRAM. This page builds an SRAM from the cell up: the 6T cell and its noise margins, how a read and a write work and why they fight over transistor sizing, the precharge, sense-amplifier, column-mux and write-driver blocks, the decoders, a complete asynchronous SRAM you can step through, its pin timing, and finally banking, soft errors and the variants used today. It parallels How DDR memory works, so the two can be compared block by block.

01 · The big picture

Where SRAM sits, and how it differs from DRAM

Both memories are arrays of cells on wordlines (rows) and bitlines (columns), with decoders on the edges and sense amplifiers at the bottom of each column. The difference is the cell. A DRAM cell is one transistor and a capacitor: tiny, but the charge leaks away and a read destroys it. An SRAM cell is a bistable latch, two inverters each driving the other's input, plus two access transistors. It is about twenty times larger, but it actively holds its state.

SRAM (6T)DRAM (1T1C)
StorageCross-coupled inverters (a latch)Charge on a capacitor
Cell area≈ 120–150 F²; about 0.02 µm² at 5 nm and 3 nm-class nodes≈ 6 F²
RefreshNone: holds data while poweredEvery 64 ms (32 ms hot)
ReadNon-destructive; small-swing differential bitlinesDestructive; must restore the row
Access timeSub-ns (on-chip) to ≈ 10 ns (discrete)≈ 15 ns tRCD + 15 ns CL
InterfaceFull address at once; no rows to open or closeRow (ACT), then column (RD/WR); banks, precharge
ProcessSame logic process as the CPUSpecial process (deep trench or stacked capacitors)
Standby powerLeakage of every cellRefresh plus leakage
Used forCaches, register files, FIFOs, FPGA block RAM, MCU RAMMain memory
An SRAM macro. Each row of cells hangs on a wordline driven by the row decoder. Each column has a bitline pair, BL and BLB, precharged at the top. A column mux at the bottom routes a few of those pairs to the sense amplifiers for reads and the write drivers for writes. The control block times all of it.
02 · The 6T cell

Two inverters holding each other, two doors to the bitlines

Inverter 1 (pull-up PU1, pull-down PD1) drives node Q. Inverter 2 (PU2, PD2) drives node QB. Each inverter's input is the other's output, so the pair has two stable states: Q = 1, QB = 0, or Q = 0, QB = 1. A third, balanced point exists where both nodes sit at the trip voltage, but it is unstable: any disturbance is amplified by the loop gain and the cell falls into one of the two stable states. This is the same regeneration as a DRAM sense amplifier, used here for storage.

The two access transistors PG1 and PG2 (pass gates) connect Q to BL and QB to BLB when the wordline WL is high. They are NMOS, because NMOS passes a low level well and has more drive per area. With WL low the cell is isolated and simply holds. It is static: the inverters keep refreshing the nodes, so no external refresh is needed.

Stored value
The 6T cell. Red nodes are high, blue nodes low. With Q = 1, PU1 and PD2 conduct and hold the state; PD1 and PU2 are off. The cross-coupling wires cross without connecting; the dots mark the gate connections.

Static noise margin: the butterfly curve

How hard is it to flip a cell that should be holding? Plot inverter 2's transfer curve, QB against Q, and on the same axes inverter 1's curve with the axes swapped. The two curves cross three times: at the two stable states and at the unstable middle point. Between them they enclose two "eyes", and the plot looks like a butterfly.

The static noise margin (SNM) is the side of the largest square that fits inside the smaller eye. It equals the largest DC noise voltage that can be added in series with both inverter inputs, in the worst direction, before the eye closes and the cell has only one stable state. Three conditions matter:

  • Hold (WL low): the widest eyes; this sets how low the standby supply can go.
  • Read (WL high, both bitlines precharged to VDD): the access transistor on the 0 side pulls that node up, which squashes the eyes. Read SNM is usually the binding constraint of a 6T cell.
  • Write: a margin of the opposite kind. The cell must lose its state. It is covered by the write simulator below.

Try lowering the cell ratio and watch the read eyes shrink while the hold eyes barely change. Then add mismatch: real cells never have two identical inverters, because random dopant fluctuation and line-edge roughness give every transistor its own threshold. The spread follows Pelgrom's law:

$$\sigma_{V_T}=\frac{A_{VT}}{\sqrt{W L}}$$

SRAM transistors are the smallest on the die, so they have the largest σVT (tens of millivolts). A 32 Mb cache needs every one of its 32 million cells to work, which means designing for about 5.5 to 6 σ. The calculator below shows how array size sets the required margin.

Standby and the data retention voltage

With no access in progress, the only cost of holding data is leakage, which falls steeply with supply voltage. Caches and MCU RAMs therefore lower the array supply in standby. A cell stays bistable down to a surprisingly low voltage, where its inverters are in subthreshold but still have a loop gain above one. The lowest supply at which every cell in the array keeps its data is the data retention voltage (DRV). It is set by the worst-case mismatched cell, not the typical one.

03 · Reading

Discharge one bitline, without flipping the cell

  1. Precharge. BL and BLB are pulled to VDD and equalized, then released to float.
  2. Wordline on. WL rises. Suppose Q = 0. Then PG1 and PD1 form a path from BL to ground, and BL starts to discharge at the cell read current Iread. On the other side, QB = VDD and BLB = VDD, so no current flows and BLB stays high.
  3. Develop. The split BLB − BL grows linearly: about 100 mV after CBL · 0.1 V / Iread, which is typically 50–200 ps on chip.
  4. Sense. A sense amplifier turns that split into a full-swing bit. The wordline then turns off and precharge restores the bitlines. The cell was never discharged, so nothing has to be written back.

Reading only ever uses a small swing, on purpose. A full swing would cost time and energy, because the bitlines are long and heavily loaded. That is why every SRAM read needs a sense amplifier.

The read-disturb problem. While BL discharges, node Q is not at 0 V. It sits at the voltage set by the divider of PG1 (from the bitline at VDD) and PD1 (to ground):

$$\beta_{PD}\left[(V_{DD}-V_T)\,V_Q-\tfrac{1}{2}V_Q^2\right]=\tfrac{1}{2}\,\beta_{PG}\,(V_{DD}-V_Q-V_T)^2,\qquad CR=\frac{\beta_{PD}}{\beta_{PG}}$$

If VQ rises past inverter 2's trip point, inverter 2 flips QB low, the cell latches the other way, and the read has destroyed the data. Keeping the bump low requires a pull-down stronger than the access transistor. The cell ratio CR = βPD/βPG is typically 1.5–2.5 in planar cells. FinFET cells set the ratio by fin count instead: 2 PD fins to 1 PG fin in high-current cells, and 1:1 in the densest cells, which then rely on threshold-voltage tuning and assists.

How long can a bitline be? Every cell in a column adds junction and wire capacitance to its bitline, slowing the read. Every unselected cell also leaks a little through its off access transistor. In the worst case, all of them leak onto the bitline that should stay high, which eats into the differential the selected cell is trying to build.

$$t_{\text{develop}}=\frac{C_{BL}\,\Delta V}{I_{\text{read}}-I_{\text{leak}}},\qquad I_{\text{leak}}\approx (N-1)\,\frac{I_{\text{read}}}{I_{on}/I_{off}}$$
04 · Writing

Overpower the pull-up, then let the latch finish

  1. Drive the bitlines. The write driver pulls one bitline of the pair to 0 V: BL to write a 0, BLB to write a 1. The other stays at VDD.
  2. Wordline on. Suppose the cell holds Q = 1 and we write a 0. PG1 now connects Q to a 0 V bitline, while PU1, which is on because QB = 0, tries to hold Q at VDD.
  3. Win the fight. If PG1 is stronger than PU1, Q is pulled below inverter 2's trip point. Inverter 2 then raises QB, which turns PU1 off and PD1 on, and the positive feedback completes the flip in tens of picoseconds.
  4. Wordline off. The cell now holds the new value by itself.

A write therefore needs a weak pull-up relative to the access transistor. The pull-up ratio PR = βPU/βPG is typically below 1. PMOS has lower mobility, which helps. The usual figure of merit is the write margin: the highest bitline voltage at which the cell still flips. The larger it is, the more robustly the cell can be written.

The sizing conflict

The access transistor appears in both requirements, pulling in opposite directions. Reads want it weak compared with the pull-down; writes want it strong compared with the pull-up. The resulting ordering is PD > PG > PU. As the supply drops and variation grows, the window between the two failures closes. That is why modern SRAMs add assists:

  • Wordline underdrive on reads weakens PG.
  • Negative bitline on writes drives BL slightly below ground, strengthening PG.
  • Cell-supply collapse during writes weakens PU.

Each assist moves one curve without touching the other.

05 · Block by block

The column periphery, isolated

1 · Precharge and equalize

Three PMOS transistors per column pair, all gated by the active-low PRE#:

  • P1 pulls BL to VDD, and P2 pulls BLB to VDD.
  • P3 shorts BL to BLB, so the two lines are equal even before they reach VDD. A residual difference at the next wordline would look like a signal.

They are PMOS because the target is VDD, which PMOS passes without a threshold drop. Unlike DRAM, which precharges to VARY/2, an SRAM precharges to the full supply: reads discharge only one line, and the cell's NMOS pull-down is good at pulling down.

Precharge and equalize. PRE# is low between accesses and goes high just before the wordline rises.

2 · Column multiplexer

Cells are far narrower than a sense amplifier, and a wordline can hold hundreds of bits when a read wants only 32 or 64. So 4, 8 or 16 adjacent column pairs share one sense amp and one write driver through a mux driven by the low address bits:

  • Read mux: PMOS pass gates, which pass levels near VDD well, where read bitlines sit.
  • Write mux: NMOS pass gates, which pass the 0 V the write driver needs to deliver.

The mux ratio also sets the interleave: bit i of a word sits in every k-th column. That helps against soft errors (section 08). The unselected columns on an active wordline still discharge, because they are half-selected: their cells see a read, which costs energy and must not disturb them.

A 4:1 read mux. The decoded Yi# (active low) turns on one PMOS pair, which connects that column to the read data lines RDL/RDLB at the sense amplifier. A matching NMOS mux on WYi connects the write driver for writes.

3 · Sense amplifier

The most common SRAM sense amp is a latch-type (voltage-mode) amplifier: a cross-coupled inverter pair, MP1/MN1 and MP2/MN2, with its sources tied to a tail transistor gated by SAE. Before SAE, the PMOS isolation devices let the bitline split onto the latch nodes SA and SAB. When SAE rises:

  • The isolation devices turn off, so the latch drives only its own few femtofarads rather than the bitlines.
  • The tail turns on, and the pair regenerates the small split into full-rail logic levels.

The steps are the same as the DRAM latch (Cbl·dΔV/dt = gm·ΔV), with a much smaller capacitance, so it resolves in tens of picoseconds. Its offset, from the mismatch between MN1 and MN2, sets the minimum bitline split, and with it the read timing.

A latch-type sense amplifier with PMOS isolation. Red and blue show the state for BL lower than BLB: SA resolves low and SAB high.

4 · Write driver

Two strong NMOS pull-downs, one per bitline, each gated by write-enable ANDed with the data or its complement. Writing a 0 discharges BL to ground through the write mux, and writing a 1 discharges BLB. The precharged opposite line stays at VDD. The driver must be strong enough to discharge the bitline quickly and hold it near 0 V through the mux resistance while PG fights PU. That is what the write-margin simulation above tests. A negative-bitline assist adds a boost capacitor that kicks the driven line slightly below ground at the moment the wordline rises.

Write driver. Only one side conducts, chosen by the data bit.

5 · Self-timing: when to fire SAE

The wordline must stay on long enough to develop the bitline split, and SAE must not fire before it. Both depend on the cell read current, which varies with process, voltage and temperature. A fixed delay chain made of logic gates tracks them poorly.

SRAMs therefore use a replica bitline: a dummy column, loaded like a real bitline, driven by a few dummy cells that always discharge it. It is sized so that it crosses a logic threshold just as a real bitline reaches the target split. The replica's output fires SAE and ends the wordline pulse. Slow silicon slows both the real and the replica bitline, so the timing tracks.

06 · A complete SRAM

Step through an asynchronous SRAM: read and write

A discrete asynchronous SRAM, such as a 4 Mb 10 ns part, has no clock. It has three control pins, all active low:

  • CE#: chip enable, which selects the device.
  • WE#: write enable.
  • OE#: output enable, which turns on the DQ drivers.

There is one address pin per address bit, and data pins DQ. Unlike DRAM, the whole address arrives at once: there is no row to open and no precharge for the controller to schedule. Internally the steps are the ones above. Address-transition detection (ATD) and the timing block generate the wordline pulse, precharge, SAE and write-enable internally.

The figure is an 8 × 8 array organized as 2 words of 4 bits per row. The two words are interleaved across the columns: word 0 uses even columns and word 1 odd columns. A3–A1 select the row and A0 selects the word through a 2:1 column mux.

Operation
Row A3–A1 Word A0
Write data DQ3–DQ0
Below the array, each bitline is labelled H (held at VDD), ↓ (discharging during a read) or 0 (driven low by a write driver). Column labels give word and bit: w1 b2 is bit 2 of word 1. The selected word is outlined. Completing a write stores the data, so a following read returns it. Internal signals are shown under the pins.

Read and write cycles on the pins

  • Read. WE# stays high. Data appears tAA after the address is stable, tACE after CE# falls and tDOE after OE# falls, whichever comes last. A new address simply starts a new read. The old data stays valid for tOHA and then changes to the new word. There is no precharge command and no tRP: the device precharges itself inside each cycle.
  • Write (WE#-controlled). The address must be stable tSA before WE# falls and remain so until tHA after it rises (tAW overall). The data is captured at the rising edge of WE#: it must be valid tSD before that edge and held tHD after. OE# is held high so that the device does not drive DQ against the incoming data.
Read cycle, with CE# and OE# controlling the output.
WE#-controlled write cycle. In a CE#-controlled write, CE# rising ends the cycle instead.
$$t_{\text{data valid}}=\max\left(t_{\text{addr}}+t_{AA},\;t_{CE}+t_{ACE},\;t_{OE}+t_{DOE}\right)$$
07 · Decoders

From address bits to one pulsed wordline

SRAM decoders work exactly like DRAM ones. Each address bit is distributed as a true and a complement line, and one AND term per row is high for exactly one address. Three things are particular to SRAM:

  • The wordline is a pulse. Its enable comes from the timing block, and it ends when the replica bitline says the split is ready. That bounds the bitline discharge, and with it the energy of every half-selected column.
  • The wordline is not boosted. An SRAM access transistor only has to pass a 0 (on the discharging side), so the wordline runs at VDD. Read-assist designs even pull it slightly below VDD.
  • Speed matters more than density. On-chip caches run at the processor clock, so the decoder is the start of the critical path. Designs use NAND-NOR predecoding, sized for minimum delay with logical effort, and sometimes dynamic (precharged) gates.
Row address
A 3-to-8 row decoder. Red wires are high and blue wires low. EN is the wordline pulse from the timing block. Click a gate or a wordline to jump to that address.
08 · Many arrays

Sub-arrays, divided wordlines, banks, soft errors and bursts

A real SRAM macro is not one big array. Short bitlines are fast and leak little, and short wordlines are fast and waste little energy on half-selected columns. A large memory is therefore tiled from many sub-arrays, typically 128–512 rows by 128–256 columns. The address splits into fields:

  • Some bits pick the sub-array (block select).
  • Some pick the row within it.
  • The lowest bits drive the column mux.

Only the selected sub-array is activated. This is the same idea as DRAM banks. The difference is that SRAM sub-arrays are not left with an open row, so there is no row hit or conflict to manage.

  • Divided (hierarchical) wordline. A global wordline runs across all blocks. A local wordline in each block fires only when that block is selected: an AND of the global wordline and block select. Only the columns holding the wanted word discharge.
  • Banks. Caches split into independently accessible banks, selected by low address bits, so that two or more accesses can proceed in the same cycle without true multi-port cells. Two accesses to the same bank conflict, and one must wait.
  • Multi-port cells. When conflicts are not acceptable, as in register files, the cell itself gets more ports. The 8T cell adds a two-transistor read stack, with its own read wordline and read bitline, that never touches Q. Read SNM then equals hold SNM, and the write port can be sized for writability alone. Dual-port 8T cells add a second PG pair and wordline.

Soft errors, column interleaving and ECC

An alpha particle from packaging materials, or a secondary from a cosmic-ray neutron, can deposit enough charge on a storage node to flip a cell. As cells shrink, one strike increasingly upsets several adjacent cells along a wordline: a multi-bit upset. Caches protect each word with SECDED ECC, for example 8 check bits per 64 data bits, which corrects one flipped bit and detects two. They also interleave the words across columns, so that physically adjacent cells belong to different words. A strike up to k cells wide then causes at most one error per word, which ECC corrects. The column mux ratio is what provides this interleave.

Interleave Strike width
Four 8-bit words on one wordline, each protected by its own SECDED code. Colour identifies the word. Struck cells are outlined in red.

Synchronous SRAM and bursts

Discrete fast SRAMs and almost all embedded macros are synchronous: address, control and write data are registered on a clock edge.

  • Flow-through parts return read data in the same cycle, combinationally after the address register.
  • Pipelined parts add an output register, which costs one cycle of latency and allows a much higher clock.
  • ZBT/NoBL parts remove the idle cycle between a write and a read on the shared data bus.
  • QDR parts have separate read and write ports, each double-data-rate, so reads and writes run at full speed at the same time. They are used in network packet buffers.

Like SDRAM, synchronous SRAMs offer burst reads and writes. An internal 2-bit counter steps through four addresses from one external address, in linear or interleaved order. Interleaved order is the XOR pattern used by some processor cache-line fills, and it matches the DDR interleaved burst order:

TypeInterfaceTypical use
AsynchronousCE#, WE#, OE#, full address, no clockMCU external RAM, battery-backed memory
Synchronous flow-through / pipelinedRegistered inputs; output register adds one cycleOlder cache SRAMs, buffers
ZBT / NoBLNo idle cycles at read–write turnaroundNetworking, packet buffers
QDR-II/II+/IVSeparate read and write ports, DDR on eachNetwork lookup tables, line cards
Embedded macro (compiler)CLK, CEN, WEN, A, D, Q, bit-write maskCaches, register files, FIFOs inside SoCs and FPGAs
09 · In practice

FinFET cells, assists and what limits scaling

  • Quantized widths. In FinFET processes a transistor's width is a whole number of fins, so the ratios come in steps. The usual cells are described by their PU:PG:PD fin counts: 1:1:1 for high density, and 1:2:2 for high current, which is faster but larger. With CR = 1 in the dense cell, read stability comes from threshold-voltage tuning of the devices and from assists, not from transistor ratio.
  • Assists, applied only when needed:
    • Wordline underdrive and raised cell supply for reads.
    • Negative bitline and cell-supply collapse for writes.
    They let the 6T cell work at lower VDD, but each costs a little area and energy in the periphery.
  • Vmin. The lowest supply at which the whole array reads and writes correctly is usually higher for SRAM than for the logic around it, because of the cell's sizing conflict and its large σVT. Chips often give SRAM its own rail for this reason.
  • Scaling. The SRAM bit cell has shrunk much less than logic at recent nodes: about 0.021 µm² at both 5 nm and 3 nm-class processes. A growing share of a modern processor die is cache. That is one driver for chiplet designs and for stacking extra cache dies on top of compute dies.
  • Redundancy and repair. As in DRAM, macros include spare rows and columns, with fuse-programmed address comparators in the decoders, to repair cells that fail test.
10 · Self-check

Questions

Why does an SRAM read not need a write-back, while a DRAM read does?

The SRAM cell is a latch: its inverters keep driving Q and QB during the read, so the bitline current comes from the supply through PD, not from stored charge. DRAM shares the cell's only charge with the bitline, destroying it.

Reads want a weak access transistor; writes want a strong one. How do designs get both?

By sizing PD > PG > PU, so PG loses to PD (reads are safe) but beats PU (writes work), and by assists that change the balance only during the operation that needs it: wordline underdrive for reads, negative bitline or cell-supply collapse for writes. Or by an 8T cell that separates the read path entirely.

Why are bitlines precharged to VDD in SRAM but to VARY/2 in DRAM?

An SRAM cell actively discharges one line through its NMOS pull-down, so starting high and sensing a small drop is natural. A DRAM cell must push the bitline either up or down by sharing charge, so the reference must sit in the middle.

What sets the earliest time SAE may fire?

The bitline split must exceed the sense amplifier's offset (with margin for noise) in the slowest cell. Since both the cell current and the offset vary, a replica bitline is used to fire SAE at the right moment over process, voltage and temperature.

A 64-bit word is stored with SECDED and 4-way interleaving. A strike flips 3 adjacent cells. What happens?

The three cells belong to three different words, each of which sees one flipped bit, and ECC corrects all three.

Why do half-selected cells matter during a write?

They share the active wordline but their bitlines are still precharged, so they undergo a read. They must have enough read stability not to flip, and they cost bitline energy. Divided wordlines reduce how many there are.

11 · Further reading

References

  1. E. Seevinck, F. J. List and J. Lohstroh, "Static-noise margin analysis of MOS SRAM cells," IEEE J. Solid-State Circuits, vol. 22, no. 5, 1987.
  2. J. M. Rabaey, A. Chandrakasan and B. Nikolić, Digital Integrated Circuits: A Design Perspective, 2nd ed., Prentice Hall, 2003, ch. 12.
  3. N. H. E. Weste and D. M. Harris, CMOS VLSI Design, 4th ed., Addison-Wesley, 2010, ch. 12.
  4. A. Pavlov and M. Sachdev, CMOS SRAM Circuit Design and Parametric Test in Nano-Scaled Technologies, Springer, 2008.
  5. M. J. M. Pelgrom, A. C. J. Duinmaijer and A. P. G. Welbers, "Matching properties of MOS transistors," IEEE J. Solid-State Circuits, vol. 24, no. 5, 1989.
  6. R. C. Baumann, "Radiation-induced soft errors in advanced semiconductor technologies," IEEE Trans. Device and Materials Reliability, vol. 5, no. 3, 2005.
  7. Infineon (Cypress) and Renesas (IDT) asynchronous and synchronous SRAM data sheets for pin timing definitions.