gm/Id — Bias Levels¶
Tune the constructed bias generator’s level devices (gm/Id pipeline).
The demand-driven bias generator (synthesizer bias_construction.py +
config/bias_legs.yaml) contains two kinds of devices whose operating
point is a level choice, not a mirror ratio, so the intent-table geometry
pass cannot size them:
Cascode-leg level diodes (
cascode_gnd/cascode_vddlegs): the rail must sit at the consumer cascode’sV_GSplus its stack’s saturation floor. The leg’s diode covers theV_GSpart (re-sized here to match the consumers’ plannedV_GS, so the rail tracks Vth over process/temperature) and the floor resistor under it covers the small Vdsat floor (R = floor / I_leg).The pref branch’s wide-swing cascode level (
ncasc): the branch’s NMOS mirror is cascoded to pin its Vds near the master reference’s (uncascoded it runs atvdd - |V_GSP|– the ~4% extra-mirror-hop error of issue #103’s A/B). Thencascdiode is sized narrow (highV_GS) to push the pinned Vds as close to the master’sV_GSas the LUT range and the pref node’s headroom allow; the cascode itself is re-sized to the weak-inversion end (lowV_GSand Vdsat) to maximize that reach.
Both detections are structural (actual device terminals – a diode riding a
resistor to a supply, a mirror-drain cascode topped by a diode), so external
netlists without these shapes pass through untouched. Runs after geometry
and the DC operating-point check; its resistor values override the generic
fallback size_resistors() assigns to nets it cannot
derive.
- circuitgenome.sizer.gmid.bias_levels.tune_bias_levels(blocks, ids_map, sizing, model, spec, tech)[source]¶
Return
(sizing, level_resistors)with the bias levels tuned.The input mapping is never mutated.
level_resistorscarries the cascode legs’ floor-resistor values; merge it over the generic values fromsize_resistors()(which cannot derive a level for amidnet and falls back to its representative value).- Parameters:
blocks (OpAmpBlocks)
sizing (dict[str, TransistorSizing])
spec (SizingSpec)
tech (TechParams)
- Return type: