Build a stage with a gain of 3 that holds within 3 % at tt, ss and ff. It must stay within 10 % when its bias current is far off. The starter has a gain of 0.83.
Circuit context: A common-source stage in a sensor chain on 1.8 V, its input level set by a diode-connected NMOS 5/1 that carries an untrimmed bias current. Give one stage of a sensor chain a gain of 3 that does not follow the corner or the bias current.
A sensor chain needs one stage with a gain of exactly 3. The gain must not depend on the process corner. It must also hold when the bias current of the chip is off, because that current is not trimmed.
The previous stage ends in a diode-connected NMOS, 5 µm wide and 1 µm long, that carries the bias current. Its gate voltage is the DC level of your input. The bias current is 10 µA nominal and may be anywhere from 7 µA to 14 µA.
The starter is a diode-loaded stage with two equal transistors. Redesign the subcircuit gain3. You choose the kind of load and every size.
What the Grader Measures
Your subcircuit gain3 (ports in, out, vdd) under the grader's own bench, one run per corner (tt, ss, ff):
| Check | Corner | Rule |
|---|---|---|
| Gain at 10 µA | tt | 2.91 to 3.09 |
| Gain at 10 µA | ss | 2.91 to 3.09 |
| Gain at 10 µA | ff | 2.91 to 3.09 |
| Gain at 7 µA | tt | 2.7 to 3.3 |
| Gain at 14 µA | tt | 2.7 to 3.3 |
| Output level | tt | ≥ 300 mV |
| Supply current of the stage | tt | ≤ 12 µA |
Full specification
.subckt gain3 in out vdd
* resistors and X instances of sky130_fd_pr__nfet_01v8,
* sky130_fd_pr__nfet_01v8_lvt or sky130_fd_pr__pfet_01v8
.ends
| Check | Condition | Rule | How the grader measures it |
|---|---|---|---|
| Gain at 1 kHz | tt, ss and ff, 10 µA of bias | 2.91 to 3.09 | ac: |v(out)| with AC 1 on the input |
| Gain at 1 kHz | tt, 7 µA and 14 µA of bias | 2.7 to 3.3 | the same, after the bias current is changed |
| Output level | tt, 10 µA | ≥ 0.3 V | op: v(out) |
| Supply current of the stage | tt, 10 µA | ≤ 12 µA | op: the current out of the 1.8 V source, less the bias current |
The grader runs its bench three times, with .lib sky130 tt, ss and ff at 27 °C. The supply is 1.8 V and the output has no load.
Examples
Example 1
The Starter: Two Equal NMOS Transistors- Design
.subckt gain3 in out vdd * M1 amplifies; M2 is a diode-connected load of the same size XM1 out in 0 0 sky130_fd_pr__nfet_01v8 W=5 L=1 XM2 vdd vdd out 0 sky130_fd_pr__nfet_01v8 W=5 L=1 .ends
- Measured by the grader
Gain at 10 µA: 0.8335 (needs 2.91 to 3.09) Gain at 10 µA at ss: 0.8339 (needs 2.91 to 3.09) Gain at 10 µA at ff: 0.8331 (needs 2.91 to 3.09) Gain at 7 µA: 0.8317 (needs 2.7 to 3.3) Gain at 14 µA: 0.8348 (needs 2.7 to 3.3) Output level: 924 mV (needs ≥ 300 mV) Supply current of the stage: 10.18 µA (needs ≤ 12 µA)
The gain is the same at every corner and every current, which is the good part. It is below 1, because the two gm values are equal and the body effect of the load adds to the denominator.
Example 2
A Resistor Load of 21.5 kΩ- Design
.subckt gain3 in out vdd XM1 out in 0 0 sky130_fd_pr__nfet_01v8 W=5 L=1 R1 vdd out 21.5k .ends
- Measured by the grader
Gain at 10 µA: 3.041 (needs 2.91 to 3.09) Gain at 10 µA at ss: 3.016 (needs 2.91 to 3.09) Gain at 10 µA at ff: 3.065 (needs 2.91 to 3.09) Gain at 7 µA: 2.414 (needs 2.7 to 3.3) Gain at 14 µA: 3.715 (needs 2.7 to 3.3) Output level: 1.571 V (needs ≥ 300 mV) Supply current of the stage: 10.67 µA (needs ≤ 12 µA)
The gain is 3.04 at 10 µA at all three corners. It follows the bias current: 2.41 at 7 µA and 3.71 at 14 µA. Only gm changes, and nothing cancels it.
Example 3
An NMOS Diode Load with Its Body at Ground- Design
.subckt gain3 in out vdd XM1 out in 0 0 sky130_fd_pr__nfet_01v8 W=5 L=1 XM2 vdd vdd out 0 sky130_fd_pr__nfet_01v8 W=0.42 L=1.05 .ends
- Measured by the grader
Gain at 10 µA: 2.974 (needs 2.91 to 3.09) Gain at 10 µA at ss: 3.159 (needs 2.91 to 3.09) Gain at 10 µA at ff: 2.829 (needs 2.91 to 3.09) Gain at 7 µA: 2.744 (needs 2.7 to 3.3) Gain at 14 µA: 3.151 (needs 2.7 to 3.3) Output level: 628.3 mV (needs ≥ 300 mV) Supply current of the stage: 9.935 µA (needs ≤ 12 µA)
The gain is 2.97 at tt, and it holds at 7 µA and 14 µA. It reads 3.16 at ss and 2.83 at ff. The body of the load stays at ground, and that body effect changes with the corner.
Constraints and Contract
- The netlist defines .subckt gain3 in out vdd ... .ends exactly once, with these ports in this order.
- Inside gain3: resistors and X instances of sky130_fd_pr__nfet_01v8, sky130_fd_pr__nfet_01v8_lvt or sky130_fd_pr__pfet_01v8, with comments and .param lines. No sources.
- The grader writes the .lib line for each corner itself. It replaces everything outside gain3 with its own bench.
Hints
Hint 1
Run the starter. Two equal transistors carry the same current, so their gm values are almost equal. Which extra term pulls the gain below 1?
Hint 2
A gain that is a ratio of two transconductances moves little with the current. A gain of gm times a resistance follows gm.
Hint 3
The square law gives a first size for the load. Then trim one width in a few runs: these devices are not in strong inversion at 10 µA.
Hint 4
Check ss and ff before you submit. A load whose source moves against a fixed body adds a term that changes with the corner.
What the grader checks: The grader places gain3 under its own bench, on 1.8 V and with no load. A diode-connected NMOS 5/1 that carries the bias current sets the input level. It measures the gain at tt, ss and ff, and at tt with 7 µA and 14 µA of bias. Engine: ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-12 with tools/spice-judge.mjs. The run proves those small-signal gains at 27 °C. It does not check the signal swing, the bandwidth, temperature or mismatch.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit gain3 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