SRAM Design
Memory Technology · Hardware Foundations track
11 min read
In this module
The Memory That Runs at CPU Speed
Every instruction fetch, every cache read — that's Static RAM (SRAM) doing the work. It's the fastest memory technology in widespread use. L1 caches turn around data in 1-2 nanoseconds, keeping pace with the pipeline itself. Look at SRAM at the transistor level and you'll see why caches end up small, fast, and thirsty for power compared to main memory.
The 6T SRAM Cell
The standard SRAM cell uses six transistors (6T) arranged as two cross-coupled CMOS inverters plus two access transistors.
Cross-Coupled Inverters
Each CMOS inverter consists of one PMOS pull-up transistor and one NMOS pull-down transistor. The two inverters are connected back-to-back: the output of inverter A drives the input of inverter B, and the output of inverter B drives the input of inverter A.
This cross-coupling creates a bistable latch. The circuit has exactly two stable states:
- State 0: Node Q is low, Node Q-bar is high
- State 1: Node Q is high, Node Q-bar is low
If Q is high, inverter B sees a high input and drives Q-bar low. Inverter A then sees that low Q-bar and drives Q high, reinforcing the original state. Any small perturbation gets pulled back by the feedback loop. That's why SRAM holds its data as long as you keep the power on.
Access Transistors
The remaining two transistors are NMOS access transistors. Their gates connect to the word line (the row select signal). When the word line is low, the access transistors are off and the cell sits in isolation from the bit lines, latch undisturbed. Pull the word line high and those transistors switch on, wiring Q and Q-bar to the bit line (BL) and bit line bar (BLB).
Read Operation
Reading a 6T SRAM cell involves three steps:
-
Precharge: both bit lines are precharged to VDD (or VDD/2 in some designs), equalising them before the read begins.
-
Word line assertion: the word line goes high, turning on both access transistors. The internal nodes connect to the bit lines.
-
Sense amplification: the cell creates a small voltage difference between BL and BLB. Both lines start precharged high. If the cell stores a 1 (Q high, Q-bar low), BL stays near the precharge level while Q-bar, through its access transistor and pull-down, drags BLB slightly lower. The sense amplifier detects this differential (often just 50-100 mV) and amplifies it to a full logic level.
During a read, the access transistor and the pull-down NMOS of each inverter form a voltage divider. If the pull-down transistor is too weak relative to the access transistor, the voltage on the low-side internal node can rise enough to flip the cell - a read disturb. The ratio of pull-down strength to access transistor strength is called the cell ratio (or beta ratio), and it is typically kept above 1.5 to ensure read stability. This is a fundamental constraint on SRAM cell sizing.
Write Operation
Writing follows a similar pattern but actively drives the bit lines:
-
Drive bit lines: the write driver forces BL and BLB to complementary values. To write a 1, BL is driven high and BLB is driven low.
-
Word line assertion: the access transistors open, connecting the driven bit lines to the internal nodes.
-
Overpower the latch: the write driver must be strong enough to overpower the cross-coupled inverters and flip the cell to the new state. The ratio of access transistor strength to pull-up PMOS strength (the pull-up ratio) determines how easily the cell can be written.
Tension lives in the heart of the cell. Strong pull-downs improve read stability but make writes harder. Weak pull-ups make writes easier and chew into noise margins. Designers know this trade-off as the read-write conflict, and it's the central headache of 6T SRAM.
The cell below runs both operations at the logic level. Press Read a few times and watch the word line go high while the stored bit stays put: the latch restores itself, so a well-sized 6T cell never needs rewriting after a read. Write drives the bit lines first and then raises the word line to flip it. The DRAM tab is a preview of the next lesson, where reading is a much less polite affair.
Memory Cell Operation
The 6T SRAM cell uses two cross-coupled inverters to hold a stable bit value. Reading asserts the word line and detects a small voltage difference on the bit lines via sense amplifiers. Writing drives the bit lines to the desired value before asserting the word line. SRAM retains data as long as power is supplied, with no refresh needed.
SRAM Array Organisation
An SRAM array is organised as a two-dimensional grid:
- Rows correspond to word lines. Each word line controls all cells in that row.
- Columns correspond to bit line pairs (BL and BLB). Each column has its own sense amplifier.
A row decoder turns the row address into a one-hot signal, activating exactly one word line. When that word line fires, every cell in the row hooks up to its bit line pair. The column multiplexer then picks the subset of columns to read or write from, using the column address.
Banked and Divided Arrays
Large SRAM arrays are split into sub-arrays (or banks) for several reasons:
- Speed: shorter bit lines have less capacitance, allowing faster sensing.
- Power: only the accessed sub-array activates its word line and sense amplifiers, saving dynamic power.
- Yield: smaller arrays are less susceptible to single-defect failures.
A typical L1 cache might be divided into 4-8 sub-arrays, each covering a portion of the address space.
8T and 10T Cells
The read-write conflict of the 6T cell has motivated alternative designs. It's got harder at FinFET nodes, where transistor width comes in whole fins, so designers can't nudge the beta ratio by a few percent; they pick 1, 2 or 3 fins. That's one reason SRAM cell area has nearly stopped shrinking at N3-class nodes, and why the minimum operating voltage (Vmin) of the SRAM often sets the floor for the whole chip.
In practice, most high-density caches keep the 6T cell and add assist circuits instead: write assist (briefly lowering the cell supply or driving a bit line below ground so writes win) and read assist (slightly lowering the word-line voltage so reads can't flip the cell).
8T SRAM Cell
The 8T cell bolts on a dedicated read port with two extra transistors: a read access transistor gated by a dedicated read word line, and a read driver whose gate connects to the stored node. During a read, the main cell sits fully isolated from the bit lines. The read path only ever sees the stored value through the read driver, killing read disturb dead.
You pay for that in area. As a rule of thumb, 8T cells run roughly 30% larger than 6T, though the real figure depends on the process and layout. They do open up operation at lower supply voltages (better power efficiency), since the cell no longer needs to be sized for read stability.
10T Cells
10T designs add both a separate read port and a separate write port, fully decoupling the read and write paths. Some 10T variants throw in differential read for better noise margins. You'll find them in ultra-low-voltage designs and in register files where sub-threshold reliability matters most.
| Cell Type | Transistors | Read Disturb | Area Overhead | Typical Use |
|---|---|---|---|---|
| 6T | 6 | Possible (sizing-dependent) | Baseline | L1/L2/L3 caches |
| 8T | 8 | Eliminated | ~30% larger (typical) | Low-voltage caches, IoT |
| 10T | 10 | Eliminated | ~60% larger (typical) | Register files, sub-threshold designs |
SRAM in Caches: Tag Array vs Data Array
A set-associative cache contains two distinct SRAM structures:
Tag array: stores the tag portion of cached addresses. Every access reads the tag array and compares it against the requested address to call hit or miss. The tag array is typically much narrower (20-30 bits per entry) but has to be blisteringly fast, since it sits on the critical path of every memory access.
Data array: stores the actual cache line data (typically 64 bytes per line). Wider, and allowed to run a touch slower, since the tag comparison decides whether the data was needed at all.
In a direct-mapped or low-associativity cache, the tag and data arrays can be read in parallel. The data is speculatively forwarded to the pipeline while the tag comparison completes. If the tag matches (hit), the data is already available. If not (miss), the speculative data is discarded. High-associativity caches often read tags first to select the correct way before reading data, saving energy at the cost of an extra cycle.
Way Prediction and Serial Access
High-associativity caches (8-way or 16-way) face a choice:
- Parallel access: read all ways simultaneously from the data array, then use the tag match to select the correct one. Fast but power-hungry (reads N ways, uses one).
- Serial access: read tags first, determine the matching way, then read only that way from the data array. Slower (two sequential reads) but saves significant energy.
- Way prediction: predict which way will hit based on history, read only that way speculatively, and verify with the tag. If the prediction is correct (typically 85-95% of the time), the access completes in one cycle. Mispredictions incur a one-cycle penalty for re-access.
Power Considerations
SRAM power consumption has two components:
Dynamic power: consumed during read and write operations when bit lines charge and discharge. Proportional to the number of bit lines toggling and the switching frequency.
Static (leakage) power: current that trickles through transistors even when the cell is idle. At modern nodes (7 nm and below) leakage is a large share of total SRAM power, and for big, mostly idle caches it can be the biggest; how big depends on the process, threshold-voltage choices and how busy the array is. Common counters: power gating (cutting supply to idle sub-arrays), high-threshold-voltage transistors for storage nodes, and voltage scaling in standby mode.
For large L3 caches — tens of megabytes of SRAM — leakage becomes a real constraint. Some processors power-gate portions of L3 that aren't in use, effectively trading cache capacity for power savings.
Process Variation and Reliability
At advanced process nodes, transistor dimensions vary from cell to cell due to manufacturing imprecision. These variations affect:
- Read stability: a cell with a slightly weaker pull-down transistor is more susceptible to read disturb.
- Write ability: a cell with a stronger pull-up is harder to overwrite.
- Sense margin: variation in matched pairs within the sense amplifier degrades its ability to detect small voltage differences.
Designers fight variation with redundancy (spare rows and columns swapped in for defective ones), larger cell sizing (paid for in density), and adaptive body biasing (post-manufacture tweaks to transistor threshold voltages to compensate for variation).
SRAM arrays are the densest regular structures on a chip. Chip manufacturers use SRAM bit cell area as a benchmark for process density. When a foundry advertises a new node (such as 3 nm), the SRAM cell area is one of the key metrics - smaller cells mean more cache per unit area, directly translating to processor performance.