Build a divider that gives a quarter of its supply within 0.2 % from −40 °C to 125 °C. The starter is right at 27 °C and wrong everywhere else.
Circuit context: SKY130 poly resistors and capacitors as two-terminal blocks: a divider on a 1.8 V rail and a 1.5 pF filter capacitor. Build the divider of a battery monitor so its ratio does not drift with temperature.
A battery monitor reads a quarter of the supply with an ADC. The divider in the starter was trimmed on the bench at 27 °C and passed. In the field the reading drifts with temperature by several percent.
Rebuild the subcircuit div from SKY130 poly resistors. The tap must stay at 0.250 of the top voltage, within 0.2 %, from −40 °C to 125 °C. The divider must not load the battery or the ADC. Its total resistance at 27 °C must lie between 100 kΩ and 150 kΩ.
You choose the film, the size of each resistor and how many you use.
What the Grader Measures
Your subcircuit div (ports top, tap, gnd) under the grader's own bench, one run per corner (tt):
| Check | Corner | Rule |
|---|---|---|
| Smallest tap ratio, −40 °C to 125 °C | tt | ≥ 0.2495 |
| Largest tap ratio, −40 °C to 125 °C | tt | ≤ 0.2505 |
| Total resistance at 27 °C | tt | 100 kΩ to 150 kΩ |
Full specification
.subckt div top tap gnd
* X instances of sky130_fd_pr__res_high_po or sky130_fd_pr__res_xhigh_po
* form: X<name> <end> <end> <substrate> <model> w=<um> l=<um>
.ends
| Check | Rule | How the grader measures it |
|---|---|---|
| Smallest tap ratio, −40 °C to 125 °C | ≥ 0.2495 | dc TEMP sweep in 1 °C steps: the lowest v(tap)/v(top) |
| Largest tap ratio, −40 °C to 125 °C | ≤ 0.2505 | the same sweep: the highest v(tap)/v(top) |
| Total resistance at 27 °C | 100 kΩ to 150 kΩ | 1.8 V on top, gnd at 0 V: v(top) divided by the supply current |
The grader runs its bench once, with .lib sky130 tt. The tap is not loaded. The library keeps resistors at their nominal values in every corner, so one corner is enough.
Examples
Example 1
The Starter: Two Films, Trimmed at 27 °C- Design
.subckt div top tap gnd * top: one piece of the 2 kohm/sq film; bottom: the 325 ohm/sq film; trimmed at 27 C XR1 top tap gnd sky130_fd_pr__res_xhigh_po w=1 l=42.4 XR2 tap gnd gnd sky130_fd_pr__res_high_po w=1 l=91 .ends
- Measured by the grader
Smallest tap ratio, −40 °C to 125 °C: 0.2446 (needs ≥ 0.2495) Largest tap ratio, −40 °C to 125 °C: 0.2613 (needs ≤ 0.2505) Total resistance at 27 °C: 119.8 kΩ (needs 100 kΩ to 150 kΩ)
The ratio is 0.2500 at 27 °C. The bottom film rises with temperature. In this simulator the top film does not, so the ratio is 0.2447 cold and 0.2613 hot.
Example 2
One Film, the Top Drawn as One Piece Three Times as Long- Design
.subckt div top tap gnd XR1 top tap gnd sky130_fd_pr__res_high_po w=1 l=276 XR2 tap gnd gnd sky130_fd_pr__res_high_po w=1 l=92 .ends
- Measured by the grader
Smallest tap ratio, −40 °C to 125 °C: 0.2515 (needs ≥ 0.2495) Largest tap ratio, −40 °C to 125 °C: 0.2516 (needs ≤ 0.2505) Total resistance at 27 °C: 120.3 kΩ (needs 100 kΩ to 150 kΩ)
The drift is gone, because both pieces are one film. The ratio is still 0.6 % high at every temperature. The long piece has three times the body but only one pair of ends.
Example 3
One Film, the Top Drawn a Third as Wide- Design
.subckt div top tap gnd XR1 top tap gnd sky130_fd_pr__res_high_po w=0.35 l=92 XR2 tap gnd gnd sky130_fd_pr__res_high_po w=1.05 l=92 .ends
- Measured by the grader
Smallest tap ratio, −40 °C to 125 °C: 0.2376 (needs ≥ 0.2495) Largest tap ratio, −40 °C to 125 °C: 0.2376 (needs ≤ 0.2505) Total resistance at 27 °C: 121.3 kΩ (needs 100 kΩ to 150 kΩ)
A third of the drawn width does not give three times the resistance. The etched width differs from the drawn width by a fixed amount, which matters more on the narrow strip.
Constraints and Contract
- The netlist defines .subckt div top tap gnd ... .ends exactly once, with these ports in this order.
- Inside div: only X instances of sky130_fd_pr__res_high_po or sky130_fd_pr__res_xhigh_po, with comments and .param lines. Ideal resistors are not accepted.
- The grader writes the .lib line itself. It replaces everything outside div with its own bench.
Hints
Hint 1
Run the starter and print k at −40 °C and at 125 °C. Which of its two resistors moves with temperature?
Hint 2
Two films drift by different amounts, so their ratio drifts. One film on both sides drifts by one common factor.
Hint 3
A resistor is a body plus two ends. Compare one long piece with several short pieces that add up to the same length.
What the grader checks: The grader places div under its own bench: 1.8 V on top and no load on the tap. It sweeps the temperature from −40 °C to 125 °C at tt. Engine: ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-12 with tools/spice-judge.mjs. The run proves the ratio and the total resistance in this model. The model has no die-to-die spread and no mismatch between units. ngspice 42 applies no temperature coefficient to sky130_fd_pr__res_xhigh_po.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit div 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 2 steps and the final capstone