pub struct OpAmp {
pub op_type: OpAmpType,
}Fields§
§op_type: OpAmpTypeTrait Implementations§
Source§impl Component for OpAmp
impl Component for OpAmp
Source§fn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Downcast to
Any mutably for in-place mutation (e.g., tolerance tweaks).Source§fn dyn_eq(&self, other: &dyn Component) -> bool
fn dyn_eq(&self, other: &dyn Component) -> bool
Dynamic equality: returns
true if other is the same concrete type
and compares equal.Source§fn type_tag(&self) -> &'static str
fn type_tag(&self) -> &'static str
Human-readable type name (e.g. “resistor”, “NPN transistor”).
Source§fn ports(&self) -> Vec<(&'static str, &'static str)>
fn ports(&self) -> Vec<(&'static str, &'static str)>
Terminal pairs carrying current through this component. Read more
Source§fn output_impedance(&self) -> OutputImpedance
fn output_impedance(&self) -> OutputImpedance
Output impedance at this component’s output pin. Read more
Source§fn nonideal_fx(&self, _sample_rate: f64) -> Vec<NonIdealFx>
fn nonideal_fx(&self, _sample_rate: f64) -> Vec<NonIdealFx>
Non-ideal behaviors for this component (GBW, slew, rails, thermal, etc.). Read more
Source§fn signal_terminals(&self) -> SignalTerminals
fn signal_terminals(&self) -> SignalTerminals
Signal flow classification for this component’s pins. Read more
Source§fn is_passive(&self) -> bool
fn is_passive(&self) -> bool
Whether this component is passive (collectible by BFS for stage building).
Source§fn feedback_input_is_barrier(&self) -> bool
fn feedback_input_is_barrier(&self) -> bool
Whether this element’s input node acts as a summing junction that
should block BFS traversal in the signal flow graph. Read more
Source§fn is_nonlinear(&self) -> bool
fn is_nonlinear(&self) -> bool
Whether this component is a nonlinear element (needs NR solver).
Source§fn is_active_ic(&self) -> bool
fn is_active_ic(&self) -> bool
Whether this component is an active IC (counted toward
num_active).Source§fn port_semantic(&self, pin_a: &str, pin_b: &str) -> PortSemantic
fn port_semantic(&self, pin_a: &str, pin_b: &str) -> PortSemantic
Classify the electrical behavior of a port (pin pair) for optimization
legality checks. The compiler uses this to determine which subgraphs
can be safely lowered to IIR/BlackFeedback vs requiring full MNA/WDF. Read more
Source§fn pin_config(&self) -> PinConfig
fn pin_config(&self) -> PinConfig
Valid pins and aliases for this component type.
Source§fn modulation_pins(&self) -> &'static [&'static str]
fn modulation_pins(&self) -> &'static [&'static str]
Extra pins that are valid as modulation targets but may not be in
pin_config.Source§fn graph_role(&self) -> GraphRole
fn graph_role(&self) -> GraphRole
How this component participates in circuit graph construction.
Source§fn stamp_mna(
&self,
_comp_id: &str,
_n1: Option<usize>,
_n2: Option<usize>,
_mna: &mut MnaSystem,
_sample_rate: f64,
) -> StampResult
fn stamp_mna( &self, _comp_id: &str, _n1: Option<usize>, _n2: Option<usize>, _mna: &mut MnaSystem, _sample_rate: f64, ) -> StampResult
Stamp into MNA system. Returns what was produced. Read more
Source§fn mna_vsource_count(&self) -> usize
fn mna_vsource_count(&self) -> usize
Number of MNA voltage sources this component needs when stamped
into an R-node. Default: 0. Op-amps return 1 (for the VCVS constraint).
Source§fn mna_internal_node_count(&self) -> usize
fn mna_internal_node_count(&self) -> usize
Number of internal MNA nodes this component needs.
Default: 0. Op-amps return 1 (internal gain stage node for GBW pole).
Source§fn stamp_mna_multi(
&self,
_comp_id: &str,
ctx: &mut StampContext<'_>,
mna: &mut MnaSystem,
) -> StampResult
fn stamp_mna_multi( &self, _comp_id: &str, ctx: &mut StampContext<'_>, mna: &mut MnaSystem, ) -> StampResult
Stamp this component into an MNA system using multi-terminal pin resolution. Read more
Source§fn edges(&self) -> Vec<ComponentEdge>
fn edges(&self) -> Vec<ComponentEdge>
Declare this component’s circuit edges with their electrical classification. Read more
Source§fn resolve_edges(&self, ctx: &ResolveContext) -> Option<Vec<ComponentEdge>>
fn resolve_edges(&self, ctx: &ResolveContext) -> Option<Vec<ComponentEdge>>
Context-dependent resolution: if this component’s behavior depends on
how it’s wired, return a new edge list reflecting the resolved role. Read more
Source§fn classify_nonlinear(
&self,
_comp_id: &str,
_node_a: usize,
node_b: usize,
gnd_node: usize,
_node_names: &HashMap<String, usize>,
) -> Option<(NonlinearKind, Vec<usize>)>
fn classify_nonlinear( &self, _comp_id: &str, _node_a: usize, node_b: usize, gnd_node: usize, _node_names: &HashMap<String, usize>, ) -> Option<(NonlinearKind, Vec<usize>)>
Classify this component as a nonlinear element for the circuit solver. Read more
Source§fn modulation_sink(&self, pin: &str) -> Option<ModulationSink>
fn modulation_sink(&self, pin: &str) -> Option<ModulationSink>
If this component can be a modulation sink (LFO/envelope target),
return the sink description for the given pin. Read more
Source§fn footprint_ref(&self) -> (&'static str, &'static str)
fn footprint_ref(&self) -> (&'static str, &'static str)
KiCad symbol library reference and designator prefix.
Source§fn symbol_name(&self) -> &'static str
fn symbol_name(&self) -> &'static str
Symbol identifier for layout rendering (e.g., “resistor”, “triode”, “opamp”).
Source§fn layout_class(&self) -> &'static str
fn layout_class(&self) -> &'static str
Layout class identifier for placement grouping (e.g., “resistor”, “npn”, “opamp”).
Source§fn signal_adjacencies(&self) -> Vec<(&'static str, &'static str)>
fn signal_adjacencies(&self) -> Vec<(&'static str, &'static str)>
Internal signal-path adjacencies: pin pairs that signal can traverse through. Read more
Source§fn pin_direction(&self, pin: &str) -> PinDirection
fn pin_direction(&self, pin: &str) -> PinDirection
Infer the signal direction for a given pin on this component. Read more
fn op_amp_type(&self) -> Option<OpAmpType>
Source§fn apply_bias(
&self,
bias_voltages: &HashMap<String, f64>,
supply_voltage: f64,
) -> BiasResult
fn apply_bias( &self, bias_voltages: &HashMap<String, f64>, supply_voltage: f64, ) -> BiasResult
Apply DC bias from a static bias network detected at compile time. Read more
Source§fn solver_hint(&self) -> Option<SolverMethod>
fn solver_hint(&self) -> Option<SolverMethod>
Return the preferred nonlinear solver method for this component. Read more
Source§fn is_control_only(&self) -> bool
fn is_control_only(&self) -> bool
Whether this component is a control-only element (no circuit pins).
Source§fn is_variable(&self) -> bool
fn is_variable(&self) -> bool
Whether this component’s edge impedance changes at runtime.
Stages containing variable edges need scattering matrix recomputation.
Source§fn make_leaf(&self, _comp_id: &str, _sample_rate: f64) -> Option<DynNode>
fn make_leaf(&self, _comp_id: &str, _sample_rate: f64) -> Option<DynNode>
Create a WDF leaf node for this component.
Returns
None for non-leaf components (diodes, virtual elements, etc.).fn resistance(&self) -> Option<f64>
fn capacitance(&self) -> Option<f64>
fn inductance(&self) -> Option<f64>
Source§fn validate_values(&self, _comp_id: &str) -> Vec<(Severity, String)>
fn validate_values(&self, _comp_id: &str) -> Vec<(Severity, String)>
Check for suspicious or invalid component values.
Source§fn terminal_requirements(&self) -> Vec<(&'static str, Vec<NeighborReq>)>
fn terminal_requirements(&self) -> Vec<(&'static str, Vec<NeighborReq>)>
Per-terminal neighbour requirements for active devices. Read more
Source§fn controls(&self) -> Vec<ControlParam>
fn controls(&self) -> Vec<ControlParam>
Declare controllable parameters for this component. Read more
fn is_modulation_source(&self) -> bool
fn is_bjt(&self) -> bool
fn is_jfet(&self) -> bool
fn is_mosfet(&self) -> bool
fn is_tube(&self) -> bool
fn is_transformer(&self) -> bool
fn is_pot(&self) -> bool
fn is_diode_family(&self) -> bool
fn is_trigger(&self) -> bool
Source§fn k_method_spec(&self) -> Option<KMethodSpec>
fn k_method_spec(&self) -> Option<KMethodSpec>
K-method table shape declared by the component. Read more
Source§fn k_method_candidacy(&self) -> (bool, usize, &'static str)
fn k_method_candidacy(&self) -> (bool, usize, &'static str)
Compatibility wrapper for callers that still only need yes/no +
dimensionality. New code should prefer
Component::k_method_spec
because it preserves the meaning of each table axis.Source§fn is_simple_passive(&self) -> bool
fn is_simple_passive(&self) -> bool
Passive two-terminal element (R, C, L, etc.) — excludes transformers and pots.
Source§fn is_gain_device(&self) -> bool
fn is_gain_device(&self) -> bool
Amplifying device: tube, BJT, JFET, MOSFET.
fn model_name(&self) -> Option<&str>
fn pot_taper(&self) -> Option<PotTaper>
fn diode_type(&self) -> Option<DiodeType>
fn transformer_config(&self) -> Option<&TransformerConfig>
Source§fn display_value(&self) -> Option<String>
fn display_value(&self) -> Option<String>
Human-readable display value for labels (e.g., “4.7kΩ”, “100nF”).
impl StructuralPartialEq for OpAmp
Auto Trait Implementations§
impl Freeze for OpAmp
impl RefUnwindSafe for OpAmp
impl Send for OpAmp
impl Sync for OpAmp
impl Unpin for OpAmp
impl UnsafeUnpin for OpAmp
impl UnwindSafe for OpAmp
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more