A 20 µA bias mirror drawn with minimum-length devices delivers 34 µA when its output sits at 1.8 V. Resize it so it copies 20 µA within 5 % for any output from 0.5 V to 1.8 V, at tt, ss and ff.
Circuit context: A 20 µA NMOS current mirror feeding a block whose node sits anywhere from 0.5 V to 1.8 V. Repair a bias mirror whose copy overshoots at a high output voltage.
The mirror below copies a 20 µA reference to a block whose node can sit anywhere from 0.5 V to 1.8 V. It was drawn with W/L = 2/0.15. At 1.8 V the block receives 34.4 µA, and at 0.5 V only 16.1 µA.
Resize the two transistors so that the copy stays within 20 µA ± 5 % (19 to 21 µA) at 0.5 V, 0.9 V and 1.8 V on the output, at tt, and at 0.5 V and 1.8 V at ss and ff.
Lesson E4.1 found that longer devices copy better. Check how far that rule takes you: the lesson's own 8/1 mirror is one of the designs to try.
What the grader measures
Your subcircuit mirror (ports ref, out) under the grader's own bench, one run per corner (tt, ss, ff):
| Check | Corner | Rule |
|---|---|---|
| Copy at 0.5 V | tt | 19 µA to 21 µA |
| Copy at 0.9 V | tt | 19 µA to 21 µA |
| Copy at 1.8 V | tt | 19 µA to 21 µA |
| Copy at 0.5 V | ss | 19 µA to 21 µA |
| Copy at 1.8 V | ss | 19 µA to 21 µA |
| Copy at 0.5 V | ff | 19 µA to 21 µA |
| Copy at 1.8 V | ff | 19 µA to 21 µA |
Full specification
.subckt mirror ref out
* SKY130 1.8 V FETs only (sky130_fd_pr__nfet_01v8, sky130_fd_pr__pfet_01v8)
.ends
| Check | Corner | Rule | How the grader measures it |
|---|---|---|---|
| Copy at 0.5 V | tt, ss, ff | 19 µA to 21 µA | dc: v(out) swept 0 to 1.85 V in 5 mV steps; the current into out at 0.5 V |
| Copy at 0.9 V | tt | 19 µA to 21 µA | the same sweep at 0.9 V |
| Copy at 1.8 V | tt, ss, ff | 19 µA to 21 µA | the same sweep at 1.8 V |
The grader pushes 20 µA from a 1.8 V supply into ref with an ideal source and runs once per corner (.lib sky130 tt, ss, ff; 27 °C).
Examples
Example 1
The starter: 2/0.15- Design
.subckt mirror ref out XM1 ref ref 0 0 sky130_fd_pr__nfet_01v8 W=2 L=0.15 XM2 out ref 0 0 sky130_fd_pr__nfet_01v8 W=2 L=0.15 .ends
- Measured by the grader
Copy at 0.5 V: 16.11 µA (needs 19 µA to 21 µA) Copy at 0.9 V: 21.83 µA (needs 19 µA to 21 µA) Copy at 1.8 V: 34.41 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ss: 16.19 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ss: 32.12 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ff: 16.08 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ff: 37.02 µA (needs 19 µA to 21 µA)
Short devices: 16.1 µA at 0.5 V, 34.4 µA at 1.8 V.
Example 2
The lesson's 8/1 mirror- Design
.subckt mirror ref out XM1 ref ref 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM2 out ref 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 .ends
- Measured by the grader
Copy at 0.5 V: 19.64 µA (needs 19 µA to 21 µA) Copy at 0.9 V: 20.27 µA (needs 19 µA to 21 µA) Copy at 1.8 V: 21.38 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ss: 19.62 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ss: 21.34 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ff: 19.67 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ff: 21.41 µA (needs 19 µA to 21 µA)
Much better, but still 6.9 % high at 1.8 V in every corner.
Example 3
4/4: a longer L at a smaller W/L- Design
.subckt mirror ref out XM1 ref ref 0 0 sky130_fd_pr__nfet_01v8 W=4 L=4 XM2 out ref 0 0 sky130_fd_pr__nfet_01v8 W=4 L=4 .ends
- Measured by the grader
Copy at 0.5 V: 19.66 µA (needs 19 µA to 21 µA) Copy at 0.9 V: 19.97 µA (needs 19 µA to 21 µA) Copy at 1.8 V: 20.34 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ss: 19.64 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ss: 20.33 µA (needs 19 µA to 21 µA) Copy at 0.5 V at ff: 19.67 µA (needs 19 µA to 21 µA) Copy at 1.8 V at ff: 20.35 µA (needs 19 µA to 21 µA)
19.66 to 20.34 µA over the whole range at tt; ss and ff move each end by 0.02 µA or less.
Constraints and contract
- The netlist defines .subckt mirror ref out ... .ends exactly once, with these ports in this order.
- Inside mirror: X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8 only, with comments and .param lines.
- The grader supplies the reference current and the output voltage; it writes the .lib line for each corner itself.
Hints
Hint 1
The copy is exact only where M2 sees what M1 sees: V_{out} = V_{GS}. Above it the current rises with V_{DS}, so 1.8 V is where the error is largest.
Hint 2
Lesson E4.1's table kept W/L = 8 and changed L: 8/1 and 16/2 both copy about 21.4 µA at 1.8 V. Lengthening further at the same W/L does not help. What else can change?
Hint 3
Try a longer L at the same W, so W/L falls. Then check the other end: a device with too small a W/L needs a large V_{GS} and leaves saturation above 0.5 V.
What the grader checks: The grader pushes an ideal 20 µA into ref, sweeps the output from 0 to 1.85 V and reads the copy at 0.5, 0.9 and 1.8 V (dc) at tt, ss and ff, 27 °C, on ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-03 with tools/spice-judge.mjs. It does not check mismatch between the two devices, temperature or how fast the gate line settles.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit mirror and makes 3 ngspice runs. The numbers come from ngspice and the SKY130 models the site pins; they prove the measured cases, not every condition a chip meets.
See all 1 steps and the final capstone