Options which control the operation of the simulator can be entered in the WRspice input file following the .options keyword. There are a number of variables which control simulation, many familiar from SPICE2. Any variable can be set on the .options line, and is similar to setting the variable from the shell with the set command, however the variables set from the .options line are active only when the circuit is the current circuit, and they can not be unset with the unset command.
Multiple .options lines can appear in input. The lines are shell-expanded and evaluated in top-to-bottom order, and left-to-right for each line. The .options lines are expanded and evaluated after execution of the .exec lines. The result of processing each option is immediately available, so that lines like
.options aaa=1 bbb=$aaawill work. In the second line, the variable random will be set when the gauss function is evaluated, so that it will return a random value, and not just the mean.
.options random tmpval = $&(gauss(.2,1))
The variables set in the .options lines are set before variable expansion is performed on the rest of the circuit text, so that global shell variables may be set in the .options lines.
The options which control simulation can also be entered from the keyboard by using the WRspice set command, or equivalently from the graphical tools available from the Tools menu of the Tool Control window (described in 3.5). Before a simulation starts, these options will be merged with the options from the .options lines, unless the noshellopts variable is set from the shell. The result of the merge is that options that are booleans will be set if set in either case, and those that take values will assume the value set through the shell if conflicting definitions are given. The merge will be suppressed if the shell variable noshellopts is set, in which case the only options used will be those from the .options lines, and any shell redefinitions will be ignored.
In general, variables set in the .options lines are available for expansion in $variable references, but do not otherwise affect the workings of the shell (see 3.15). Variables set from a .options line are indicated with a ``+'' in the listing provided from the set command given with no arguments, or in the Variables tool from the Tools menu in the Tool Control window. The cktvars variable can be set from the shell, to allow variables set in .options lines to be treated fully as shell variables.
Although any variable can be set from a .options line, the variables listed below are most likely to appear in that context due to SPICE2/3 history. There are other simulation-related variables which may also be likely given as options, see 4.9.5.
Option | Effect | |
---|---|---|
abstol=x | Resets the absolute current error tolerance of the program. The default value is 1 picoamp. | |
acct | Print accounting information in batch output. | |
bypass | Set to 0 to disable element computation bypassing. | |
chgtol=x | Resets the minimum charge used when computing the time step in transient analysis. The default value is 1.0e-14. | |
defad=x | Resets the value for MOS drain diffusion area; the default is 0.0. | |
defas=x | Resets the value for MOS source diffusion area; the default is 0.0. | |
defl=x | Resets the value for MOS channel length; the default is 100.0 micrometer. | |
defw=x | Resets the value for MOS channel width; the default is 100.0 micrometer. | |
gmin=x | Resets the value of gmin, the minimum conductance allowed by the program. The default value is 1.0e-12. | |
hspice | Suppress warnings from unsupported HSPICE input. | |
itl1=x | Resets the dc iteration limit. The default is 400. | |
itl2=x | Resets the dc transfer curve iteration limit. The default is 100. | |
itl4=x | Resets the transient timepoint iteration limit. The default is 10. | |
list | Print a listing of the input file in batch output. | |
node | Print a tabulation of the operating point node voltages in batch output. | |
notrapcheck | Skip trapezoidal integration convergence testing in transient analysis. | |
opts | Print a summary of the specified options in batch output. | |
parhier | Set the parameter substitution precedence, ``local'' or ``global'' (default). | |
pivrel=x | Resets the relative ratio between the largest column entry and an acceptable pivot value. The default value is 1.0e-3. In the numerical pivoting algorithm the allowed minimum pivot value is determined by epsrel = max(pivrel*maxval, pivtol ) where maxval is the maximum element in the column where a pivot is sought (partial pivoting). | |
pivtol=x | Resets the absolute minimum value for a matrix entry to be accepted as a pivot. The default value is 1.0e-13. | |
reltol=x | Resets the relative error tolerance of the program. The default value is 0.001 (0.1 percent). | |
spice3 | Use the SPICE3 integration level control logic in transient analysis. | |
temp=x | Resets the operating temperature. The default value is 25C (300K). | |
tnom=x | Resets the nominal temperature. The default value is 25C (300K). | |
trapratio=x | Resets the threshold for trapezoidal integration convergence testing. The default value is 10.0. | |
trtol=x | Resets the transient time step prediction factor. The default value is 7.0. This parameter is an estimate of the factor by which WRspice overestimates the actual truncation error. | |
trytocompact | Enable compaction in LTRA (lossy transmission line) model. | |
vntol=x | Resets the absolute voltage error tolerance of the program. The default value is 1 microvolt. | |
xmu=x | Resets the SPICE2 trapezoidal/Euler mixing parameter. If 0.0, integration is pure-Euler. The default value is 0.5 (pure trapezoidal). |