next up previous contents index
Next: Simulation Options Up: Initialization Previous: .nodeset Line   Contents   Index


.options Line

General Form:
.options opt1 opt2 ... (or opt=optval ...)
Example:
.options reltol=.005 trtol=8

Options which control the operation of the simulator can be entered in the WRspice input file following the .options keyword. In WRspice there are a number of variables which control simulation, many familiar from traditional Berkeley SPICE. Any variable can be set on the .options line, and this 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=$aaa
.options random tmpval = $&(gauss(.2,1))
will 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.

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), in particular the Simulation Options tool.

Before a simulation starts, variables set in the shell and variables set in .options lines are merged according to a rule as to how to resolve inconsistencies. The details of the merging process are described in the next section, which lists the recognized circuit options. This section provides further information on the use of option variables in WRspice.



Subsections
next up previous contents index
Next: Simulation Options Up: Initialization Previous: .nodeset Line   Contents   Index
Stephen R. Whiteley 2024-10-26