gm/Id — Resistors

Size the non-load resistor blocks of a gm/Id-sized op-amp.

The Level-1 sizer (and gm/Id phase 1) only sized rail-referenced load resistors; resistor_bias, resistor_tail, source-degeneration r1/r2, and the compensation nulling/series resistors kept the 1 kΩ netlist placeholder, mis-biasing those variants. This module sizes each per its role and reports the two metric effects (degeneration on gm1, resistor-tail output conductance on CMRR).

Sized values flow out through SizingResult.resistors and spice_sim._inject_sizes replaces the placeholder, exactly like the load resistors.

class circuitgenome.sizer.gmid.resistors.MetricModifiers(gm1_factor=1.0, gd_tail_override=None, gd_out_extra=0.0)[source]

Bases: object

How the sized resistor network alters the metric evaluation (Phase 5).

Parameters:
  • gm1_factor (float) – multiplies the input-pair gm for source degeneration (1/(1+gm1·R) = 1/(1+factor)); 1.0 when none.

  • gd_tail_override (float | None) – 1/R of a resistor tail (finite output conductance for CMRR), or None.

  • gd_out_extra (float) – output-node conductance added by a resistive-sense CMFB averager (1/R_sense), loading the FD output; 0.0 when none.

gm1_factor: float = 1.0
gd_tail_override: float | None = None
gd_out_extra: float = 0.0
circuitgenome.sizer.gmid.resistors.size_resistors(blocks, slot_resistors, ids_map, sizing, model, spec, tech, intent, cc_pf=None, cc2_pf=None)[source]

Return (extra_resistors, metric_modifiers).

extra_resistors is {ref: ohms} for the degeneration / tail / bias / cmfb / compensation resistors; the MetricModifiers carry their metric effects into the evaluation phase. cc_pf/cc2_pf are the planned compensation cap(s) the compensation-slot resistors pair with.

Parameters:
Return type:

tuple[dict[str, float], MetricModifiers]