Output Compatibility¶
Output-cardinality compatibility filter for
enumerate_circuits().
load.in1/in2 (the folding nodes fed by input_pair.out1/out2)
and load.out/out1/out2 (the load’s actual output node(s)) are
wired to separate nets, and a topology template’s output_type
("single_ended" or "fully_differential") determines which of the
output-side ports get a net at all:
load.in1/in2are always wired, in every topology.load.out1/out2are wired tonet_loadout1/net_loadout2only infully_differentialtopologies (sensed bycmfb/second_stage*/comp*);single_endedtopologies never connect them.load.out/out2are wired to the stage’s single output node only insingle_endedtopologies;fully_differentialtopologies never connectload.out.
Two groups of load variants declare a mandatory port whose net
assignment depends on which of these rules applies:
folded_cascode_load_*_input_single_outputandtelescopic_cascode_load_{pmos,nmos}declareoutasrole: output(mandatory) andout1/out2asrole: optional(unused – those branches have no separate cascode-output device). In afully_differentialtopology,outis never wired byslot_connections, so the device terminal falls back to the internal-node naming and becomes a floating, disconnected node. ->output_cardinality: "single", compatible only withoutput_type: "single_ended".folded_cascode_load_*_input_differential_outputdeclareout1/out2asrole: output(mandatory, distinct cascode-output nodes) andoutasrole: optional(unused). In asingle_endedtopology,out1/out2are never wired byslot_connections(nonet_loadout1/net_loadout2net is defined there), so the cascode device whose drain isout1(orout2) becomes a floating, disconnected node. ->output_cardinality: "differential", compatible only withoutput_type: "fully_differential".
current_source_load_{pmos,nmos} carry the "differential" tag for an
electrical reason instead of a port-wiring one: their branch devices are
plain current sources gated by bias_cmfb, so the load only has a defined
operating point when the CMFB loop drives that gate – which only
fully_differential topologies provide (issue #112; the untapped-branch
filter, load_branch, would
independently reject them in single_ended topologies).
The other 6 load variants (resistor/active/current-source loads) declare
out1/out2 as alias_of: in1/in2 and out as optional –
their devices reference only in1/in2, and a net-merge pass (see
net_aliasing) collapses out1/out2’s
assigned net back onto in1/in2’s after assembly, regardless of
output_type. The 4 resistor/active loads are therefore untagged
(output_cardinality is None) and compatible with every topology.
To extend: tag new or edited load variants with
output_cardinality: "single" / "differential" in
opamp_modules.yaml – no code changes needed here.
- circuitgenome.synthesizer.compatibility.output.is_output_type_compatible(topology, variant_map)[source]¶
Return
Falseifload’soutput_cardinality(if set) doesn’t match topology’soutput_type.loadis the only slot with anoutput_cardinalitytag; a load with no tag (None) is compatible with every topology.- Parameters:
topology (TopologyTemplate)
variant_map (dict[str, ModuleVariant])
- Return type: