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.

DC sweepA far sink against the offset of its groundThe far sink on a routed gate voltage (i_far), its first-order estimate (i_lin), and a routed current mirrored by the far block (i_loc).
  • i_far
  • i_lin
  • i_loc
7.0 µA7.5 µA8.0 µA8.5 µA9.0 µA9.5 µA10.0 µA10.5 µAFar block current05 mV10 mV15 mV20 mVFar ground offset VGRrouted voltage: 8.64 µArouted current: 9.93 µA7 µA8 µA9 µA10 µA11 µAFar block current05 mV10 mV15 mV20 mVFar ground offset VGRrouted voltage: 8.64 µArouted current: 9.93 µA
  1. 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.

  2. 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 %).

  3. 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 VGRi_fari_lini_loc
0 V10.15 µA10.15 µA9.946 µA
5 mV9.376 µA9.507 µA9.94 µA
10 mV8.641 µA8.863 µA9.933 µA
15 mV7.945 µA8.22 µA9.927 µA
20 mV7.287 µA7.576 µA9.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 lab's bias treeArrows show what each link carries: a current, or a gate voltage that sets a current in the device it reaches.
The lab's bias treeArrows show what each link carries: a current, or a gate voltage that sets a current in the device it reaches. component IREF 10 µA the one reference component N0 NMOS diode 1 unit, VGS = 0.718V component N1 sink, 1 unit 10.15 µA from a 0.9V node component N2 sink, 2 units 19.67 µA from P0 component Tail sink, 2 units 18.09 µA at VCM =0.9 V component P0 PMOS diode 2 units, VSG = 1.255V component P2 source, 2units 19.49 µA into a 0.9 Vnode component Far block P1 sends 9.79 µA toits own diode currentgate voltagegate voltagegate voltagecurrentgate voltagecurrent via P1
  1. 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.

  2. 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.

  3. 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.

  4. 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.

BranchUnitsMeasuredIts VDS against the diode's
N1 sink110.15 µA0.9 V against 0.718 V
N2 sink into P0219.67 µA0.545 V against 0.718 V
P2 source2 (of P0's 2)19.49 µAVSD 0.9 V against 1.255 V
P1 to the far block19.79 µAVSD 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 under a pairNT, two units of N0, sinks the tail current. MA and MB take their gates from the input common-mode voltage VCM.
The tail sink under a pairVDDVDDMA4/0.5MB4/0.5VCMVCMVDDIREF10 µAN04/1NT2 × 4/1t0.173 Vgn0.718 V
  1. 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

  2. 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.

  3. 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 V
  • gn = 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.

DC sweepTail current against input common-mode voltageAbove: the current NT sinks. Below: the tail node voltage v(t). The pair is two 4/0.5 µm NMOS; NT is two 4/1 µm units copying 10 µA each.
  • i_tail
  • v_tail
05 µA10 µA15 µA20 µA25 µATail current00.2 V0.4 V0.6 V0.8 V1.0 VTail node v(t)0.6 V0.8 V1.0 V1.2 V1.4 V1.6 V1.8 VInput common-mode voltage VCM20 µA19 µA at 1.054 V19.5 µA at 1.256 V05 µA10 µA15 µA20 µA25 µATail current00.5 V1.0 VTail node v(t)1.0 V1.5 VInput common-mode voltage VCM20 µA19 µA at 1.054 V19.5 µA at 1.256 V
  1. 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.

  2. 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.

  3. 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.

  4. 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 VCMi_tailv_tail
600 mV2.528 µA10.71 mV
800 mV15.34 µA98.36 mV
900 mV18.09 µA172.8 mV
1 V18.8 µA253.9 mV
1.054 V19 µA298.2 mV
1.2 V19.38 µA420 mV
1.256 V19.5 µA467.1 mV
1.4 V19.76 µA588.4 mV
1.6 V20.07 µA758.3 mV
1.8 V20.35 µA929.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
  1. 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.

  2. 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.

  3. 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.

SPICEngspice 42 · simulator service
Edit the netlist, then run it
Expected measurements: 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+00

Check yourself

Predict the outputA 10 µA reference flows into three unit devices in parallel. One unit on the same gate is the output, held at VDS = VGS by a voltage-controlled source that draws no current from the gate. Type the line meas prints, in ngspice's format (for example iout = 1.015044e-05).
* a 1:3 mirror: three reference units, one output unit, output held at V_GS by EO
.lib sky130 tt
VDD vdd 0 1.8
IREF vdd g 10u
XN0 g g 0 0 sky130_fd_pr__nfet_01v8 W=4 L=1 m=3
XN1 o g 0 0 sky130_fd_pr__nfet_01v8 W=4 L=1
* EO copies v(g) onto o without drawing current from g
EO o 0 g 0 1
.control
dc IREF 9u 11u 1u
let iout=-i(EO)
meas dc iout FIND iout AT=10u
.endc
.end
ConceptN1 has gm/ID = 12.68 V−1. Its gate voltage is routed to a far block whose ground sits 5 mV high. About how far does the far copy fall, to first order?
ConceptOn the tail plot, from which input common-mode voltage is the tail current within 2.5 % of 20 µA, that is at least 19.5 µA?
ConceptWhat sets the lowest input common-mode voltage of an NMOS differential pair with a mirror tail?
ConceptA far block's ground can sit 10 mV away from the bias block's. Which far sink keeps its current?
ConceptWhy is a PMOS mirror harder to fit in a 1.8 V supply than an NMOS one in SKY130?

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.