A push-pull stage was sized on paper for 300 µA in each half. It carries about half of that. Resize both devices so each carries 300 µA within 5 %, inside 1.5 µm² of gate.
Circuit context: A push-pull output stage at L = 0.15 µm, one NMOS and one PMOS, each driven with 1.2 V on its gate. Fix a driver whose paper sizing promised twice the current the devices deliver.
An output stage has an NMOS that pulls down and a PMOS that pulls up. With 1.2 V of gate drive and 1.2 V across it, each device must carry 300 µA. A matched stage needs both currents within 5 % of that target.
The designer sized the NMOS with the square law and the long-device constants of lesson E2.3. That gave W/L = 6.67, so W = 1 µm at L = 0.15 µm. The PMOS got 2.85 times the NMOS width. The stage then carried far too little current in both halves.
Fix the subcircuit drv. Both currents must land between 285 µA and 315 µA at tt. The gate area of the two devices together may be at most 1.5 µm², counted as the sum of W · L · m.
What the Grader Measures
Your subcircuit drv (ports dn, gn, dp, gp, vdd) under the grader's own bench, one run per corner (tt):
| Check | Corner | Rule |
|---|---|---|
| NMOS current | tt | 300 µA ± 5 % |
| PMOS current | tt | 300 µA ± 5 % |
| Budget: Gate area | tt | ≤ 1.5 µm², the lower the better |
Full specification
.subckt drv dn gn dp gp vdd
* NMOS: drain dn, gate gn, source and body on ground (node 0)
* PMOS: drain dp, gate gp, source and body on vdd
.ends
| Check | Rule | How the grader measures it |
|---|---|---|
| NMOS current | 300 µA ± 5 % | op with 1.2 V on gn and 1.2 V on dn: the current into dn |
| PMOS current | 300 µA ± 5 % | op with vdd at 1.8 V, gp and dp at 0.6 V: the current out of dp |
| Gate area (budget) | ≤ 1.5 µm² | the sum of W · L · m over the FETs of drv, read from the netlist |
The grader runs once, with .lib sky130 tt at 27 °C. A result equal to the budget passes.
Examples
Example 1
The Starter: W = 1 and W = 2.85 at L = 0.15- Design
.subckt drv dn gn dp gp vdd XN dn gn 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15 XP dp gp vdd vdd sky130_fd_pr__pfet_01v8 W=2.85 L=0.15 .ends
- Measured by the grader
NMOS current: 155.9 µA (needs 300 µA ± 5 %) PMOS current: 140.2 µA (needs 300 µA ± 5 %) Gate area: 577.5 mµm² (budget ≤ 1.5 µm²)
The NMOS carries 52 % of the target and the PMOS 47 %. The paper sizing overshoots both halves.
Example 2
NMOS Width Scaled Once: W = 1.92- Design
.subckt drv dn gn dp gp vdd XN dn gn 0 0 sky130_fd_pr__nfet_01v8 W=1.92 L=0.15 XP dp gp vdd vdd sky130_fd_pr__pfet_01v8 W=6.1 L=0.15 .ends
- Measured by the grader
NMOS current: 328.7 µA (needs 300 µA ± 5 %) PMOS current: 300.8 µA (needs 300 µA ± 5 %) Gate area: 1.203 µm² (budget ≤ 1.5 µm²)
W = 1 × 300/156 lands 9.6 % high. The wider device carries more current per micron than the narrow one did.
Example 3
A Long NMOS: W = 6.67, L = 1- Design
.subckt drv dn gn dp gp vdd XN dn gn 0 0 sky130_fd_pr__nfet_01v8 W=6.67 L=1 XP dp gp vdd vdd sky130_fd_pr__pfet_01v8 W=6.1 L=0.15 .ends
- Measured by the grader
NMOS current: 292.5 µA (needs 300 µA ± 5 %) PMOS current: 300.8 µA (needs 300 µA ± 5 %) Gate area: 7.585 µm² (budget ≤ 1.5 µm²)
At L = 1 µm the square-law width is right within 2.5 %. The device needs 6.67 µm² of gate, far over the budget.
Constraints and Contract
- The netlist defines .subckt drv dn gn dp gp vdd ... .ends exactly once, with these ports in this order.
- Inside drv: X instances of sky130_fd_pr__nfet_01v8 and sky130_fd_pr__pfet_01v8 only, with W= and L= given as numbers or .param values. The line may also carry m= for parallel copies; mult= is refused.
- The grader writes the .lib line itself. Everything outside drv is replaced by its bench.
Hints
Hint 1
Run the starter and read both currents. Compare each with the 300 µA the paper sizing promised.
Hint 2
The constants of a long device do not describe a 0.15 µm one. Size each device from its own measured current.
Hint 3
Current does not scale exactly with W at these widths. After you scale a width, run again and trim.
Hint 4
A longer channel follows the square law more closely, but check what it costs in gate area for the same current.
What the grader checks: The grader places drv under its own bench and reads both drain currents from one op at tt, 27 °C. Engine: ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-12 with tools/spice-judge.mjs. The area is the sum of W · L · m in the netlist. It proves the two currents at this one bias point. It does not check other corners, other voltages, mismatch or speed.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit drv and makes 1 ngspice run. 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