SLiCAPinstruction.py

SLiCAP instruction class definition.

class instruction

Prototype Instruction object.

A

Base conversion matrix (sympy.Matrix).

DCvalue

Zero-frequency value in case of dataType ‘pz’. (sympy.Expr, sympy.Float)

Dv

Vector with dependent variables (sympy.Matrix).

Iv

Vector with independent variables (sympy.Matrix).

M

MNA matrix (sympy.Matrix).

check()

Checks the completeness and consistancy of the instruction data. Will be called by instruction.execute().

Example:

>>> # create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
checkCircuit()

Checks if the circuit for this instruction is a SLiCAPprotos.circuit() object.

Called by instruction.execute().

checkDataType()

Checks if the data type is defined correctly.”

Called by instruction.check() and by setDataType(<dataType>).

checkDetector()

Checks if the detector has been defined and if it exists in the circuit.

Called by instruction.check() and by instruction.setDetector(<detector>).

checkLGref()

Checks if the loop gain reference has been defined and if it exists in the circuit.

Called by instruction.check() and by instruction.setLGref(<lgRef>).

checkPairExt(pairExt)

Check the list with extensions of paired nodes.

Parameters:

varPairs (list) – list with extensions of paired nodes.

Returns:

number of errors

Return type:

int

checkPairedCircuits(circuitPairs)

Check the list with names of with paired subcircuits.

Parameters:

cirPairs – list with refDes of two subcircuits

Returns:

number of errors

Return type:

int

checkSource(need=True)

Checks if the source has been defined and if it exists in the circuit.

Called by instruction.check() and by instruction.setSource(<source>).

Parameters:

need (bool) – If True, a source is required and an error message will be given if it missing. If False, only the presence of the indicated independent source in the circuit will be verified.

checkStep()

This method will check the completeness and the consistency of the instruction data for parameter stepping, before executing the instruction.

Called by instruction.check() in cases in which instruction.step == True

checkStepArray()

Checks if the array with step values is defined properly.

Called by instruction.checkStep() and by instruction.setStepArray(<stepArray>).

The step array is a list of lists. The number of lists must equal the number of step variables. The numbers in the lists are subsequent values of the associated step variable. All lists should have equal lengths.

checkStepList()

Checks if the list with step values is defined properly.

Called by instruction.checkStep() and by instruction.setStepList(<stepList>).

checkStepMethod()

Checks if the step method is defined correctly.

Called by instruction.checkStep and by instruction.setStepMethod(<stepMethod>).

checkStepNum()

Checks if the number of steps is defined properly.

Called by :instruction.checkStep() and by instruction.setStepNum(<stepNum>).

Also called by and by instruction.setStepNum(<stepNum>).

checkStepStart()

Checks if the start value for parameter stepping is defined correctly.

Called by instruction.checkStep() and by instruction.stepStart(<stepStart>).

checkStepStop()

Checks if the end value for parameter steping is defined correctly.

Called by instruction.checkStep() and by instruction.stepStop(<stepStop>).

checkStepVar()

Checks if the step variable is defined correctly.

Called by instruction.checkStep() and by setStepVar(<stepVar>).

checkStepVars()

Checks if the step variables for array stepping are defined correctly.

Called by instruction.checkStep and by instruction.setStepVars(<stepVars>).

circuit

Circuit (SLiCAPprotos.circuit) used for this instruction. Can be assigned by setting this attribute, or will be defined by running: instruction.setCircuit(<fileName>).

Example:

>>> # Create an instance of a circuit object by checking a netlist:
>>> my_circuit = checkCircuit('my_circuit.cir')
>>> # create an instance of an instruction object:
>>> my_instruction = instruction()
>>> Use the circuit 'my_circuit' or the instruction 'my_instruction'.
>>> my_instruction.circuit = my_circuit
Example:

>>> # create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
clear()
controlled()

Returns a list with names of controlled sources in instruction.circuit that can be used as loop gain reference.

Returns:

list with names of controlled sources in instruction.circuit

Return type:

list

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Obtain a list with names of controlled sources:
>>> my_instr.controlled()
[]
convType

Defines the conversion type (None, ‘dd’, ‘dc’, ‘cd’, ‘cc’)

See instruction.setConvType(<convType>) for specification of instruction.convType.

dataType

Defines the simulation data type.

See instruction.setDataType(<dataType>) for specification of instruction.dataType.

dcSolve

DC solution of the network.

defPar(parName, parValue)

Adds or modifies a parameter definition and updates the list instruction.circuit.params with names (sympy.Symbol) of undefined parameters.

Parameters:
  • parName (str, sympy.Symbol, sympy.Expr) – Name of the parameter.

  • parValue – Value or expression.

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Define the value of 'R' as 2000
>>> my_instr.defPar('R', '2k')
>>> # Or:
>>> my_instr.defPar('R', 2e3)
defPars(parDict)

Adds or modifies multiple parameter definitions and updates the list instruction.circuit.params with names (sympy.Symbol) of undefined parameters.

Params parDict:

Dictionary with key-value pairs: key: parName (str, sympy.Symbol): name of the parameter. value: parValue (str, float, int, sp.Symbol) : value or expression of the parameter.

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Define the value of 'R' as 2000 and 'C' as 5e-12:
>>> my_instr.defPars({'R': '2k', 'C': '5p'})
delPar(parName)

Deletes a parameter definition

After deletion of the parameter from the instruction.circuit.parDefs dictionary the list instruction.circuit.params with names (sympy.Symbol) of undefined parameters is updated.

Parameters:

parName (str, sympy.Symbol) – Name of the parameter.

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Delete the definition for the parameter 'R':
>>> my_instr.delPar('R')
>>> # Or:
>>> my_instr.circuit.delPar('R')
denom

Laplace poly of denominator (sympy.Expr).

depVars()

Returns a list with names of nodal voltages and branch currents that can be used as detector.

Returns:

list with names of nodal voltages and branch currents

Return type:

list

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Obtain a list with names of dependent variables:
>>> my_instr.depVars()
['I_V1', 'V_N001', 'V_out']
detLabel

Name for the detector quantity to be used in expressions or plots (automatically determined in instruction.checkDetector()).

detUnits

Detector units ‘V’ or ‘A’ (automatically detected in instruction.checkDetector()).

detector

Names of the positive and negative detector.

See instruction.setDetector(<detector>) for specification of the detector.

errors

Number of errors found in the definition of this instruction.

Note:

The instruction.errors attribute should not be modified directly by the user. It is determined automatically when executing the instruction.

execute()

Checks the instruction and executes it if no errors are found.

if no errors are found it returns a allResults object with the results of the instruction.

Returns:

allResults object with results of the execution

Return type:

SLiCAPprotos.allResults

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Assign 'V1' signal source:
>>> my_instr.source = 'V1'
>>> # Assign 'V_out' detector:
>>> my_instr.detector = 'V_out'
>>> # Set the gain type to 'gain'
>>> my_instr.gainType = 'gain'
>>> # Set the data type to 'laplace'
>>> my_instr.dataType = 'laplace'
>>> result = my_instr.execute()
>>> print result.laplace
gainType

Defines the simulation gain type.

See instruction.setGainType(<gainType>) for specification of instruction.gainType.

getElementValue(elementID, param='value')

Returns the value or expression of one or more circuit elements.

If instruction.numeric == True it will perform a full recursive substitution of all circuit parameter definitions.

This method calls instruction.circuit.getElementValue() with numeric = True if instruction.simType is set to ‘numeric’.

Parameters:
  • elementID (str, list) – name(s) of the element(s)

  • param (str) –

    name of the parameter (equal for all elements):

    • ’value’: Laplace value

    • ’dc’: DC value (independent sources only)

    • ’noise’: Noise spectral density (independent sources only)

    • ’dcvar’: DC variance (independent sources only)

    Defaults to ‘value’.

Returns:

if type(param) == list:

return value = dict with key-value pairs: key (sympy.Symbol): name of the parameter, value (int, float, sympy expression): value of the parameter

