Ratios, PMOS mirrors and distributing bias
Build a bias tree from one reference with unit devices, turn a sunk current into a sourced one, send currents rather than voltages across a chip, and find the lowest input voltage a differential pair's tail allows.
- Lesson
- E4.2
- Time
- 30 min
- Runs on
- ngspice
- Check
- 6 questions
A mirror's gate voltage, not a current, was wired from the bias block to a current sink in another block. Under load, that block's ground sat 10 mV above the bias block's. Its copy fell from 10.15 µA to 8.64 µA, 14.9 % low.
- i_far
- i_lin
- i_loc
- Far ground offset VGR 0 Vi_far = 10.15 µA · i_lin = 10.15 µA · i_loc = 9.946 µA
With both grounds equal, the routed gate voltage gives 10.15 µA and the locally mirrored current 9.95 µA.
- Far ground offset VGR 10 mVi_far = 8.641 µA · i_lin = 8.863 µA · i_loc = 9.933 µA
At 10 mV the routed voltage gives 8.64 µA (−14.9 %); the estimate (gm/ID)·ΔV predicts 8.86 µA. The local mirror gives 9.93 µA (−0.13 %).
- Far ground offset VGR 20 mVi_far = 7.287 µA · i_lin = 7.576 µA · i_loc = 9.921 µA
At 20 mV the routed voltage has lost more than a quarter of its current. The local mirror has barely moved.
Read the plot as a table
| Far ground offset VGR | i_far | i_lin | i_loc |
|---|---|---|---|
| 0 V | 10.15 µA | 10.15 µA | 9.946 µA |
| 5 mV | 9.376 µA | 9.507 µA | 9.94 µA |
| 10 mV | 8.641 µA | 8.863 µA | 9.933 µA |
| 15 mV | 7.945 µA | 8.22 µA | 9.927 µA |
| 20 mV | 7.287 µA | 7.576 µA | 9.921 µA |
Measured on ngspice 42, SKY130 tt (41 points): the lab's second sweep, dc2.
Send currents between blocks, and turn them into gate voltages only where they are used.
One reference, many currents
Analog blocks are usually biased from one reference current, which mirrors copy, scale and turn around. The lab builds a small bias tree from a 10 µA reference, with every NMOS and PMOS drawn as W/L = 4/1 µm unit devices.
- The reference sets one gate voltage
IREF pushes 10 µA into N0, which settles at VGS = 0.718 V. Every NMOS that shares N0's gate and source voltage copies 10 µA per unit.
- Sinks in whole units
N1 is one unit and sinks 10.15 µA. N2 is two units (
m=2) and sinks 19.67 µA. The tail sink is two units as well. Each copy carries its own VDS error from E4.1. - A PMOS diode turns the current around
N2 pulls its current out of P0, a PMOS diode with its source at VDD. P0 settles at VSG = 1.255 V, and PMOS devices sharing its gate source current into their loads.
- A current, sent far
P1 sends 9.79 µA to the far block, which mirrors it with its own NMOS diode. The far block's ground can differ from the reference's without changing that copy.
Read the diagram as text
- IREF 10 µA: the one reference
- N0 NMOS diode: 1 unit, VGS = 0.718 V
- N1 sink, 1 unit: 10.15 µA from a 0.9 V node
- N2 sink, 2 units: 19.67 µA from P0
- Tail sink, 2 units: 18.09 µA at VCM = 0.9 V
- P0 PMOS diode: 2 units, VSG = 1.255 V
- P2 source, 2 units: 19.49 µA into a 0.9 V node
- Far block: P1 sends 9.79 µA to its own diode
- IREF 10 µA → N0 NMOS diode: current
- N0 NMOS diode → N1 sink, 1 unit: gate voltage
- N0 NMOS diode → N2 sink, 2 units: gate voltage
- N0 NMOS diode → Tail sink, 2 units: gate voltage
- N2 sink, 2 units → P0 PMOS diode: current
- P0 PMOS diode → P2 source, 2 units: gate voltage
- P0 PMOS diode → Far block: current via P1
Every current is measured in the lab at 0.9 V on each output node. A sink pulls current to ground; a source pushes it from VDD.
Ratios. Make an output m units of the reference device and it carries m times the reference current. Use whole units (m=2, or several identical devices), not an odd width. Identical units share every edge effect, so the ratio is a count. A ratio below 1 puts more units on the reference side.
Turning a current around. An NMOS mirror sinks current: its output pulls current toward ground. A PMOS mirror with its sources at VDD sources current into its load. Feed an NMOS sink into a PMOS diode and you get sourced copies of the same reference.
| Branch | Units | Measured | Its VDS against the diode's |
|---|---|---|---|
| N1 sink | 1 | 10.15 µA | 0.9 V against 0.718 V |
| N2 sink into P0 | 2 | 19.67 µA | 0.545 V against 0.718 V |
| P2 source | 2 (of P0's 2) | 19.49 µA | VSD 0.9 V against 1.255 V |
| P1 to the far block | 1 | 9.79 µA | VSD set by the far diode |
The lab's in1, in2, ip2_09 and ip1 lines. Errors add along a chain: N2 is 1.6 % low, and P2 then copies that low current.
The PMOS side is the tight one in 1.8 V. SKY130's PMOS needs VSG = 1.255 V for 19.7 µA in two 4/1 units, so P0's gate sits at only 0.545 V. A PMOS output also drifts with its voltage: P2 gives 19.77 µA at 0.3 V, 19.49 µA at 0.9 V and 18.64 µA at 1.5 V. By the module's 1 % definition, its output must stay below 1.167 V.
Why a current travels better than a voltage
A gate voltage sets a current only together with the source voltage under it. If the far block's ground rises by ΔV, its sink's VGS falls by ΔV. To first order the current falls by gm·ΔV, a fraction (gm/ID)·ΔV of itself. gm/ID, from the E2 lesson "Transconductance and gm/ID", is how much current each volt of VGS buys.
The lab prints gm/ID = 12.68 V−1 for N1. Ten millivolts then predicts a 12.7 % drop; the run shows 14.9 %. The rest is the body effect. The far sink's source sits 10 mV above its body, the substrate at ground, and that raises its threshold. The lab prints gmb/ID = 2.92 V−1, where gmb is the transconductance from the body (E3): about 2.9 % more.
The fix is to send a current. The far block receives a current and mirrors it with its own diode device, whose source sits on the far block's ground. Both of its devices see the same ground, so an offset cancels. In the lab the locally mirrored copy moves from 9.95 to 9.93 µA when the far ground rises by 10 mV.
Gate voltage routed to the far block
VGR gr 0 10m
XNF nf gn gr 0 sky130_fd_pr__nfet_01v8 W=4 L=1
ifar10 = 8.641225e-06: 14.9 % below the 10.15 µA it gives with no offset.
Current routed, mirrored locally
VGR gr 0 10m
XNL fl fl gr 0 sky130_fd_pr__nfet_01v8 W=4 L=1
XNC nc fl gr 0 sky130_fd_pr__nfet_01v8 W=4 L=1
iloc10 = 9.933424e-06: 0.13 % below its 9.95 µA with no offset.
Both from the lab's second sweep. The body of every NMOS is the shared substrate at ground.
Biasing the tail of a differential pair
A differential pair is two transistors whose sources share one node, the tail. A mirror output sinks a fixed current from the tail, and the pair splits it between its two drains.
- The tail sink
NT is two units on N0's gate. In saturation it sinks about 20 µA from the tail node t, whatever the pair does.
Itail
- The pair rides on the tail
The pair needs VGS to carry its current, so the tail node sits one VGS below the gates: v(t) = VCM − VGS.
- Too low a common mode
At VCM = 0.9 V the tail node is only 0.173 V. NT is in triode and sinks 18.09 µA instead of about 20 µA.
Read the circuit as text
- MA NMOS transistor (4/0.5): gate →
n1, drain →VDD, source →t - MB NMOS transistor (4/0.5): gate →
n2, drain →VDD, source →t - VCM port: terminal →
n1 - VCM port: terminal →
n2 - IREF current source (10 µA): + →
VDD, − →gn - N0 NMOS transistor (4/1): gate →
gn, drain →gn, source →0 - NT NMOS transistor (2 × 4/1): gate →
gn, drain →t, source →0
t= 0.173 Vgn= 0.718 V
Both VCM ports are one node, cm. The lab adds a 0 V ammeter VT between t and NT's drain. All bodies are the substrate at ground.
The tail device needs its own VDS to stay saturated, and the pair stacks its VGS on top. So the input common-mode voltage must be at least VGS of the pair device plus the VDS the tail needs. The plot sweeps VCM.
- i_tail
- v_tail
- Input common-mode voltage VCM 900 mVi_tail = 18.09 µA · v_tail = 172.8 mV
VCM = 0.9 V: the tail node is at 0.173 V and the tail sinks 18.09 µA, 9.5 % short of 20 µA.
- Input common-mode voltage VCM 1.054 Vi_tail = 19 µA · v_tail = 298.2 mV
The tail reaches 19 µA at VCM = 1.054 V, with the tail node at 0.298 V. The pair's VGS is the difference, 0.755 V.
- Input common-mode voltage VCM 1.256 Vi_tail = 19.5 µA · v_tail = 467.1 mV
Within 2.5 % of 20 µA (19.5 µA) at VCM = 1.256 V. The tail node is at 0.467 V; the pair's VGS has grown to 0.789 V.
More context
The pair's sources ride up with the tail node while their bodies stay at ground, so the body effect raises their threshold: VGS grows as VCM rises.
- Input common-mode voltage VCM 1.8 Vi_tail = 20.35 µA · v_tail = 929.6 mV
At 1.8 V the tail sinks 20.35 µA. Above the knee the current keeps rising slowly, the E4.1 slope.
Read the plot as a table
| Input common-mode voltage VCM | i_tail | v_tail |
|---|---|---|
| 600 mV | 2.528 µA | 10.71 mV |
| 800 mV | 15.34 µA | 98.36 mV |
| 900 mV | 18.09 µA | 172.8 mV |
| 1 V | 18.8 µA | 253.9 mV |
| 1.054 V | 19 µA | 298.2 mV |
| 1.2 V | 19.38 µA | 420 mV |
| 1.256 V | 19.5 µA | 467.1 mV |
| 1.4 V | 19.76 µA | 588.4 mV |
| 1.6 V | 20.07 µA | 758.3 mV |
| 1.8 V | 20.35 µA | 929.6 mV |
Measured on ngspice 42, SKY130 tt (241 points): the lab's third sweep, dc3.
Read the limit off the plot. To hold the tail within 2.5 % of 20 µA, this pair needs VCM ≥ 1.256 V: 0.789 V for the pair plus 0.467 V for the tail. That is the first number of module E5. E4.3's low-voltage mirrors lower it.
Asked in interviews
How do you distribute bias across a chip?
One reference, mirrored into currents. Send each block a current and let it mirror locally into its own diode device. A routed gate voltage changes the copy by about (gm/ID)·ΔV for a ground difference ΔV: 14.9 % for 10 mV here.
Why build mirror ratios from unit devices?
Identical units in parallel share every edge, corner and layout effect, so the ratio is a count. An odd width ratio picks up width-dependent effects and mismatches. A ratio below 1 puts more units on the reference side.
What limits a differential pair's input common-mode range from below?
The tail sink must stay saturated: VCM ≥ VGS,pair + VDS,tail. Here, 1.256 V for a tail within 2.5 % of 20 µA. A low-voltage tail mirror lowers it; the body effect on the pair raises it.
Try it
Run it and read the three groups: the tree at 0.9 V (in1 to iloc), the far ground (gm_id to iloc10) and the tail (itail09 to itail18). Plots shows each sweep.
Then predict before each edit. Change VGR to 5m and check ifar against (gm/ID)·ΔV. Make N1 m=4: does it sink four times N1's old current? Lengthen the tail units to L = 2 (W = 8) and watch vcm195 move. Finally route the PMOS gate voltage gp to a PMOS source in the far block whose own VDD sits 10 mV low, and compare its copy with P2's.
Run the netlist to draw its plots here.
in1 = 1.015044e-05 in2 = 1.967138e-05 vsg = 1.255139e+00 ip2_03 = 1.976653e-05 ip2_09 = 1.949473e-05 ip2_15 = 1.863537e-05 vmax_p2 = 1.167071e+00 ip1 = 9.793685e-06 ifar = 8.641225e-06 iloc = 9.933424e-06 gm_id = 1.268120e+01 gmb_id = 2.920452e+00 ifar0 = 1.015044e-05 ifar5 = 9.376317e-06 ifar10 = 8.641225e-06 ilin10 = 8.863243e-06 iloc0 = 9.946128e-06 iloc10 = 9.933424e-06 itail09 = 1.808984e-05 vt09 = 1.727678e-01 vcm19 = 1.053674e+00 vcm195 = 1.256178e+00 vt19 = 2.982120e-01 vt195 = 4.671301e-01 itail18 = 2.034724e-05 at= 1.800000e+00Check yourself
Remember
- Build ratios from whole unit devices: m units copy m times the reference; a ratio below 1 puts more units on the reference side.
- An NMOS mirror sinks current; feeding it into a PMOS diode gives sourced copies. Errors add along the chain.
- A routed gate voltage changes its copy by about (gm/ID)·ΔV for a ground difference ΔV; send currents and mirror them locally.
- A differential pair needs VCM ≥ VGS,pair + VDS,tail: 1.256 V here for a tail within 2.5 % of 20 µA.