Repository navigation
A second real PDK and the fully-differential campaign: SKY130 1.8 V for the
gm/Id sizer with a per-tech intent registry, the FD correctness work that took
fully-differential circuits from a mis-sensed CMFB to SPICE-verified open-loop
gain, CMRR and PSRR, and a recognizer that now reads sized netlists.
Added
- ✨ Recognizer parser accepts sized SPICE netlists — MOSFET
W/L/nf/mparams,sky130_fd_pr__*/foundry model names via a configurable model-name table, and preserved R/C value tokens; sizes ride along onDevice.paramsandrecognize()is unchanged (#169). - ✨ SKY130 1.8 V core PDK for the gm/Id sizer — trimmed vendored PDK,
device_handle/wl_unitstech fields, LUT monotone-envelope fix (#159). - ✨ Per-tech gm/Id intent registry —
make_intent/INTENT_BY_TECH/intent_for_tech(tech.name)threaded intosize_gmid, so a per-tech override moves the block-intents (drive geometry) and flat role fallbacks (drive the pre-geometrygdsestimate) together; ships a feasible sky130 spec and fixes the sky130.opnon-convergence it surfaced (#187). - ✨ Optional body-effect coefficients (
gamma/phi) onMosfetParamsplusextract_tech.py --body-effect, which fits γ/2φF per tech from a reverse-body-biasvthsweep (populated for gf180/sky130) — latent infrastructure for a future Vsb-aware model. Investigating #106, an analytic cascode-rail body-effect correction built on these was found to regress the gf180 two-stage benchmark (126 → 114 accepted; the reported cascode failures were already resolved by #124/#167), so the rail-planner correction itself was not applied (#106).
Changed
- ♻️ Consolidate
vcmandrail_vontoSizingSpec— the input common mode and a supply net's DC level become single named definitions on the spec instead of copies scattered across the gm/Id modules; with #206 this closes the #201 deduplication umbrella (#207). - ♻️ Consolidate the five grid-snap copies onto
GridSpec.snap— one snap-then-clamp definition replaces the private_snap_w/_snap_lhelpers inbias.py,bias_levels.py,stage_interface.pyand friends (#206). - ♻️ Decouple gm/Id techs from the Level-1 square-law schema —
MosfetParams.vth/mu_cox/lamare now optional (a gm/Id PDK tech may omit thenmos:/pmos:blocks entirely) andsize_load_resistorstakes a LUT-sourced per-polarity seed; drops the honest-but-dead square-law placeholders sky130's degenerate-at-Lmin fit was forced to carry to satisfy a schema it never touches (#195). - ♻️ Rename the stage-interface compatibility filter
second_stage→stage_interface(module,is_*_compatible, call site) — behavior-neutral, closing the gap #144's doc-stub rename opened (#178).
Fixed
- 🐛 Flag un-measurable analytical open-loop gain — advisory
OPEN_LOOP_GAIN_CEILING_DB/open_loop_measurableonSizingResultso consumers can deprioritise three-stage topologies that report ~178 dB analytically then rail to 0 dB on every SPICE corner whilebias_feasiblestaysTrue(#194). - 🐛 Reserve the gm/Id
output_stageintent block for the source-follower buffer (fixed gm/Id = 15, L = 1× min); a third gain stage now maps togain_stage, aligning sizer terminology with the synthesizer/recognizer (whereoutput_stageis specifically a unity-gaincommon_drain_*follower) (#172). - 🐛 Drop the unconnected
vcm_refpin from FD circuits whosecmfbis pruned — for the 10/14 non-differentialloadvariantsprune_cmfbempties the CMFB slot, leavingvcm_refa no-op external pin the sizer already treats as semantic (has_vcm) (#180). - 🐛 Remove the uncategorized
cascoded_differential_pair_pmosSR pattern — the only library pattern with neithercategorynorcircuit_block, so FBR skipped it in both slotting modes (recognized-but-never-slotted, inert) and its cascodes-in-input-pair shape contradicted the load-cascode convention (#192). - 🐛
telescopic_cascode_load_nmostaggedbias_infeasible— its self-biased PMOS diode stack pins the internal cascode node atvdd − |Vgs_mp1| − |Vgs_mp3|, an untunable ceiling that leaves the input-side NMOS cascode ~25 mV into triode (18/18 fail the gf180 DC bias gate); dropped from default enumeration and kept for design-space exploration, with the wide-swingtelescopic_cascode_load_wideswing_nmosas the feasible equivalent (#189). - 🐛 Slew-rate SPICE measurement read the pole-zero-doublet settling tail instead of the slew plateau — steepest-secant-over-20%-swing replaces the 20–80% average, which collapsed to the settling speed on unsettled edges (ptm45 two-stage 0.7 → 11 V/µs) (#186).
- 🧪 Repair
test_analytic_gain_gate_skips_spice, regressed by #148'sgain_db=Nonerailing gate — the test now selects a computed-gain candidate that actually exercises the #125 gate (#186). - 🐛 FD load resistors never landed in the
loadslot —out1/out2pin aliases + rail-check hooks onresistor_load_*; the synthesizer's 1 kΩ placeholder no longer ships (#163). - 🐛 FD CMFB senses the outputs (
outp/outn), with loop polarity from the stage chain's inversion parity (orient_cmfb,<name>_invertingvariants) — output CM was unregulated in every CMFB variant (#167). - 🐛 FD stage-interface check for CMFB-pinned interfaces — equality repair machinery, auto-exempting output-sensing CMFBs (#164).
- 🐛 FD-capable DC bias-soundness gate —
_read_op_fdopen-input.op, output-state verdict (railed/split); dead FD circuits no longer masquerade as noise-floor gain misses (#166). - 🐛 FD benches drop the cross-feedback ties for the standard open-input rig — the tie network is bistable against a real CM loop (healthy sky130 circuits measured −79 dB) and made the FD DC check vacuous (#170).
- 🐛 Re-tune the five
ptm45example specs so each sizes with all margins ≥ 0 under gm/Id — 2-stage phase margin viasecond_stage_current_ratio2.5→4.0, output-swing headroom 0.1/0.15→0.2 V, 3-stage FDthird_stage_current_ratio5→6 and swing-min 0.15→0.2 V, one-stage gain 40→30 dB; restores a ptm45-only per-topology regression guard so the specs cannot silently drift again (#74).
Docs
- 📝 SKY130 designer survey (
examples/sky130_results/) — for each of the 13 op-amp templates, how many synthesizable topologies meet the SKY130 1.8 V survey spec (45 dB, 2 MHz GBW, 60° PM, ≤ 2 mW), SPICE-verified with ngspice (#205). - 📝 Restructure the
equations.pywalkthrough around the Shichman–Hodges square law — state the law once, derive every formula from it in a single pass, and map each to its CircuitGenome function (8 parts → 5) (#204). - 📝 Code walkthroughs — 34 hand-authored, figure-rich HTML deep dives into the sizer and recognizer internals, shipped verbatim alongside the Sphinx docs (
html_extra_path, ADR 0002) with a searchable landing page and module-page deep-dive links (#173). - 📝 Sync the HTML code walkthroughs with #158/#190/#77/#155 (9 files, +67/−25) — living documents co-updated with the code they describe (#198).
- 📝 Document why the FD source-follower buffer slots are deliberately absent from
_FD_PAIRS—_apply_symmetrygroups a pair bytypealone and would fuse the two same-polarity follower devices — plus a regression test locking the invariant (#177). - 📝 Derive the cascode
Rin = ro·(1 + gm·Rsrc)boost formula in the gm/Idblocks.pywalkthrough — intuition, two theme-aware SVGs, three-step KCL (#176). - 📝 Update the
intent.pywalkthrough for the followeroutput_stage(fixed gm/Id = 15, L = 1× min) after #172 (#174). - 📝 Restructure this changelog to the Keep a Changelog + SemVer format (one line per PR).
- 📝 Clarify the overview template table and buffered op-amps (#154).
Internal / Build
- 🔧 Ignore
.claude/and thebsim4v5.outngspice scratch output, keeping local scratch files out of the untracked list (#200). - 🧪 Lock in measured FD CMRR/PSRR (
test_fd_cmrr_psrr_measured) — the #165/#167 CMFB output-sense rewire opened theac_cleangate, so FD rejection metrics already flow throughsimulate_metrics(169.6/207.2 dB on the frozen three-stage FD); the FD half of #184 (#197). - 🧪 Guard bias resistors off gate/current rails — across every enumerated 1-/2-stage-SE/2-stage-FD combination a constructed
r*_bias_genappears only oncascode_*/tunablerails and never on agate_*/current_*rail, locking in the #100 single-global-v_gateresolution (#188). - 🧪 Lock SPICE slew-rate and output-swing on the real device techs (ptm45 BSIM4, gf180mcu gm/Id), not just the generic Level-1 anchor (#63) (#185).
- 🧪 Lock in FD open-loop AC metrics (#61) — two-stage FD passes (≈49 dB / 7.8 MHz / 88°); three-stage seeded as a frozen-netlist
xfail(#182). - 🧪 Correct the three-stage FD AC test to a passing ~66 dB assertion — the #182
xfailwas a stale pre-#167 site-packages install sensing the CMFB at the first-stage node; the working tree already senses the true outputs (#183). - 🧪 Restore coverage of the stage-interface reject path —
test_stage_interface_rejects_unclosable_gapwas skipped (and unsatisfiable) once followers moved to theoutput_stagecategory, leaving thebias_feasible = Falseverdict untested; it now rejects via a legal folded-cascode PMOS load + NMOS common-source pairing at 1.5 V. Its siblingtest_stage_interface_repairs_follower_pinis dropped — the mirror-stack repair it asserted is covered bytest_stage_interface_repairs_telescopic_cs(#124). - 🔧 Pin the untapped-load-branch filter's redundancy as a test-enforced invariant — kept as a structural (device-wiring-derived) defense-in-depth guard against a mistagged single-ended load, though the
output_cardinalitytag filter already drops everything it would (#193).
Install: pip install circuitgenome==0.3.0
Verified before release: full suite 427 passed / 12 skipped / 0 failed; wheel and sdist install into a clean venv with all three techs (gf180mcu, ptm45, sky130) resolving every data file from site-packages, and an ngspice .op deck biasing correctly off the installed SKY130 PDK.
Note for anyone who tracked main between #159 and this release: the vendored SKY130 PDK was absent from built artifacts until #210 widened the package-data globs. Only source checkouts could run SKY130 SPICE before 0.3.0.