pingspice.lib.current.Switch(Subcircuit, SwitchMixin)
class documentation
Part of pingspice.lib.current
(View In Hierarchy)
A switch using the XSPICE analog switch model.
TODO: Somehow model contact bounce.
Instance Variable | N | The number of ganged switches. There will be twice as many nodes as switches, with each successive node pair corresponding to one switch in the gang. |
Instance Variable | t0 | The time at which the switch transition is completed. |
Instance Variable | t1 | The time at which the switch reverts to its original state
(None if it never does) |
Instance Variable | tr | The transition (control rise) time of the switch transition. |
Instance Variable | td | Delay between transition of first switch and transitions of all others in the gang. (Obviously ignored if N=1.) |
Method | nodes | Property: a0, a1, b0, b1, ... |
Method | setup | Subcircuit definition. |
Inherited from SwitchMixin:
Instance Variable | R_off | Resistance in OFF state. Typically very high. |
Instance Variable | R_on | Resistance in ON state. Typically very low, but can't be any lower than 1 mOhm (1E-3 Ohms). |
Instance Variable | log | Set True to use log transition between resistance states
instead of linear. |
Instance Variable | initially_on | Set True if the switch goes from R_off resistance to
R_on. Otherwise, it starts out with R_on resistance. |
Method | asModel | Returns an XSPICE analog switch model with the supplied prefix. |
Method | st_vctl | Undocumented |
Class Method | _nodes | Undocumented |
Inherited from SwitchMixin:
Instance Variable | R_off | Resistance in OFF state. Typically very high. |
Instance Variable | R_on | Resistance in ON state. Typically very low, but can't be any lower than 1 mOhm (1E-3 Ohms). |
Instance Variable | log | Set True to use log transition between resistance states
instead of linear. |
Instance Variable | initially_on | Set True if the switch goes from R_off resistance to
R_on. Otherwise, it starts out with R_on resistance. |
Method | asModel | Returns an XSPICE analog switch model with the supplied prefix. |
Method | st_vctl | Undocumented |
Class Method | _nodes | Undocumented |
Inherited from SwitchMixin:
Instance Variable | R_off | Resistance in OFF state. Typically very high. |
Instance Variable | R_on | Resistance in ON state. Typically very low, but can't be any lower than 1 mOhm (1E-3 Ohms). |
Instance Variable | log | Set True to use log transition between resistance states
instead of linear. |
Instance Variable | initially_on | Set True if the switch goes from R_off resistance to
R_on. Otherwise, it starts out with R_on resistance. |
Method | asModel | Returns an XSPICE analog switch model with the supplied prefix. |
Method | st_vctl | Undocumented |
Class Method | _nodes | Undocumented |
Subcircuit definition.
Why use f? Because it's short and a conveniently typed letter on the keyboard.
Override this if your subclass does not reference a param.ParameterFinder
subclass via the Finder class attribute. As with Include.setup
,
your override method can return a dict of attribute names and values to set
in my instance.