else: value or expression

Return type:

dict, float, int, sympy.Expr

Example:

>>> # Create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # Create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Obtain the numeric value of 'R1' and 'C1':
>>> my_instr.symType = 'numeric'
>>> print my_instr.getElementValue(['R1', 'C1'])
{'C1': 5.0e-7/pi, 'R1': 1000.00000000000}
getParValue(parName)

Returns the value or expression of one or more parameters.

If instruction.numeric == True it will perform a full recursive substitution of all circuit parameter definitions.

This method calls instruction.circuit.getParValue() with keyword arg numeric = True if instruction.simType is set to ‘numeric’.

Parameters:

parName (str, sympy.Symbol, list) – name(s) of the parameter(s)

Returns:

if type(parNames) == list:

return value = dict with key-value pairs: key (sympy.Symbol): name of the parameter, value (int, float, sympy expression): value of the parameter

else: value or expression

Return type:

dict, float, int, sympy.Expr

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Obtain the numeric parameter definitions of of 'R' and 'C':
>>> my_instr.symType = 'numeric'
>>> my_instr.getParValue(['R', 'C'])
ignoreCircuitParams

For compatibility with version 2. If True a dictionary of parameters will be used for substitutions. Else these parameters will be taken from the circuit definition.

impulse

Unit impulse response (ILT) (sympy.Expr).

indepVars()

Returns a list with names of independent sources in instruction.circuit

Returns:

list with names of independent sources in instruction.circuit

Return type:

list

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Obtain a list with names of independent sources:
>>> my_instr.indepVars()
['V1']
inoise

Total source-referred noise spectral density (sympy.Expr) in V^2/Hz or A^2/Hz.

inoiseTerms

Dict with lists with contributions to source-referred noise spectrum

Key = (str) name of the noise source Value = (sympy.Expr) contribution of that noise source to the source-referred noise spectrum in V^2/Hz or A^2/Hz

ivar

Total source-referred variance in V^2 or A^2 (sympy.Expr)

ivarTerms

Dict with lists with contributions to source-referred variance.

Key = (str) name of the dcvar source Value = (sympy.Expr) contribution to the source-referred variance in V^2 or A^2

label

Label to be used in plots.

laplace

Laplace transfer function, or detector current or voltage (sympy.Expr).

lgRef

Refdes of the controlled source(s) that is (are) assigned as loop gain reference. A second controlled source is required for decomposition of circuits in common-mode and differential-mode equivalents.

See instruction.setLGref(<detector>) for specification of the loop gain reference.

lgValue

Value of the loopgain reference will be stored during execution of the instruction.

numer

Laplace poly of numerator (sympy.Expr).

numeric

If True, functions and constants will be evaluated numerically and rational numbers will be converted in sympy.Float

onoise

Total detector-referred noise spectrum (sympy.Expr) in V^2/Hz or A^2/Hz.

onoiseTerms

Dict with with contributions to detector-referred noise spectrum

Key = (str) name of the noise source Value = (sympy.Expr) contribution of that noise source to the detector-referred noise spectrum in V^2/Hz or A^2/Hz

ovar

Total detector-referred variance in V^2 or A^2 (sympy.Expr)

ovarTerms

Dict with lists with contributions to detector-referred variance.

Key = (str) name of the dcvar source Value = (sympy.Expr) contribution to the detector-referred variance in V^2 or A^2

pairExt

Extensions used to indicate paired nodes or elements. Default is: [None, None].

parDefs

Parameter definitions for the instruction. Will be updated by executing the instruction.

params

Results of parameter sweep (dataType = ‘param’).

poles

Complex frequencies in [rad/s] (list)

references

Referenced elements in the circuit AFTER execution of an instruction.

Will be copied from instruction.circuit.references at the start of the execution of the instruction and possibly modified during the excution of the instruction.

removePairSubName

If True, the subcircuit pair extension will be removed from parameters in expressions of paired elements in sub circuits. Defaults to True.

Note:

