| SRAM ("faucet") | DRAM ("leaky bucket") | |
|---|---|---|
| Cell | 4–6 transistors | 1 transistor + 1 capacitor (trench/stacked) |
| Read | Non-destructive | Destructive (charge sharing): rewrite every read |
| Refresh | None | Every few milliseconds |
| Address pins | Separate row/column | Time-multiplexed |
| Optimized for | Speed, then density | Density, then speed |
DIMM → Rank → Chip → Bank → Array → Cell
Each step ~15–20 ns. DDR: data pins transfer on both clock edges (200 MHz clock → 400 Mb/s per pin), array physics unchanged.
| Package | How | Bandwidth |
|---|---|---|
| DIMM | Chips share clock/control/address (~7 + ~12 pins); data pins combined, e.g. 16 × 4-bit = 64-bit bus | – |
| On-package DRAM (Apple M1, 2020) | Two DRAM chips on the SoC package, 128-bit bus at 4.2 Gb/s/pin | $\frac{128 \times 4.2}{8} = 67.2$ GB/s |
| HBM2 (2.5D, NEC SX-Aurora) | Stacked DRAM on a silicon interposer; 6 × 1,024-bit channels at 1.6 Gb/s/pin | $\frac{6 \times 1024 \times 1.6}{8} \approx 1.2$ TB/s |
| Address tag | Data block |
|---|---|
| 100 | copy of 100, 101, … |
| 304 | copy of 304, 305, … |
| 6848 | … |
| 416 | … |
Read algorithm
Where can the block go, and which line does it replace?
A[0], A[1], A[2], A[3] in a loop shows which locality?
Memory blocks 0–31, cache of 8 blocks. Where can block 12 go?
Tag | Index | Offset; key = (tag, index)16 KB direct-mapped cache, 64-byte blocks, 32-bit byte addresses
[5:0] offset)[13:6] index)[31:14])Same cache, 2-way: 128 sets ⇒ k = 7, t = 19, b = 6
0, 0, 0 → victim W00 (away from left half)1 (toward W3)block address (32−b) | offset (b)[31 : 32−k]?