In this Topic Hide
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, .PZ 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. |
Run 10 Monte Carlo runs for 1mS transient analysis
.TRAN 1m SWEEP MONTE 10 |
As above but does 1000 steps split over 4 cores. So each core will do 250 steps. Requires a system equipped with at least 4 physical processor cores.
.TRAN 1m SWEEP MONTE 1000 NUMCORES=4 |
Sweep V1 from 0 to 5 volts in 0.1V steps for 200us transient
.TRAN 200u SWEEP DEVICE V1 STP 0 5 0.1 |
AC sweep of voltage source V5 from -300mV to 300mV. Repeat 6 times for parameter restail from 450 to 550.
.AC DEVICE=V5 LIN 100 -300m 300m F=100000 |
+ SWEEP PARAM=restail LIN 6 450 550 |
Run AC sweep using all available snapshots
.AC DEC 100k 10G SWEEP SNAPSHOT STP 0 0 0 |
|