next up previous contents index
Next: Debugging Variables Up: Variables Previous: Plot Variables   Contents   Index

Simulation Option Variables

These variables control defaults related to simulation. Most of these variables can be set indirectly from the Sim Defs tool in the Tools menu of the Tool Control window, which is equivalent to using the set command. They (and any variable) can also be included in an .options line in the input file. Before a simulation starts, the options from the .options line are merged with any that have been set using the shell. The result of the merge is that options that are booleans well 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 from the shell, in which case the only options used will be those from the .options line, and those set using the set command will be ignored.

In the listing of variables provided by the set command without arguments, the variables set in the .options line of the current circuit will be listed with a ``+'' in the first column. The variables set in the .options line are available for substitution (into $variable references) when the circuit is the current circuit, but otherwise do not affect the shell. For example, setting the variable noglob from a .options line will not affect the global expansion of the shell, but references to $noglob would behave as if the boolean noglob was set, while the circuit is the current circuit.

Shell variables set in the .options line are set before the rest of the SPICE text is expanded, so that shell variable references in the text can be defined from the .options line, as in the .exec block. The .exec lines are executed before the .options lines are expanded.

abstol
This variable sets the absolute error tolerance used in convergence testing. The default value is 1e-12.

bypass
When this bool variable is set, WRspice will bypass computation of unchanging elements, which may improve execution speed.

chgtol
This variable sets the charge tolerance used in convergence testing. The default value is 1e-14.

defad
This variable sets the value for MOS drain diffusion area. The default is 0.0.

defas
This sets the value for MOS source diffusion area. The default is 0.0.

defl
This sets the value for MOS channel length. The default is 100.0 micrometers.

defw
This variable sets the value for MOS channel width. The default is 100.0 micrometers.

dphimax
This variable sets the maximum allowable phase change of sinusoidal and exponential sources between internal time points in transient analysis.

Consider a circuit consisting of a sinusoidal voltage source driving a resistor network. The internal transient time steps are normally determined from a truncation error estimation from the numerical integration of reactive elements. Since there are no such elements in this case, a large, fixed time step is used. This may not be sufficient to reasonably define the sinusoidal source waveform, so the timestep is cut. This variable sets the time scale for the cut. The default value of $ \pi$/5 provides about 10 points per cycle. All of the built-in source functions that are exponential or sinusoidal reference this variable in the timestep cutting algorithm.

This variable also limits the transient time step when Josephson junction devices are present, i.e., it is equivalent to the jjdphimax variable in JSPICE3.

The variable can be set in the range $ \pi$/1000 - pi, and is taken as $ \pi$/5 if unset.

gmin
This sets the value of gmin, the minimum conductance allowed by the program. The default value is 1e-12.

gminsteps
This variable sets the number of gmin steps used in finding the operating point, if convergence initially fails. The default is 10. In gmin stepping, conductances are added to the matrix diagonal, and reduced by a factor of 10 for each gmin step so that on the final step the conductances are equal to the gmin variable. This iterative process most often leads to convergence.

interplev
In transient analysis, in the default steptype mode, internal timepoint data are interpolated onto the external (user supplied) time points. Only the interpolated data are saved. This variable sets the polynomial degree of interpolation, in the range 1-3. The default is 1 (linear interpolation).

itl1
The itl1 variable sets the dc iteration limit before convergence failure is indicated. The default is 400.

itl2
The itl2 variable sets the dc transfer curve iteration limit before convergence failure is indicated. The default is 100.

itl4
This variable sets the number of timepoint iterations in transient analysis above which convergence failure is indicated. The default is 10.

maxdata
This variable sets the maximum allowable memory stored as plot data during an analysis, in kilobytes. The default is 32000. For all analyses except transient with the steptype variable set to ``nousertp'', the run will abort at the beginning if the memory would exceed the limit. Otherwise, the run will end when the limit is reached.

maxord
This variable sets the maximum order of the integration method used. Setting this to 1 will always use rectangular integration. If unset, the value taken is 2, which is the maximum order for the default trapezoidal integration. If Gear integration is used, the maximum order is 7.

method
This string can be set to either of the keywords ``trap'', which is the default and sets trapezoidal integration, or ``gear'', for Gear integration. The maxord variable sets the maximum order of the integration.

minbreak
This sets the minimum interval between breakpoints in transient analysis, which is otherwise set to 1e-20.

modelcard
This variable allows the keyword that specifies a model to be reset. If unset, the keyword is ``.model''.

nobjthack
If this boolean is set, bipolar transistors are assumed to have four nodes. Otherwise, three nodes are acceptable. This only affects subcircuit expansion.

noiter
Not currently implemented.

During transient analysis, at each new time step, Newton iterations are used to solve the nonlinear circuit equations. The first iteration, the prediction step, uses extrapolation from past values to obtain a best guess at the solution for use as input. Additional iterations use the previous output values as input.

In cases where the nonlinearity is weak, or where the internal time step is forced to be small (as when Josephson junctions are present) iterations beyond the predictor sometimes lead to unneeded accuracy. Setting the variable noiter causes skipping of iterations beyond the prediction step, and also skipping of certain other code. This maximizes the simulation rate, but can lead to errors if not used carefully. Much the same effect can be obtained by setting reltol to a large value, however noiter is more efficient as convergence testing and matrix loading are skipped, as there is a-priori knowledge that no iterations are to take place. The iteration count and total internal timepoint count are available from the rusage command.

