A buffer passed its accuracy test from 0.7 V to 1.2 V, yet it is slow at the low end. Find what the test hid and fix the input range.
Circuit context: A five-transistor OTA used as a sensor buffer for input levels from 0.7 V to 1.2 V, biased from a 20 µA reference. Debug a buffer that meets its DC accuracy over the input range but settles slowly at the low end.
A sensor drives a unity-gain buffer with levels from 0.7 V to 1.2 V. The buffer is a five-transistor OTA with OTA-A's input pair and tail.
Its designer widened the mirror load to 64/1 for the upper edge. Then the designer swept the buffer and read the error.
The error was 0.69 mV at 0.7 V, −1.40 mV at 0.95 V and −3.73 mV at 1.2 V. The buffer was signed off.
On the bench it settles slowly at 0.7 V. Its unity-gain frequency there is 16.0 MHz, against 23.8 MHz at 0.95 V.
Fix the subcircuit ota so the whole range from 0.7 V to 1.2 V works. The table below lists the checks, at tt and ss.
The 20 µA reference stays in the bench and feeds the line nb. The bias diode MB is inside ota, so its size is yours.
What the Grader Measures
Your subcircuit ota (ports inp, inn, out, vdd, nb) under the grader's own bench, one run per corner (tt, ss):
| Check | Corner | Rule |
|---|---|---|
| Tail current at 0.7 V over 0.95 V | tt | ≥ 0.9 |
| CMRR at 0.7 V | tt | ≥ 55 dB |
| Unity-gain frequency at 0.7 V | tt | ≥ 25 MHz |
| Open-loop gain at 0.7 V | tt | ≥ 40 dB |
| CMRR at 0.95 V | tt | ≥ 55 dB |
| CMRR at 1.2 V | tt | ≥ 45 dB |
| Tail current at 0.95 V | tt | 18 µA to 21 µA |
| Tail current at 0.7 V over 0.95 V | ss | ≥ 0.9 |
| CMRR at 0.7 V | ss | ≥ 55 dB |
| Unity-gain frequency at 0.7 V | ss | ≥ 25 MHz |
Full specification
.subckt ota inp inn out vdd nb
* MB (the diode on nb), the tail M5, the pair M1 and M2, the mirror M3 and M4
.ends
| Check | Corner | Rule | How the grader measures it |
|---|---|---|---|
| Tail current held at 0.7 V | tt, ss | ≥ 0.9 | op: the supply current at 0.7 V over the supply current at 0.95 V |
| CMRR at 0.7 V | tt, ss | ≥ 55 dB | ac at 10 Hz: differential gain minus common-mode gain, in dB |
| Unity-gain frequency at 0.7 V | tt, ss | ≥ 25 MHz | ac: where the open-loop gain crosses 0 dB, 1 pF load |
| Open-loop gain at 0.7 V | tt | ≥ 40 dB | ac at 10 Hz, AC on the + input only |
| CMRR at 0.95 V | tt | ≥ 55 dB | as at 0.7 V |
| CMRR at 1.2 V | tt | ≥ 45 dB | as at 0.7 V |
| Tail current at 0.95 V | tt | 18 µA to 21 µA | op: the current into the OTA's supply pin |
The bench is lesson E5.2's. A 1 TH inductor closes each copy as a follower at DC, and a 1 F capacitor opens it for AC.
One copy gets AC on the + input only. A second copy gets the same AC on both inputs.
The OTA draws only its tail current from its supply pin, because the 20 µA reference is in the bench.
The limit at 1.2 V is lower. There the output sits far above the mirror node, and that asymmetry sets the common-mode gain.
Examples
Example 1
The Starter: The Buffer as Signed Off- Design
.subckt ota inp inn out vdd nb XMB nb nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM5 tail nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM1 x inp tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1 XM2 out inn tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1 XM3 x x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 XM4 out x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 .ends
- Measured by the grader
Tail current at 0.7 V over 0.95 V: 0.6238 (needs ≥ 0.9) CMRR at 0.7 V: 51.79 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V: 16.03 MHz (needs ≥ 25 MHz) Open-loop gain at 0.7 V: 42.6 dB (needs ≥ 40 dB) CMRR at 0.95 V: 62.56 dB (needs ≥ 55 dB) CMRR at 1.2 V: 49.66 dB (needs ≥ 45 dB) Tail current at 0.95 V: 18.94 µA (needs 18 µA to 21 µA) Tail current at 0.7 V over 0.95 V at ss: 0.561 (needs ≥ 0.9) CMRR at 0.7 V at ss: 50.36 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V at ss: 14.55 MHz (needs ≥ 25 MHz)
The gain at 0.7 V is still 42.6 dB, so the follower looks fine. The tail carries only 62 % of its current there.
Example 2
M5 Widened to 16/1 for More Tail Current- Design
.subckt ota inp inn out vdd nb XMB nb nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM5 tail nb 0 0 sky130_fd_pr__nfet_01v8 W=16 L=1 XM1 x inp tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1 XM2 out inn tail 0 sky130_fd_pr__nfet_01v8 W=10 L=1 XM3 x x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 XM4 out x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 .ends
- Measured by the grader
Tail current at 0.7 V over 0.95 V: 0.4792 (needs ≥ 0.9) CMRR at 0.7 V: 49.48 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V: 22.52 MHz (needs ≥ 25 MHz) Open-loop gain at 0.7 V: 42.63 dB (needs ≥ 40 dB) CMRR at 0.95 V: 57.43 dB (needs ≥ 55 dB) CMRR at 1.2 V: 44.8 dB (needs ≥ 45 dB) Tail current at 0.95 V: 37.74 µA (needs 18 µA to 21 µA) Tail current at 0.7 V over 0.95 V at ss: 0.417 (needs ≥ 0.9) CMRR at 0.7 V at ss: 48.34 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V at ss: 20.06 MHz (needs ≥ 25 MHz)
The current at 0.7 V rises, but M5 is still in triode there. In range it now carries 37.7 µA, twice the budget.
Example 3
The Pair Widened to 40/1, the Tail Untouched- Design
.subckt ota inp inn out vdd nb XMB nb nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM5 tail nb 0 0 sky130_fd_pr__nfet_01v8 W=8 L=1 XM1 x inp tail 0 sky130_fd_pr__nfet_01v8 W=40 L=1 XM2 out inn tail 0 sky130_fd_pr__nfet_01v8 W=40 L=1 XM3 x x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 XM4 out x vdd vdd sky130_fd_pr__pfet_01v8 W=64 L=1 .ends
- Measured by the grader
Tail current at 0.7 V over 0.95 V: 0.8356 (needs ≥ 0.9) CMRR at 0.7 V: 57.68 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V: 24.06 MHz (needs ≥ 25 MHz) Open-loop gain at 0.7 V: 42.22 dB (needs ≥ 40 dB) CMRR at 0.95 V: 64.34 dB (needs ≥ 55 dB) CMRR at 1.2 V: 50.21 dB (needs ≥ 45 dB) Tail current at 0.95 V: 19.17 µA (needs 18 µA to 21 µA) Tail current at 0.7 V over 0.95 V at ss: 0.7948 (needs ≥ 0.9) CMRR at 0.7 V at ss: 55.57 dB (needs ≥ 55 dB) Unity-gain frequency at 0.7 V at ss: 22.8 MHz (needs ≥ 25 MHz)
A smaller V_{GS1} lifts the tail node, so the result is partly right. M5 still loses 16 % of its current at 0.7 V.
Constraints and Contract
- The netlist defines .subckt ota inp inn out vdd nb ... .ends exactly once, with these ports in this order.
- Inside ota: resistors, capacitors and X instances of sky130_fd_pr__nfet_01v8 or sky130_fd_pr__pfet_01v8. No sources.
- The grader feeds 20 µA into nb and writes the .lib line for each corner itself. Everything outside ota is replaced by its bench.
Hints
Hint 1
The OTA draws only its tail current from VS. Add -i(VS) to the sweep and read it at 0.7 V and at 0.95 V.
Hint 2
Lesson E5.2 gives the lower edge as VGS1 + VDsat5. Each term belongs to a different device.
Hint 3
A wider M5 alone carries more current, but it needs the same VDsat. What sets the overdrive of a mirror at a fixed current?
Hint 4
Check the fix at ss. The thresholds are higher there, so the pair needs more VGS.
What the grader checks: The grader measures two copies of ota at input levels of 0.7, 0.95 and 1.2 V, at tt and ss, 27 °C. Engine: ngspice 42 (libngspice0 42+ds-3build1) with the pinned SKY130 models, measured 2026-11-12 with tools/spice-judge.mjs. It does not check ff, temperature, mismatch or levels between the three.
Run simulates your netlist as written, with your own analyses and measurements. Submit sends it to the grader, which keeps only the subcircuit ota and makes 2 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