SRAM Cells and Sense Amplifiers
Read and write a 6T SRAM cell, and see why its transistors are sized in a fixed order of strength. Then sense a small bit-line split with a latch.
You Will Be Able To
- Describe hold, read and write in a 6T SRAM cell.
- Explain read stability and write ability, and the sizing ratios behind them.
- Read a static noise margin from a butterfly plot.
- Explain how a latch-type sense amplifier turns a small split into a full level.
- Lesson
- G9.16
- Time
- 35 min
- Runs on
- ngspice
- Check
- 5 questions
A memory block failed one read in a million at low voltage. Each failure flipped the cell it was reading. Writes were fine. The fix was not in the logic, but in three transistor widths.
- I/O
- Device
- Storage
- Data
- Hold: wl = 0
The access transistors are off. The two inverters hold each other: q = 0 and qb = 1 here.
- Read: wl = 1
Both bit lines start at VDD. AX1 connects bl to q = 0, and bl discharges through AX1 and the pull-down PD1. The 0 node is pulled up a little: 154 mV with a cell ratio of 2.
- Write: wl = 1, bl driven low
To write, a strong driver pulls one bit line to 0. Its access transistor must pull the 1 node down against that side's pull-up until the inverters flip.
Read the diagram as text
- Bit line bl: precharged to VDD
- AX1: access NMOS, gate wl
- q: PU1 and PD1
- qb: PU2 and PD2
- AX2: access NMOS, gate wl
- Bit line blb: precharged to VDD
- Bit line bl → AX1
- AX1 → q
- q → qb: each drives the other
- qb → AX2
- AX2 → Bit line blb
Six transistors per bit. Read stability needs the pull-down stronger than the access device; write ability needs the access device stronger than the pull-up.
Read Stability
In a read both bit lines start at VDD. The word line turns on both access transistors. On the 0 side, the bit line discharges through the access transistor and the pull-down in series. The 0 node rises to where they balance.
| Sizing | Highest 0-node voltage | Bit line falls 100 mV after | Bit line 1 ns after the word line |
|---|---|---|---|
| cell ratio 2: pull-down 1 µm, access 0.5 µm | 154 mV | 41.9 ps | 0.01 V |
| cell ratio 1: pull-down 0.5 µm, access 0.5 µm | 309 mV | 50.6 ps | 0.07 V |
Measured: the lab, 50 fF bit lines precharged to 1.8 V, pull-up 0.42 µm in both.
If the bump reached the switching threshold of the other inverter, the read would flip the cell. The cell ratio, pull-down width over access width, keeps it low.
- v(q2h), ratio 2, hold
- v(q2r), ratio 2, read
- v(q1r), ratio 1, read
- v(q1h), ratio 1, hold
Read the plot as a table
| Input | v(q2h), ratio 2, hold | v(q2r), ratio 2, read | v(q1r), ratio 1, read | v(q1h), ratio 1, hold |
|---|---|---|---|---|
| 0 V | 1.8 V | 1.8 V | 1.8 V | 1.8 V |
| 200 mV | 1.8 V | 1.8 V | 1.8 V | 1.8 V |
| 400 mV | 1.8 V | 1.8 V | 1.8 V | 1.8 V |
| 600 mV | 1.788 V | 1.788 V | 1.794 V | 1.794 V |
| 800 mV | 462.4 mV | 898.4 mV | 1.18 V | 1.179 V |
| 1 V | 6.182 mV | 599.5 mV | 732.7 mV | 14.02 mV |
| 1.2 V | 319.7 µV | 352.4 mV | 576.5 mV | 730.4 µV |
| 1.4 V | 15.78 µV | 227.9 mV | 445.4 mV | 36.66 µV |
| 1.6 V | 725.1 nV | 183.3 mV | 360.2 mV | 1.709 µV |
| 1.8 V | 13.35 nV | 159.7 mV | 317.4 mV | 31.87 nV |
Measured with ngspice 42 on SKY130, 1.8 V. The butterfly of the cell is this curve and its mirror in the diagonal.
| Sizing | Hold SNM | Read SNM |
|---|---|---|
| cell ratio 2 | 702 mV | 415 mV |
| cell ratio 1 | 718 mV | 292 mV |
Static noise margin: the side of the largest square that fits in the smaller lobe of the butterfly. Computed from the measured curves above.
Read is the cell's weakest moment. The read SNM of the ratio-2 cell is 415 mV; at ratio 1 it falls to 292 mV.
Write Ability
To write a 0 into a cell that holds 1, a driver pulls bl to 0 with the word line high. The access transistor must pull q below the other inverter's threshold, against the pull-up holding q high.
| Sizing | bl voltage at which the cell flips |
|---|---|
| cell ratio 2 | 637 mV |
| cell ratio 1 | 708 mV |
Measured: bl ramps from 1.8 V to 0 V in 20 ns with the word line high. A higher value is an easier write.
So the access transistor must be stronger than the pull-up. The three transistors have a fixed order of strength: pull-up weakest, access in the middle, pull-down strongest. Problem G9.16.1 sizes a cell inside that order.
Sensing a Small Split
A bit line in a real array has hundreds of cells on it and a large capacitance. Waiting for a full swing would be far too slow. A sense amplifier reads a split of tens of millivolts.
- v(s1)
- v(sb1), 50 mV lower
- v(sb0), 20 mV lower
- v(sae)
- Time 500 psv(s1) = 1.903 V · v(sb1), 50 mV lower = 1.856 V · v(sb0), 20 mV lower = 1.884 V · v(sae) = 900 mV
The sense enable rises. The tail NMOS turns on and both nodes start to fall.
- Time 575.1 psv(s1) = 1.337 V · v(sb1), 50 mV lower = 180.6 mV · v(sb0), 20 mV lower = 523 mV · v(sae) = 1.8 V
The node that started 50 mV lower falls faster, and the latch takes over. It reaches 10 % of the supply 75.1 ps after sae.
Read the plot as a table
| Time | v(s1) | v(sb1), 50 mV lower | v(sb0), 20 mV lower | v(sae) |
|---|---|---|---|---|
| 0 s | 1.8 V | 1.75 V | 1.78 V | 0 V |
| 200 ps | 1.8 V | 1.75 V | 1.78 V | 0 V |
| 400 ps | 1.8 V | 1.75 V | 1.78 V | 0 V |
| 500 ps | 1.903 V | 1.856 V | 1.884 V | 900 mV |
| 575.1 ps | 1.337 V | 180.6 mV | 523 mV | 1.8 V |
| 600 ps | 1.596 V | 34.19 mV | 138.2 mV | 1.8 V |
| 800 ps | 1.8 V | 4.776 µV | 12.21 µV | 1.8 V |
| 1 ns | 1.8 V | 483.2 nV | 613.5 nV | 1.8 V |
| 1.2 ns | 1.8 V | 483.1 nV | 612.4 nV | 1.8 V |
Measured with ngspice 42 on SKY130, 1.8 V.
| Split | Time to resolve | High node at the end |
|---|---|---|
| 20 mV | 96.3 ps | 1.80 V |
| 50 mV | 75.1 ps | 1.80 V |
| 100 mV | 60.6 ps | 1.80 V |
Measured: from sae at 50 % to the low node at 0.18 V.
A smaller split takes longer to resolve, and a real amplifier has an offset from mismatch. The timing of sae is a trade between speed and that margin.
Asked in interviews
Why is the pull-down of a 6T cell wider than the access transistor?
During a read the access transistor pulls the 0 node up against the pull-down. A stronger pull-down keeps that bump small, so the read does not flip the cell.
What limits writing a 6T cell?
The access transistor must pull the 1 node low against the pull-up. The pull-up is made the weakest device so that a write can win.
Why does an SRAM use a sense amplifier?
The cell discharges a large bit line slowly. A latch-type amplifier resolves a split of tens of millivolts into a full level, much sooner than a full swing.
Try It
bump_a and bump_b are the highest voltage of the 0 node during the read: 154 and 309 mV.
t100_a and t100_b are the times for the bit line to fall 100 mV: 41.9 and 50.6 ps.
Change the access widths of cell a to 1 and run. The bump grows.
Run the netlist to draw its plots here.
bump_a = 1.541905e-01 at= 5.720000e-10 bump_b = 3.092860e-01 at= 5.800000e-10 t100_a = 4.186787e-11 targ= 5.418679e-10 trig= 5.000000e-10 t100_b = 5.055760e-11 targ= 5.505576e-10 trig= 5.000000e-10 bl_a = 1.133592e-02 bl_b = 7.221631e-02Check Yourself
Common Mistakes
Wrong Make the access transistors as strong as possible for a fast read.
During a read the access transistor pulls the 0 node up against the pull-down. With equal widths (cell ratio 1) the 0 node rose to 309 mV, against 154 mV with cell ratio 2.
Fix Keep the pull-down stronger than the access transistor: a cell ratio of about 2.
Wrong Make the pull-up as strong as the pull-down, as in a logic inverter.
To write, the access transistor must pull the 1 node down against the pull-up. A strong pull-up makes the cell hard or impossible to write.
Fix Keep the pull-up the weakest of the three: pull-up < access < pull-down.
Wrong Wait for a bit line to swing fully before reading it.
Even with only 50 fF the line took 41.9 ps to fall 100 mV. A real bit line carries hundreds of cells and far more capacitance, while the cell current stays the same.
Fix Read a small split with a sense amplifier, then restore the bit lines.
Wrong Fire the sense amplifier as soon as the word line rises.
It amplifies whatever split it sees. With 20 mV it took 96.3 ps to resolve, with 100 mV 60.6 ps. In a real amplifier, offset can exceed a small split.
Fix Fire it once the split is safely larger than its offset, and no later than needed.
Remember
- A 6T cell: two cross-coupled inverters and two access NMOS on a word line.
- Read stability: pull-down stronger than access (cell ratio about 2).
- Write ability: access stronger than pull-up. Order of strength: pull-up < access < pull-down.
- The static noise margin is the largest square in the butterfly lobes; read is the worst case.
- A latch sense amplifier resolves a small split; smaller splits take longer.