nojjtp
During transient analysis with Josephson junctions present, the default time step is given by T = $ \phi$/vmax, where $ \phi$ = $ \Phi_{0}^{}$/2$ \pi$ ($ \phi$ = 3.291086546e-16, $ \Phi_{0}^{}$ is the magnetic flux quantum) and vmax = max(Vj, sqrt($ \phi$Jc/C)). If the variable nojjtp is set, the timestep is determined from a truncation error calculation, as is the case when Josephson junctions are not present in the circuit. The user should experiment to determine which timestep leads to faster execution.

noopiter
When computing the operating point, the iterator is called directly, and if this fails gmin stepping and source stepping are used to try and obtain convergence. If this variable is set, the direct convergence attempt is bypassed, and the flow begins with gmin stepping.

noshellopts
If set, do not use WRspice options that have been set interactively through the shell. Use only options that appear in a .options line in the circuit file when running a simulation of the circuit.

oldlimit
When set, the SPICE2 limiting algorithm for MOS devices is used. Otherwise, an improved limiting procedure is used.

pivrel
This variable sets the relative ratio between the largest column entry and an acceptable pivot value. The default value is 1e-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
This variable sets the absolute minimum value for a matrix entry to be accepted as a pivot. The default value is 1e-13.

reltol
This sets the relative error tolerance used in convergence testing. The default value is 0.001 (0.1 percent).

renumber
When set, the source lines are renumbered sequentially after subcircuit expansion.

savecurrent
If this variable is set, then all device current special vectors are saved in the plot by default during analysis. This enables plotting of device currents using the @device[param] construct.

srcsteps
If gmin stepping fails, convergence is attempted by raising the sources step-wise to their specified values, iteratively. This variable sets the number of steps used in this technique. The default is 10.

steptype
This string can be set to one of three keywords which determine the data output mode in transient analysis. It can be set to ``interpolate'', which is the default, ``hitusertp'', or ``nousertp''.

If not set, or set to ``interpolate'', output points are interpolated from internal time points to the user time increments, with degree 1 (the default) to 3, set by the interplev variable.

If set to ``hitusertp'', then during transient analysis the time step will be cut so as to land on the user time points. This requires more simulation time, but provides the greatest accuracy.

Setting to ``nousertp'' will cause internal timepoint data to be saved, either in internal data structures in interactive mode or in the rawfile in batch mode. The amount of data can grow quite large.

subend
This variable allows the keyword which ends a subcircuit definition to be changed. If unset, the keyword is ``.ends''.

subinvoke
This variable allows the prefix which invokes a subcircuit to be changed. If unset, the prefix is ``x''.

substart
This variable allows the keyword which begins a subcircuit definition to be changed. If unset, the keyword is ``.subckt''.

temp
This variable specifies the assumed operating temperature of the circuit under simulation. The default value is 27C (300 K).

tnom
The tnom variable sets the nominal temperature. The default value is 27C (300 K). This is the temperature at which device model parameters are assumed to have been measured.

trtol
This sets the transient error tolerance. The default value is 7.0. This parameter is an estimate of the factor by which WRspice overestimates the actual truncation error.

trytocompact
This boolean variable is applicable only to the LTRA model. When specified, the simulator tries to condense LTRA transmission line past history of input voltages and currents.

vntol
This variable sets the absolute voltage error tolerance used in convergence testing. The default value is 1 microvolt.

In addition, the following variables have no significance to WRspice when in interactive mode, but control operations in batch mode. Also, there are SPICE2 options which are recognized but do nothing. These are listed below.

acct
When WRspice is run in batch mode, print out accounting information at the end of the run. This boolean variable has meaning only when set in the input file in a .options line.

cptime
The SPICE2 option to set the maximum allowable cpu time for the job. This has no effect in WRspice.

itl3
The SPICE2 option to set the lower transient iteration limit for timestep control. This is not used in WRspice.

itl5
The SPICE2 option to set the maximum number of iterations for the job. This is not used in WRspice.

limpts
The SPICE2 variable which sets the maximum number of points per analysis. This is not used in WRspice.

limtim
The SPICE2 option to reserve time for output generation. This is not used in WRspice.

list
When WRspice is run in batch mode, list the circuit before running the simulation. This boolean variable has meaning only when set in the .options line of the input file.

lvlcod
The SPICE2 option to generate machine code. This is not used in WRspice.

lvltim
The SPICE2 variable to set the type of timestep control. This is not used in WRspice.

node
The SPICE2 variable to print a node summary. This boolean variable has meaning only when set in the .options line of the input file.

nomod
The SPICE2 variable to suppress printing of a summary of models. This is not used in WRspice.

opts
When WRspice is run in batch mode, print out all the variables set and their values. This boolean variable has meaning only when set in the .options line of the input file.


next up previous contents index
Next: Debugging Variables Up: Variables Previous: Plot Variables   Contents   Index
Stephen R. Whiteley 2006-10-23