WLNOTNOT0101QQSENSE AMP · WRITE DRIVERBLBL--read -01010101010101010101010101010101----DATA OUTROW DECODER01230101A1A000
Lit wire with moving dashes: it carries a 1Lamps: a glowing lamp holds 1, a dark one 0Dashed ring: the grid cell drawn large on the leftToken and pucks: the bit moving round the loop or along a lineStatic RAM. Left: one six-transistor cell drawn large: two inverters in a loop hold the bit, and two access transistors, opened by the word line, connect it to the bit lines. Right: a 4 × 4 array whose row decoder raises one word line at a time. In an array every cell of a row shares a word line and every cell of a column shares a bit line pair; a decoder turns an n-bit row address into exactly one of 2^n word lines (Harris and Harris, Digital Design and Computer Architecture, section 5.5). A DRAM cell is one transistor and one capacitor. The charge leaks, so DDR4 DRAM refreshes every row within 64 ms (JEDEC JESD79-4). SRAM needs no refresh but uses six transistors per bit, so it is used for caches and register files (Hennessy and Patterson, section 2.2). Both SRAM and DRAM are volatile: they lose their data when the power is switched off. Flash memory is the kind that keeps it.

Inside one cell

  1. SRAM means static random-access memory. It stores each bit in a cell of six transistors. The large drawing is one cell, blown up. The grid beside it is a small memory made of many cells; the ringed one is the cell drawn large.

Read, write, hold

The memory array

Tables and code

;; step 1/10 · one-bit
;; about: Cross-coupled inverters, Access transistors, Memory array
one SRAM cell = one bit

  2 inverters       4 transistors
  2 access doors    2 transistors
  ---------------------------
  total             6 transistors

random access: any cell can be
reached directly, in any order

A 6T SRAM cell is two cross-coupled CMOS inverters (two transistors each) plus two access transistors whose gates are the word line (Weste and Harris, CMOS VLSI Design, section 12.2). On a read both bit lines are precharged high; the side of the cell that holds 0 slowly discharges its bit line, and a sense amplifier detects the small difference. On a write the driver is strong enough to overpower the cell's weak pull-up transistors.