Mismatch and Pelgrom's law
Measure the random difference between transistors drawn alike, predict it from their area with Pelgrom's law, and turn it into the current error of a mirror.
- Lesson
- E7.4
- Time
- 30 min
- Runs on
- ngspice
- Check
- 5 questions
A current mirror copied a bias current with two NMOS transistors drawn at W/L = 1/1 µm to save area. On 30 simulated chips the copy was off by anything from −19.6 % to +12.4 %, with a spread of 7.43 %. Nothing was wrong with the drawing: small transistors simply differ more.
Read the histogram as a table
| Current error from | to | Pairs |
|---|---|---|
| -24% | -20% | 0 |
| -20% | -16% | 1 |
| -16% | -12% | 2 |
| -12% | -8% | 1 |
| -8% | -4% | 5 |
| -4% | 0% | 5 |
| 0% | 4% | 5 |
| 4% | 8% | 8 |
| 8% | 12% | 2 |
| 12% | 16% | 1 |
30 values in 10 bins.
The lab netlist on ngspice 42 with the SKY130 mismatch model on and seed 5: mean −0.28 %, standard deviation 7.43 %.
Every random error between matched devices shrinks as the square root of their area, and 1 µm2 has very little area.
What the model varies
Two transistors drawn identically are never quite identical, because the number of dopant atoms under each gate is random and the gate edges are rough. So each device's threshold voltage Vth sits a little above or below the typical value. The random difference between two devices drawn alike is mismatch.
- Drawn alike
Same W and L, same VGS, same VDS. Identical devices would carry exactly the same current.
- One threshold is different
With mismatch on, each device draws its own threshold shift. A device with a lower Vth carries more current, and VA and VB read the difference.
IA · IB
Read the circuit as text
- VA voltage source (0 V): + →
d, − →n1 - VB voltage source (0 V): + →
d, − →n2 - XA NMOS transistor (1/1): gate →
g, drain →n1, source →n3 - XB NMOS transistor (1/1): gate →
g, drain →n2, source →n3 - VG voltage source (0.7 V): + →
g, − →0 - VD voltage source (0.9 V): + →
d, − →n3
g= 0.7 Vd= 0.9 V
Bodies at ground. The lab repeats this pair 30 times as subcircuit instances.
The lab runs 30 such pairs in one netlist, all measured by one operating-point run. At W/L = 1/1 the threshold differences have a standard deviation σ(ΔVth) of 5.513 mV and a mean of 0.215 mV, near zero as random errors should be. The current errors have σ = 7.43 %.
In the SKY130 models of nfet_01v8 and pfet_01v8, mismatch is a threshold shift only. Each device instance adds a Gaussian term to its threshold through delvto, scaled by 1/√(W·L) and by a matching constant. The term is multiplied by a switch, MC_MM_SWITCH, which the library sets to 0. An oxide-thickness mismatch line is in the model file, but it is commented out.
Pelgrom's law
Average a random effect over a larger gate and more of it cancels. Pelgrom's law (1989) states the result for a pair: σ(ΔVth) = AVT/√(W·L). AVT is the process's matching coefficient, in mV·µm, so four times the area halves the mismatch.
The SKY130 model file gives 3.356 mV·µm per NFET device and says a pair differs by that constant times √(2/area). So for a pair, AVT = √2 × 3.356 = 4.746 mV·µm. The model also multiplies small devices' shifts by a size factor: 1.35 at 1/1, 1.13 at 2/2, 1.04 at 4/4.
- Pelgrom, 4.746 mV·µm
- model, square devices
- 1/sqrt(W·L) (1/µm) 0.25Pelgrom, 4.746 mV·µm = 1.187 mV · model, square devices = 1.23 mV
The 4/4 pairs, 16 µm2: 1.131 mV measured, 1.230 mV on the model curve.
- 1/sqrt(W·L) (1/µm) 0.5Pelgrom, 4.746 mV·µm = 2.373 mV · model, square devices = 2.677 mV
The 2/2 pairs, 4 µm2: 2.895 mV measured against 2.677 mV on the curve. A quarter of the area, about twice the mismatch.
- 1/sqrt(W·L) (1/µm) 1Pelgrom, 4.746 mV·µm = 4.746 mV · model, square devices = 6.398 mV
The 1/1 pairs, 1 µm2: the model curve is 6.398 mV, 35 % above the straight line's 4.746 mV. That is the model's size factor. The 20 pairs measure 5.103 mV.
Read the plot as a table
| 1/sqrt(W·L) (1/µm) | Pelgrom, 4.746 mV·µm | model, square devices |
|---|---|---|
| 0.2 | 949.2 µV | 968.3 µV |
| 0.25 | 1.187 mV | 1.23 mV |
| 0.3 | 1.424 mV | 1.501 mV |
| 0.4 | 1.898 mV | 2.07 mV |
| 0.5 | 2.373 mV | 2.677 mV |
| 0.6 | 2.848 mV | 3.325 mV |
| 0.7 | 3.322 mV | 4.018 mV |
| 0.8 | 3.797 mV | 4.759 mV |
| 0.9 | 4.271 mV | 5.551 mV |
| 1 | 4.746 mV | 6.398 mV |
Measured on ngspice 42 with 20 pairs per size and seed 5. The 10/1 device is not square, so it sits near the line and off the curve.
A straight line through the origin fitted to the four points has a slope of 5.144 mV·µm, 8 % above the file's 4.746. Two things pull it: the size factor lifts the small devices, and each point is itself a sample.
A standard deviation estimated from N samples is uncertain by about σ/√(2N): ±16 % for 20 pairs, ±13 % for 30. The lab's 30 pairs at 1/1 gave 5.513 mV and the figure's 20 gave 5.103 mV; the model expects 6.398. When the number matters, use hundreds of samples.
| Pair | Expected σ(ΔVth) from the model file | Measured |
|---|---|---|
| NMOS 1/1 | 6.398 mV | 5.103 mV (20 pairs), 5.513 mV (30 pairs) |
| NMOS 2/2 | 2.677 mV | 2.895 mV (20 pairs), 2.135 mV (another 20) |
| NMOS 4/4 | 1.230 mV | 1.131 mV (20 pairs) |
| PMOS 2/2 | 4.141 mV | 4.479 mV (20 pairs) |
The PMOS constant is 5.856 mV·µm per device, with no size factor on its mismatch term.
From threshold to current
A mirror copies a current by giving two devices the same VGS. A threshold error ΔVth then changes the copy by ΔID = gmΔVth. So the relative error is σ(ΔI/I) = (gm/ID) · σ(ΔVth). The transconductance efficiency gm/ID (E2.5) is high in weak inversion and low at large overdrive.
- measured σ(ΔI/I)
- gm/ID × σ(ΔVth)
- gm/ID
- Gate voltage 595 mVmeasured σ(ΔI/I) = 4.249% · gm/ID × σ(ΔVth) = 4.271% · gm/ID = 20 S/A
At VGS = 0.595 V the devices are near weak inversion, gm/ID = 20: the current error is 4.25 %.
- Gate voltage 802.5 mVmeasured σ(ΔI/I) = 1.713% · gm/ID × σ(ΔVth) = 1.708% · gm/ID = 8 S/A
At 0.802 V, gm/ID = 8: the same devices give 1.71 %. The thresholds did not change; the current's sensitivity to them did.
Read the plot as a table
| Gate voltage | measured σ(ΔI/I) | gm/ID × σ(ΔVth) | gm/ID |
|---|---|---|---|
| 400 mV | 5.413% | 5.422% | 25.39 S/A |
| 595 mV | 4.249% | 4.271% | 20 S/A |
| 600 mV | 4.188% | 4.21% | 19.71 S/A |
| 800 mV | 1.73% | 1.726% | 8.082 S/A |
| 802.5 mV | 1.713% | 1.708% | 8 S/A |
| 1 V | 0.9418% | 0.9104% | 4.263 S/A |
| 1.2 V | 0.6638% | 0.615% | 2.88 S/A |
| 1.4 V | 0.5188% | 0.4562% | 2.136 S/A |
Measured on ngspice 42, seed 5. The threshold spread of these 20 pairs is 2.135 mV.
The measured curve sits on the prediction: 1.71 % against 1.708 % at gm/ID = 8, and 4.25 % against 4.27 % at 20. A mirror biased for high gm/ID matches currents worse, so give mirror devices a large overdrive or more area.
A differential pair is the other way round. Its offset is the input voltage that balances the currents, so a threshold error refers to the input one to one, at any gm/ID. Real silicon also mismatches the current factor β (mobility and oxide), and that part reaches a pair's input divided by gm/ID. This model leaves β out, so that half is theory here, not a run.
Asked in interviews
State Pelgrom's law.
The standard deviation of a parameter difference between two devices drawn alike falls as one over the square root of their area: σ(ΔVth) = AVT/√(W·L). Four times the area halves the mismatch.
How do you size a pair for a 1 mV offset?
Decide how many σ the spec must cover, say 3σ = 1 mV, so σ = 0.33 mV. Then W·L ≥ (AVT/σ)2. With AVT = 4.75 mV·µm that is about 200 µm2 per device, before the load's share.
Why do current mirrors match worse at low overdrive?
The current error is gm/ID times the threshold error, and gm/ID rises toward weak inversion. On 2/2 SKY130 pairs: 1.71 % at gm/ID = 8 and 4.25 % at 20.
What does a Monte Carlo run model that a corner run does not?
Each device gets its own random draw, so devices differ from each other: offset, mirror error, mismatch. A corner moves every device of a type the same way and cannot show a difference between two of them.
Try it
Run it: print lists every pair's threshold difference in mV and current error in %, and the meas lines give their mean, standard deviation and extremes. sigma_ir ≈ gm_id × sigma_vt / 10 (mV and % units).
Now set wp=4 lp=4 and predict sigma_vt before you run: Pelgrom says a quarter, the size factor a little less. Then change the seed to 6 and see the sample itself change while σ stays near the same value.
Run the netlist to draw its plots here.
sigma_vt = 5.513049e+00 mean_vt = 2.150386e-01 sigma_ir = 7.426176e+00 mean_ir = -2.796932e-01 min_ir = -1.961512e+01 max_ir = 1.243447e+01 gm_id = 1.387842e+01 id1 = 1.635944e-06Check yourself
Remember
- Mismatch is the random difference between devices drawn alike; for a pair σ(ΔVth) = AVT/√(W·L): four times the area halves it.
- SKY130's nfet_01v8 and pfet_01v8 mismatch is a threshold shift only, AVT ≈ 4.75 mV·µm (NMOS) and 8.28 mV·µm (PMOS) for a pair, plus a size factor that makes small NMOS devices worse.
- Turn it on with .param MC_MM_SWITCH=1 after the .lib line, unroll the copies in one netlist, and fix the seed so every run repeats.
- A mirror's current error is gm/ID times the threshold error, so mirrors match best at large overdrive; 30 samples estimate σ only to about ±13 %.