Build a common-source stage with a gain of 4 that holds within 5 % at tt, ss and ff. The input level is fixed, and the output must still swing 0.6 V.
Circuit context: A degenerated SKY130 common-source stage driven by a previous stage that rests at 0.75 V in every corner. Design a gain-of-4 stage whose gain does not follow the wafer.
A sensor amplifier needs a gain of 4 that does not depend on the wafer. The previous stage rests at 0.75 V in every corner.
The starter has no source resistor. Its gain is 3.99 at tt, 3.36 at ss and 4.64 at ff.
Design the subcircuit dstage: one NMOS, a drain resistor and a source resistor. Choose W, L and both resistors.
Nobody re-biases the input per corner here. The source rests at the input level minus VGS, so your device sets it.
The gain must stay between 3.8 and 4.2 at all three corners. A 75 mV input step each way must move the output at least 0.27 V.
What the Grader Measures
Your subcircuit dstage (ports in, out, vdd) under the grader's own bench, one run per corner (tt, ss, ff):
| Check | Corner | Rule |
|---|---|---|
| Gain at 1 kHz | tt | 3.8 to 4.2 |
| Gain at 1 kHz | ss | 3.8 to 4.2 |
| Gain at 1 kHz | ff | 3.8 to 4.2 |
| Output rise for −75 mV in | tt | ≥ 270 mV |
| Output rise for −75 mV in | ss | ≥ 270 mV |
| Output rise for −75 mV in | ff | ≥ 270 mV |
| Output fall for +75 mV in | tt | ≥ 270 mV |
| Output fall for +75 mV in | ss | ≥ 270 mV |
| Output fall for +75 mV in | ff | ≥ 270 mV |
Full specification
.subckt dstage in out vdd
* resistors, capacitors and SKY130 1.8 V FETs (sky130_fd_pr__nfet_01v8, sky130_fd_pr__pfet_01v8)
.ends
| Check | Corner | Rule | How the grader measures it |
|---|---|---|---|
| Gain at 1 kHz | tt, ss, ff | 3.8 to 4.2 | ac: |v(out)| with AC 1 on the input |
| Output rise | tt, ss, ff | ≥ 0.27 V | dc: v(out) at 0.675 V in, minus v(out) at 0.75 V in |
| Output fall | tt, ss, ff | ≥ 0.27 V | dc: v(out) at 0.75 V in, minus v(out) at 0.825 V in |
An ideal gain of 4 turns 75 mV into 0.3 V. The rule accepts 90 % of that in each direction.
The grader uses a 1.8 V supply and 27 °C. It runs once per corner with .lib sky130 tt, ss and ff.
Examples
Example 1
The Starter: No Source Resistor- Design
.subckt dstage in out vdd RD vdd out 15.9k XM1 out in 0 0 sky130_fd_pr__nfet_01v8 W=4 L=0.5 .ends
- Measured by the grader
Gain at 1 kHz: 3.991 (needs 3.8 to 4.2) Gain at 1 kHz at ss: 3.363 (needs 3.8 to 4.2) Gain at 1 kHz at ff: 4.641 (needs 3.8 to 4.2) Output rise for −75 mV in: 217.7 mV (needs ≥ 270 mV) Output rise for −75 mV in at ss: 175.7 mV (needs ≥ 270 mV) Output rise for −75 mV in at ff: 263.6 mV (needs ≥ 270 mV) Output fall for +75 mV in: 377.4 mV (needs ≥ 270 mV) Output fall for +75 mV in at ss: 331 mV (needs ≥ 270 mV) Output fall for +75 mV in at ff: 423.4 mV (needs ≥ 270 mV)
The gain follows g_{m} from 3.36 to 4.64. The output rests near 1.47 V and cannot rise 0.27 V without losing gain.
Example 2
A Very Wide Device and a Large R_{S}- Design
.subckt dstage in out vdd RD vdd out 196k XM1 out in s 0 sky130_fd_pr__nfet_01v8 W=200 L=0.5 RS s 0 33k .ends
- Measured by the grader
Gain at 1 kHz: 3.997 (needs 3.8 to 4.2) Gain at 1 kHz at ss: 3.992 (needs 3.8 to 4.2) Gain at 1 kHz at ff: 3.98 (needs 3.8 to 4.2) Output rise for −75 mV in: 296.7 mV (needs ≥ 270 mV) Output rise for −75 mV in at ss: 294.8 mV (needs ≥ 270 mV) Output rise for −75 mV in at ff: 297.8 mV (needs ≥ 270 mV) Output fall for +75 mV in: 256 mV (needs ≥ 270 mV) Output fall for +75 mV in at ss: 290.2 mV (needs ≥ 270 mV) Output fall for +75 mV in at ff: 203.3 mV (needs ≥ 270 mV)
The gain is within 0.5 % in every corner. The output rests at 0.55 V at tt, and the fall runs into the triode region.
Example 3
A Wide Device and R_{S} = 10 kΩ- Design
.subckt dstage in out vdd RD vdd out 63.3k XM1 out in s 0 sky130_fd_pr__nfet_01v8 W=60 L=0.5 RS s 0 10k .ends
- Measured by the grader
Gain at 1 kHz: 4.002 (needs 3.8 to 4.2) Gain at 1 kHz at ss: 3.947 (needs 3.8 to 4.2) Gain at 1 kHz at ff: 4.049 (needs 3.8 to 4.2) Output rise for −75 mV in: 288.9 mV (needs ≥ 270 mV) Output rise for −75 mV in at ss: 283.3 mV (needs ≥ 270 mV) Output rise for −75 mV in at ff: 293.9 mV (needs ≥ 270 mV) Output fall for +75 mV in: 306.9 mV (needs ≥ 270 mV) Output fall for +75 mV in at ss: 304.7 mV (needs ≥ 270 mV) Output fall for +75 mV in at ff: 309 mV (needs ≥ 270 mV)
The gain stays between 3.95 and 4.05. The output rests near 0.89 V at tt and moves at least 0.28 V each way.
Constraints and Contract
- The netlist defines .subckt dstage in out vdd ... .ends exactly once, with these ports in this order.
- Inside dstage: resistors, capacitors and X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8. No sources.
- Keep the NMOS body at node 0, as on a real p-type wafer.
- The grader writes the .lib line for each corner itself. Its bench replaces everything outside dstage.
Hints
Hint 1
The gain is close to gmRD/(1 + (gm + gmb)RS). The corners move gm. A large (gm + gmb)RS hides that.
Hint 2
The source rests at IDRS, and that equals 0.75 V minus VGS. Which device gives a lower VGS at the same current?
Hint 3
RD drops about four times what RS drops, plus more. Add up the drops before you make the source voltage larger.
What the grader checks: The grader measures the gain at 1 kHz at tt, ss and ff. It also measures how far a 75 mV input step moves the output each way. All numbers come from ngspice 42 with the pinned SKY130 models, measured 2026-11-12. It does not check bandwidth, noise, temperature or resistor spread.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit dstage 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