.SETSOA

.SETSOA [ LABEL=label ] [ MODEL=modelname | INST!=instname ] [DEVICE=device]
[!DERATING=derating] [MEAN] [ ALLOWUNUSED ] [ ALLOWWILD ]
expr1=( min1, max1[, xwindow1] ) [ expr2=( min2, max2[, xwindow2] ) ... ]

Defines a Safe Operating Area (SOA) specification. If SOA testing is enabled the simulator will check simulated results against this specification and record any violations. See .OPTIONS setting SOAMODE for details on how to enable SOA tests.

The results of SOA testing are output to the list file by default and can optionally also be displayed in the command shell message window, or console window if run in non-GUI mode. They are also always available via a script function GetSOAResults(). See .OPTIONS setting SOAOUTPUT for more details.

label Optional label that will be included in every violation report. You can use the following symbolic values in this label:

%INST% - substituted with the instance name that violated the specification. This is only meaningful if MODEL or INST are specified. (See below)

%MODEL% - substituted with the model name that violated the specification. Only meaningful if MODEL is specified. (See below)

%EXPR% - substituted with the expression that violated the specification.

%SUBCKT% - applicable if the .SETSOA command is located within a .SUBCKT definition. Value is substituted with the subcircuit instance reference.
modelname If specified the expression or expressions supplied in expr1 etc. are applied to every instance belonging to modelname. In this case the expression may refer to node voltages and pin currents for each instance processed. See details under expr1, expr2...
instname If specified the expression or expressions supplied in expr1 etc. are applied to the specified instance (e.g. Q23, M10, R56). In this case the expression may refer to node voltages and pin currents of the specified instance. See details under expr1, expr2...
device If INST or MODEL is specified using a wildcard specification, only instances of the specified device type will be processed. For example: .SETSOA INST=* DEVICE=resistor...

will be applied to all resistors in the circuit. See List of All Simulator Devices for a list of device names.
derating Derates limit specification by specified factor. Default is 1.0 which means no derating. Value must be greater than 0. An expression containing values defined using .PARAM may be used.
expr1, expr2... Expression to be evaluated and compared against minimum and maximum specs. This expression can access simulation results using access variables. The format and scope of these variables depends on whether MODEL, INST or neither is specified.

If neither is specified, the expression can use the global access variables defined below:
\hline Syntax Function Example
\hline nodename Voltage on node VOUT - voltage on node VOUT
n(nodename) Voltage on node n(VOUT) - voltage on node VOUT
instname#param Instance parameter M2#vdsat - vdsat value for M2

Q23#c - current in collector of Q23
paramname Parameter defined using .PARAM

If there is a clash between a paramname and nodename, that is if the same name could refer to either a node or a parameter, then the parameter name takes precedence. To access the node in this case, use the n(nodename) syntax.
Use the following values if MODEL or INST is specified. In each case (excepting the global access variable) the variable accesses a quantity for the instance being processed. With INST this will be the single instance specified by instname. With MODEL all instance belonging to the model specified by modelname will be processed.
\hline Syntax Function Example
\hline pinname Current in pin c - current in collector of transistor
Ipinname Current in pin Ic - current in collector of transistor
Ipinname_m Current in pin scaled according to multiplier (e.g. M parameter). Equivalent to Ipinname/M Ic_m - current in collector of transistor scaled by multiplier.
Vpinname Voltage on pin Vc - voltage on collector of transistor
n(pinname) Voltage on pin n(c) - voltage on collector of transistor
Vxy Where x = pin name 1, y= pin name 2. Both x and y must be single letters Voltage between x and y. Vbc - voltage from base to collector
pow Power in device
pow_m Power in device scaled according to multiplier. Equivalent to pow/M
param Readback parameter vdsat - 'vdsat' for MOSFET
#global_name Global node voltage or pin current #VOUT - voltage on net called VOUT

#q23#c - current in collector of q23
paramname Parameter defined using .PARAM

Note that currently the use of V() and I() is not accepted and will result in an error message being displayed.
min, max Minimum and maximum values respectively. A violation message will be produced if the value of the associated expression is less than min or greater than max. Use '*' if the limit is to be ignored. E.g. (*, 15) will test a maximum value of 15 but the minimum value will not be tested. min and max values may be scaled using the .OPTIONS SOADERATING.

These values may be entered as expressions containing variables defined using .PARAM.
xwindow Optional value specifies a minimum window that must be surpassed before limit violations are registered. For example if 10u is specified for xwindow for a transient analysis, then the limit must be exceeded continuously for at least 10uS before the violation is recorded.

This value may be entered as an expression containing variables defined using .PARAM.
ALLOWUNUSED If INST or MODEL are specified, an error will result if no instances to be processed are found. If INST is specified the error will occur if instname doesn't exist. If MODEL is specified, the error will occur if there are no instances using modelname even if modelname itself is valid.

This error will be inhibited if ALLOWUNUSED is specified
ALLOWWILD If specified, wildcards can be used for modelname and instname. In this case SIMetrix will search for all devices that match the wildcard specification. Use '*' to match any sequence of characters and '?' to match a single character.
MEAN If specified all tests will be on the mean of the test expression over the whole simulation run.

Examples

Test the voltage on the 'p' pin of R1. Will fail if it exceeds 0.5V
.setsoa INST=R1 vp=(*,0.5)
Test the power dissipation of R2. Fails if it exceeds 0.5mW
.setsoa INST=R2 pow=(*,0.5m)
Test the current into pin 'p' of R3. Fails if it exceeds 0.5mA
.setsoa INST=R3 ip=(*,0.5m)
Test the voltage across R4. Fails if it exceeds 0.85V for at least 100uS. Will be reported using label "%INST%, high", which resolves to "R4, high"
.setsoa LABEL="%INST%, high" INST=R4 vd=(*,0.85,100u)
Test the voltage across R4. Fails if it exceeds 0.7V for at least 500uS
.setsoa LABEL="%INST%, low" INST=R4 vd=(*,0.7,500u)
Tests voltage between 'c' and 'e' pins for all instances of model N1. Fails if voltage drops below -0.5V or exceeds 25V
.setsoa MODEL=N1 vce=(-0.5,25)
Tests power all devices of type resistor. Fails if this exceeds 0.25W.
.setsoa INST=* ALLOWWILD DEVICE=resistor pow=(*,0.25)
Tests the mean power in instance Q1. Fails if it exceeds "2*bjtderating". "bjtderating" must be defined using a .PARAM statement.
.setsoa LABEL="%INST%, pow(q1)" INST=Q1 MEAN pow=(*,2)
derating=bjtderating
Calculates the expression "n(c)*(q1#c-d1#p)+n(b)*q1#b+n(e)*(q1#e+d1#p)" and fails if its mean exceeds 1.0. Violations will be reported using label "%SUBCKT%, power". Statement is intended to be placed in a subcircuit definition block and "%SUBCKT%" will resolve to the reference of the subcircuit call.
.setsoa LABEL="%SUBCKT%, power" MEAN "n(c)*(q1#cd1#
p)+n(b)*q1#b+n(e)*(q1#e+d1#p)"=(*,1)