Warning: this may result in undesired behavior if global parameters carry the name of parameters in paired sub circuits.

setCircuit(fileName)

Defines the circuit for this instruction.

  • Checks the netlist file ‘fileName’

  • Creates a circuit object from it

  • Makes it the ciruit object for this instruction.

Parameters:

fileName (str) – Name of the netlist file.

Example:

>>> # create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
setConvType(convType)

Defines the circuit conversion type for the instruction.

Parameters:

convType – gain type for the instruction: None, ‘dd’, ‘dc’, ‘cd’, ‘cc’, or ‘all’.

setDataType(dataType)

Defines the data type for the instruction.

Parameters:

dataType (str) – data type for the instruction: ‘dc’, ‘dcsolve’, ‘dcvar’, ‘denom’, ‘impulse’, ‘laplace’, ‘matrix’, ‘noise’, ‘numer’, ‘params’, ‘poles’, ‘pz’, ‘solve’, ‘step’, ‘time’ or ‘zeros’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Set data type to 'laplace':
>>> my_instr.setDataType('laplace')
setDetector(detector)

Defines the signal detector

Parameters:

detector (list, str) – Name(s) of one or two nodal voltages or of one or two dependent currents.

detector can defined as:

  • None: no detector has been defined

  • str: a single detector, name of a nodal voltage or a branch current

  • list: with names of either two nodal voltages or two branch currents.

instruction.checkDetector converts the detector definition into a list with a positive and a negative detector [<detP>, <detN>], where detP and detN are the names (str) of either two nodal voltages or two branch currents. One of those can be ‘None’.

A list with names of dependent variables that can be used as signal detector is returned by the method: instruction.depVars().

Example:

>>> # create an instance if a SLiCAP instruction
>>> my_instr = instruction()
>>> # create my_instr.circuit from the netlist 'myFirstRCnetwork.cir'
>>> my_instr.setCircuit('myFirstRCnetwork.cir')
>>> # Display a list with names of nodal voltages and branch currents
>>> # that can be assigned to the detector.
>>> my_instr.depVars()
['I_V1', 'V_0', 'V_N001', 'V_out']
>>> # Voltage at node 'out':
>>> my_instr.setDetector('V_out')
>>> # Differential voltage between node 'N001' and 'out':
>>> my_instr.setDetector(['V_N001', 'V_out'])
>>> # Current through `V1':
>>> my_instr.setDetector('I_V1')
Note:

The voltage ‘V_0’ at the reference node ‘0’ equals zero.

setGainType(gainType)

Defines the gain type for the instruction.

Parameters:

gainType (str) – gain type for the instruction: ‘gain’, ‘asymptotic’, ‘loopgain’, ‘servo’, ‘direct’, or ‘vi’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Set gain type to 'gain':
>>> my_instr.setGainType('gain')
setLGref(lgRef)

Defines the loop gain reference (name of a controlled source).

A list with names of dependent (controlled) sources is returned by the method instruction.controlled().

Parameters:

lgRef (str, sympy.Symbol) – Name of the loop gain reference.

Example:

>>> # create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Display a list with controlled sources of the circuit:
>>> my_instr.controlled()
setPairExt(pairExt)

Defines the extension to element or node IDs for DM and CM pairs.

Parameters:

pairExt (list) – list with extensions for paired nodes.

setPairedCircuits(cirPairs)

Defines the paired subcircuits for matrix conversion.

Parameters:

varPairs (tuple) – list with tuples of names (str) of subcircuits that must be considered pairs.

setSimType(simType)

Defines the simulation type for the instruction.

Parameters:

simType (str) – Simulation type: ‘symbolic’ or ‘numeric’

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Set the simulation type to numeric:
>>> my_instr.setSimType('numeric')
>>> # Set the simulation type to symbolic:
>>> my_instr.setSimType('symbolic')
Note:

SLiCAP always uses symbolic calculation methods. Only in a limited number of cases SLiCAP calulates with floats (pole-zero analysis, determination of the phase margin, etc.).

