Size a SKY130 inverter for a low noise margin of at least 0.735 V and a high one of at least 0.655 V.
Circuit context: A SKY130 inverter that receives a noisy control line. Size the PMOS against the NMOS until the two noise margins of the transfer curve are equal.
A control line runs beside a large driver that bounces the local ground. So a 0 on the line carries more noise than a 1. The inverter that receives it needs a larger low margin than high margin.
This is an Implement problem. Size the NMOS and the PMOS of the block inv. The check sweeps the input slowly from 0 V to 1.8 V. It finds the two points where the slope of the output is −1.
The low margin must be 0.735 V or more, and the high margin 0.655 V or more. Large transistors draw a large current while the input is between the levels. The peak supply current must stay at 51 µA or less.
What the Grader Measures
Your subcircuit inv (ports in, out, vdd) under the grader's own bench, one run per corner (tt):
| Check | Corner | Rule |
|---|---|---|
| Low noise margin | tt | ≥ 735 mV |
| High noise margin | tt | ≥ 655 mV |
| Peak supply current | tt | ≤ 51 µA |
Full specification
.subckt inv in out vdd
* one sky130_fd_pr__nfet_01v8 and one sky130_fd_pr__pfet_01v8
.ends
| Check | Rule | How it is measured |
|---|---|---|
| Low noise margin | ≥ 0.735 V | input at the first slope −1 point, minus the output at the second |
| High noise margin | ≥ 0.655 V | output at the first slope −1 point, minus the input at the second |
| Peak supply current | ≤ 51 µA | the largest current from the supply during the sweep |
The check runs once, at the SKY130 typical corner (tt), 27 °C and a 1.8 V supply. The input moves in steps of 1 mV and the output has no load.
Examples
Example 1
The Starter: Both Widths 1 µm- Design
.subckt inv in out vdd XN out in 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15 XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=1 L=0.15 .ends
- Measured by the grader
Low noise margin: 634.3 mV (needs ≥ 735 mV) High noise margin: 811.3 mV (needs ≥ 655 mV) Peak supply current: 19.39 µA (needs ≤ 51 µA)
The high margin has room to spare, but the low margin is only 0.634 V. The curve switches too early.
Example 2
PMOS at 2 µm- Design
.subckt inv in out vdd XN out in 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15 XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=2 L=0.15 .ends
- Measured by the grader
Low noise margin: 669.3 mV (needs ≥ 735 mV) High noise margin: 759.2 mV (needs ≥ 655 mV) Peak supply current: 28.49 µA (needs ≤ 51 µA)
The curve has moved to the right. The low margin grew to 0.669 V and the high margin fell to 0.759 V. The low margin is still too small.
Example 3
PMOS at 8 µm- Design
.subckt inv in out vdd XN out in 0 0 sky130_fd_pr__nfet_01v8 W=1 L=0.15 XP out in vdd vdd sky130_fd_pr__pfet_01v8 W=8 L=0.15 .ends
- Measured by the grader
Low noise margin: 756.2 mV (needs ≥ 735 mV) High noise margin: 651.9 mV (needs ≥ 655 mV) Peak supply current: 52.63 µA (needs ≤ 51 µA)
Now the curve is too far to the right. The high margin is 0.652 V, and the wide PMOS draws 52.6 µA at the peak.
Constraints and Contract
- The netlist defines .subckt inv in out vdd ... .ends exactly once, with these ports in this order.
- Inside inv: X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8, with comments and .param lines. No sources, resistors or capacitors. Use m= for parallel copies; mult= is refused.
- The check writes the .lib line itself. Everything outside inv is replaced by its own bench.
Hints
Hint 1
Run the starter and read the two margins. Decide which one is too small, and which transistor moves the curve the right way.
Hint 2
A wider PMOS moves the whole curve to the right. The low margin grows and the high margin shrinks. Change one width in steps and watch both.
Hint 3
Lesson G9.4 makes the margins equal. Here the low margin must be about 80 mV larger, so go past that point. Keep the NMOS at 1 µm and watch the current as the PMOS grows.
What the grader checks: The check places inv under its own bench: 1.8 V, tt, 27 °C and no load. It sweeps the input in 1 mV steps and reads both unity-gain points and the peak supply current. The tool is ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, through tools/spice-judge.mjs. The result holds for this corner and supply. Other corners move the curve, and they are outside this problem.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit inv 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