pingspice.analysis.msim.Setup(object)
class documentation
Part of pingspice.analysis.msim
(View In Hierarchy)
I maintain a DeferredQueue
of one or more analyzers.
There are two different kinds of setup, for Ngspice simulations and for Python-only simulations.
I am constructing analyzers from a class provided in the first item of
definition sequence (argument #4), I will construct an NgspiceRunner for
each analyzer and then construct the analyzer with (1) a reference to the
NgspiceRunner, (2) my setup ID, (3) my list of vector names, (4) my
avList, and any additional arguments that have been included in the
definition sequence. Then I will call its setup
method with
the circuit netlist string.
If I am just setting up an existing analyzer (which must be an instance
of psim.Analyzer
,
I will call its setup
method with (1) my setup ID, (2) my list
of vector names, (3) my avList, and any additional arguments that
have included in the definition sequence. In this case, whatever is in my
netlist attribute is ignored because Python-only Analyzers don't use
circuit files.
Construct me with:
Parameters | cfg | An instance of Config
containing Boolean runtime options. |
ID | My integer setup ID. | |
avList | A reference to a shared list of AV objects. | |
names | The names of the vectors that my analyzers will be providing. | |
analyzer | The definition sequence for my analyzers, consisting of a subclass of sim.Analyzer
followed by args for its constructor, or an instance of psim.Analyzer ,
followed by args for its setup method. | |
netlist | Text of the SPICE circuit file for my analyzers, if an analyzer object is not being supplied. | |
N_cores | The number of analyzers I spawn and handle. |
Class Variable | timeout | The number of seconds an analyzer will wait for a response to its commands. |
Method | __init__ | Setup(self, cfg, ID, avList, names, analyzer,
netlist=None, N_cores=2) |
Method | __len__ | Undocumented |
Method | __repr__ | Undocumented |
Method | shutdown | Shuts down all my analyzers. |
Method | isPythonAnalyzer | Returns True if my analyzer(s) are Python-only, rather than
Ngspice-based. |
Method | fireAnalyzer | Shut down and dismiss the specified analyzer. |
Method | addAnalyzer | Sets up an analyzer and adds it to my DeferredQueue . |
Method | populate | Populates my DeferredQueue dq with N_analyzers, returning
a Deferred that fires with my setup ID when all the
analyzers have been set up, or with None if there was a
problem. |
Method | isBloated | Returns True if the Ngspice process for the specified
analyzer is using too much RAM. |
Setup(self, cfg, ID, avList, names, analyzer,
netlist=None, N_cores=2)
def shutdown(self):
Shuts down all my analyzers.
Returns a Deferred
that fires when they're all shut down.
Repeated calls are disregarded.
Returns True
if my analyzer(s) are Python-only, rather than
Ngspice-based.
def addAnalyzer(self, noPut=False):
Sets up an analyzer and adds it to my DeferredQueue
.
Declines to add an analyzer if I already have the number N that I was configured with, or if I'm not running anymore.
Returns a Deferred
that fires with a reference to the
analyzer, or None
if no analyzer was added.
Parameters | noPut | Set True and I won't put the new analyzer into my queue. Then
you must do it instead. |