In this topic:
The sweep specification described in General Sweep Specification can also be applied to define multiple analyses including Monte Carlo analysis. This can be applied to the swept modes .DC, .AC, .NOISE and .TF along with .TRAN. The analyses .SENS and .OP cannot be run in multi-step mode. A multi-step .OP is in fact the same as .DC so this is not required. Monte Carlo analysis is the subject of its own chapter (see Monte Carlo Analysis) but it is invoked in the same way as other multi-step modes. As well as the standard 6 sweep modes, small-signal multi-step analyses can be run in snapshot mode which uses snapshots created by a previous transient analysis.
The general form is:
.analysis_name analysis_parameters SWEEP + [sweep_spec] | [SNAPSHOT STP snapstart snapstop snapstep] | [SCRIPTCOUNT=numscriptruns SCRIPT=script] [ NUMCORES=num_cores]
Where:
.analysis_name | Dot statement for analysis |
analysis_parameters | Specific parameters for that analysis |
sweep_spec | See General Sweep Specification. |
SNAPSHOT | Use snapshots created by a previous transient analysis. For full details, see Snapshots. |
snapstart | Index of first snapshot. Snapshots are counted in the order in which they are created. The first is 0. Use STP 0 0 0 to specify all available snapshots. |
snapstop | Index of last snapshot |
snapstep | Snapshot interval (usually 1) |
numscriptruns | Number of repeat steps using script. If present, the script script is called for each step. The script may use the function GetCurrentStepValue() to determine the step number (base 1, i.e. the first step is 1, the second 2 etc.). The functions SetInstanceParamValue() and SetModelParamValue() may be used to change model or instance parameters |
script | Script called for each step |
num_cores | If specified and greater than 1, the work for the run will be shared amongst num_cores processor cores using multiple processes. More information about using multiple cores can be found in User's Manual/Analysis Modes/Using Multiple Cores for Multi-step Analyses. |
.TRAN 1m SWEEP MONTE 10
.TRAN 1m SWEEP MONTE 1000 NUMCORES=4
.TRAN 200u SWEEP DEVICE V1 STP 0 5 0.1
.AC DEVICE=V5 LIN 100 -300m 300m F=100000 + SWEEP PARAM=restail LIN 6 450 550
.AC DEC 100k 10G SWEEP SNAPSHOT STP 0 0 0
.TRAN 200u SWEEP SENS .TRAN 200u SWEEP WC
◄ General Sweep Specification | .AC ▶ |