With the simulation type set to ‘numeric’ SLiCAP recursively substitutes all circuit parameter definitions into expressions used for element values. Hence, component values can be expressions with symbolic parameters.

The default number of recursive substitutions is 10. It is defined by ini.recSubst and can be changed by the user. For using the built-in MOS EKV models a value of eight is the minumum for full substitution.

Example:

>>> ini.recSubst = 12 # For deeply nested expressions!
setSource(source)

Defines the signal source.

Parameters:

source (str) – Name of an independent voltage or current source that exists in the circuit.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define the voltage source 'V1' as signal source:
>>> my_instr.setSource('V1')
Note:

A list with names of independent voltage and current sources that can be assigned as signal source can be obtained from the method: instruction.indepVars():

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Obtaine a list with names of independent sources:
>>> my_instr.circuit.indepVars()
setStepArray(stepArray)

Defines the array with values for step method array.

Parameters:

stepArray (list) – Nested list: list[i] carries the step values for the step variable in instruction.stepVars[i]. The lists should have equal lengths.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define 'array' type stepping:
>>> my_instr.setStepMethod('array')
>>> # Define circuit parameters 'R_a' and 'C_a' as step variables:
>>> my_instr.setStepVars(['R_a', 'C_a'])
>>> Define the step values for 'R_a and 'C_a':
>>> my_instr.setStepArray([['1k', 1200, 1.2e3],['1u', 10e-6, 0.0001]])
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepList(stepList)

Defines the list with step values for step method ‘list’. This list will be overwritten if the instruction is executed with the step method set to ‘lin’ or ‘log’.

Parameters:

stepList (list) – List with step values for the step parameter.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define 'list' type stepping:
>>> my_instr.setStepMethod('list')
>>> # Define the circuit parameter 'alpha' as step parameter:
>>> my_instr.setStepVar('alpha')
>>> # Define a list of step values for this parameter.
>>> my_instr.setStepList(['10m', '20m', '50m', 0.1, 0.2, 0.5, 1, 2, 5])
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepMethod(stepMethod)

Defines the parameter stepping method.

Parameters:

stepMethod (str) – ‘lin’, ‘log’, ‘list’ or ‘array’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define 'linear' type stepping:
>>> my_instr.setStepMethod('lin')
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepNum(stepNum)

Defines the number of steps for ‘lin’ and ‘log’ parameter stepping.

Parameters:

stepNumber – Number of steps for stepping methods ‘lin’ and ‘log’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define linear stepping:
>>> my_instr.stepMethod = 'lin'
>>> # Define the start value
>>> my_instr.setStepStop('1M')  # 1E6
>>> my_instr.setStepStop(1e6)   # 1E6
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepStart(stepStart)

Start value for parameter stepping methods ‘lin’ and ‘log’.

Parameters:

stepStart (str, int, float) – Start value for parameter stepping methods ‘lin’ and ‘log’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define linear stepping:
>>> my_instr.stepMethod = 'lin'
>>> # Define the start value
>>> my_instr.setStepStart('1k')  # 1E3
>>> my_instr.setStepStart(1000)  # 1E3
>>> my_instr.setStepStart(1e3)   # 1E3
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepStop(stepStop)

End value for parameter stepping methods ‘lin’ and ‘log’.

Parameters:

stepStop (str, int, float) – End value for parameter stepping methods ‘lin’ and ‘log’.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define linear stepping:
>>> my_instr.stepMethod = 'lin'
>>> # Define the start value
>>> my_instr.setStepStop('1M')  # 1E6
>>> my_instr.setStepStop(1e6)   # 1E6
>>> # Enable parameter stepping
>>> my_instr.stepOn()
setStepVar(stepVar)

Defines the step variable for parameter step types ‘lin’, ‘log’ and ‘list’.

Parameters:

stepVar (str, sympy.Symbol) – step variable

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Define the circuit parameter 'alpha' as step variable:
>>> my_instr.setStepVar('alpha')
>>> # Enable parameter stepping
>>> my_instr.stepOn()
Note:

A list with names (sympy.Symbol) that can be used as stepping parameter is obtained as follows:

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # print the list with names of all parameters that can be stepped:
>>> print instr.circuit.params + list(instr.circuit.parDefs.keys())
setStepVars(stepVars)

Defines the step variables for ‘array’ type stepping.

Parameters:

stepVars (list) – List with names (str, sympy.Symbol) of step variables for array type stepping.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # Define 'array' type stepping:
>>> my_instr.stepMethod = 'array'
>>> # Define circuit parameters 'R_a' and 'C_a' as step variables:
>>> my_instr.setStepVars(['R_a', 'C_a'])
>>> Define the step values for 'R_a and 'C_a':
>>> my_instr.setStepArray ([['1k', 1200, 1.2e3],['1u', 10e-6, 0.0001]])
>>> # Enable parameter stepping
>>> my_instruction.stepOn()
Note:

A list with names (sympy.Symbol) that can be used as stepping parameter is obtained as follows:

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # check a netlist file and use the circuit from this file for this
>>> # instruction:
>>> my_instr.setCircuit('my_circuit.cir')
>>> # print the list with names of all parameters that can be stepped:
>>> print instr.circuit.params + list(instr.circuit.parDefs.keys())
simType

Defines the simulation gain type.

See instruction.setSimType(<simType>) for specification of instruction.simType.

snoiseTerms

Dict with source noise spectra.

Key = (str) name of the noise source Value = (sympy.Expr) noise spectral density in V^2/Hz or A^2/Hz

solve

Laplace solution of the network.

source

Refdes of the signal source (independent v or i source).

See instruction.setSource(<source>) for specification of the source.

srcUnits

Source units ‘V’ or ‘A’ (automatically detected in instruction.checkSource()).

step

Setting for parameter stepping.

See instruction.setStepOn() and instruction.setStepOff() for specification of instruction.step.

stepArray

Array (list of lists) with values for step method array.

See instruction.setStepArray(<stepArray>) for specification of instruction.stepArray.

stepDict

Dictionary with key-value pairs:

key: name of a step parameter (sympy.Symbol) value: list with values for this parameter

stepList

List with values for step method ‘list’.

See instruction.setStepList(<stepList>) for specification of instruction.stepList.

stepMethod

Step method for parameter stepping.

See instruction.setStepMethod(<stepMethod>) for specification of instruction.stepMethod.

stepNum

Number of steps for step methods ‘lin’ and ‘log’.

See instruction.setStepNum(<stepNum>) for specification of instruction.stepNum.

stepOff()

Disables parameter stepping.

Does not change other settings for parameter stepping.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Disable parameter stepping
>>> my_instruction.stepOff()
stepOn()

Enables parameter stepping.

Does not change other settings for parameter stepping.

Example:

>>> # Create an instance of the instruction object
>>> my_instr = instruction()
>>> # Enable parameter stepping
>>> my_instruction.stepOn()
stepResp

Unit step response (ILT) (sympy.Expr).

stepStart

Start value for stepping methods ‘lin’ and ‘log’.

See instruction.setStepStart(<stepStart>) for specification of instruction.stepStart.

stepStop

Stop value for stepping methods ‘lin’ and ‘log’.

See instruction.setStepStop(<stepStop>) for specification of instruction.stepStop.

stepVar

Defines the step variable (str) for step types ‘lin’, ‘log’ and ‘list’.

See instruction.setStepVar(<stepVar>) for specification of instruction.stepVar.

stepVars

Defines the step variables for ‘array’ type parameter stepping.

See instruction.setStepVars(<stepVars>) for specification of instruction.stepVars.

substitute

If True: parameters from self.circuit will be substituted recursively in element values.

Else: element values defined in the circuit will be used

svarTerms

Dict with source variances

Key = (str) name of the dcvar source Value = (sympy.Expr) dcvar value in V^2 or A^2

time

Time-domain response of the circuit (ILT) (sympy.Expr).

timeSolve

Time-domain solution of the network.

zeros

Complex frequencies in [rad/s] (list)