% options.tex  94.06.05
% man commands options .
% Copyright 1983-1992   Albert Davis
%------------------------------------------------------------------------
\section{{\tt OPTions} command}
\index{options command}
\index{set command}
\index{system options}
\index{options: global}
\index{global options}
%------------------------------------------------------------------------
\subsection{Syntax}
\begin{verse}
{\tt OPTions}\\
{\tt OPTions} {\it option-name value} ...
\end{verse}
%------------------------------------------------------------------------
\subsection{Purpose}

Sets options, iteration parameters, global data.
%------------------------------------------------------------------------
\subsection{Comments}

Typical usage is the name of the item to set followed by the
value.

The bare command `{\tt OPTions}' displays the values.

These options control the simulation by specifying how to
handle marginal circumstances, how long to wait for
convergence, etc.

Most of the SPICE options are supported, more have been	added.
%------------------------------------------------------------------------
\subsection{Parameters}

\begin{description}

\index{accounting}
\item[{\tt ACCT}] Turns on accounting.  When enabled, print the
CPU time used after each command, and a summary on exit in batch
more.  This does not affect accounting done by the {\tt status}
command.

\item[{\tt NOACCT}] Turns off accounting.  (Not in SPICE.)

\index{echo file input}
\item[{\tt LIST}] Turns on echo of files read by {\tt get} and
{\tt merge} commands, and in batch mode.  (SPICE option accepted
but not implemented.)

\item[{\tt NOLIST}] Turns off list option.  (Not in SPICE.)

\item[{\tt MOD}] Enable printout of model parameters.  (Accepted,
but not implemented, to complement {\tt NOMOD}.)

\item[{\tt NOMOD}] Suppress printout of model parameters.  (SPICE
option accepted but not implemented.)

\item[{\tt PAGE}] Enable page ejects at the beginning of
simulation runs.  (Accepted, but not implemented, to complement
{\tt NOPAGE}.)

\item[{\tt NOPAGE}] Turn off page ejects.  (SPICE option accepted
but not implemented.)

\item[{\tt NODE}] Enable printing of the node table.  (SPICE
option accepted but not implemented.)

\item[{\tt NONODE}] Disable printing of the node table.
(Accepted, but not implemented, to complement {\tt NODE}.)

\item[{\tt OPTS}] Enable printing of option values on every options
command.

\item[{\tt NOOPTS}] Disable automatic printing of option values.
Option values are only printed on a null options command.

\index{gmin option}
\index{minimum conductance}
\index{open circuit error}
\item[{\tt GMIN} = {\it x}] Minimum conductance allowed by the program.
(Default = 1e-12 or 1 picomho.)  Every node must have a net
minimum conductance of {\tt GMIN} to ground.  If effective open
circuits are found during the solution process (leading to a
singular matrix) a conductance of {\tt GMIN} is forced to
ground, after printing an "open circuit" error message.

\index{reltol option}
\index{relative tolerance}
\index{convergence criteria}
\item[{\tt RELTOL} = {\it x}] Relative error tolerance allowed.
(Default =.001 or .1%.)
If the ratio of successive values in iteration are within {\tt
RELTOL} of one, this value is considered to have converged.

\index{abstol option}
\index{absolute tolerance}
\index{convergence criteria}
\item[{\tt ABSTOL} = {\it x}] Absolute error tolerance
allowed.  (Default = 1e-12)
If successive values in iteration are within {\tt ABSTOL} of
each other, this value is considered to have converged.

\index{vntol option}
\index{voltage tolerance}
\index{model evaluation bypass}
\item[{\tt VNTOL} = {\it x}] Absolute voltage error required to
force model re-evaluation.  (Default = 1e-12 or 1 microvolt.)
If the voltage at the terminals of a model is within {\tt
VNTOL} of the previous iteration, the model is not
re-evaluated.  The old values are used directly.

\index{trtol option}
\index{transient error tolerance}
\item[{\tt TRTOL} = {\it x}] Transient error ``tolerance''.
(Default = 7.)  This parameter is an estimate of the factor by
which the program overestimates the actual truncation error.

\index{chgtol option}
\index{charge error tolerance}
\item[{\tt CHGTOL} = {\it x}] Charge tolerance.  (Default =
1e-14) It is used in step size control in transient analysis.

\index{pivtol option}
\index{pivot tolerance}
\item[{\tt PIVTOL} = {\it x}] Pivot tolerance.  (Default =
1e-13) SPICE option accepted but not implemented.

\index{pivrel option}
\item[{\tt PIVREL} = {\it x}] Pivot ratio.  (Default = 1e-3)
SPICE option accepted but not implemented.

\index{numdgt option}
\item[{\tt NUMDGT} = {\it x}] Number of significant digits to
print.  (Default = 4.)  SPICE option accepted but not
implemented.

\index{tnom option}
\index{temperature}
\index{nominal temperature}
\index{reference temperature}
\item[{\tt TNOM} = {\it x}] Nominal temperature.  (Default =
27$^{\circ}$ C.)
All components have their nominal value at this temperature.

\index{iteration count}
\index{itl? options}
\item[{\tt ITL1} = {\it x}] DC iteration limit.  (Default = 100.)
Sets the maximum number of iterations in a DC, OP, or initial
transient analysis allowed before stopping and reporting that it
did not converge.

\item[{\tt ITL2} = {\it x}] DC transfer curve iteration limit.
(Default = 50.)  SPICE option accepted but not implemented.
Use ITL1 instead.

\item[{\tt ITL3} = {\it x}] Lower transient iteration limit.
(Default = 4.)  If the number of iterations is more than {\tt ITL3}
the step size will not increase beyond its present size.  Otherwise,
it can grow by trstepgrow.

\item[{\tt ITL4} = {\it x}] Upper transient iteration limit.
(Default = 10.)  Sets the maximum number of iterations on a step
in transient analysis.  If the circuit fails to converge in this
many iterations the step size is reduced (by option trstepshrink),
time is backed up, and the calculation is repeated.

\item[{\tt ITL5} = {\it x}] Transient analysis total iteration
limit.  (Default = 5000.)  SPICE option accepted but not
implemented.  Actual behavior is the same as {\tt ITL5} = 0, in
SPICE, which omits this test.

\item[{\tt ITL6} = {\it x}] Source stepping iteration limit.
(Default = 0.)  SPICE option accepted but not implemented.
Source stepping is not available.

\index{worst case iterations}
\index{iterations: worst case analysis}
\item[{\tt ITL7} = {\it x}] Worst case analysis iteration
limit.  (Default = 1.)
Sets the maximum number of iterations for the individual
element trials in a DC or bias worst case analysis.  If more
iterations than this are necessary, the program silently goes
on to the next step, as if nothing was wrong, which is usually
the case.

\index{convergence diagnostics}
\item[{\tt ITL8} = {\it x}] Convergence diagnostic iteration threshold.
(Default = 100.)  If the iteration count on a step exceeds {\tt ITL8}
diagnostic messages are printed in an attempt to aid the user in solving the
convergence problem.

\index{cptime option}
\index{cpu time limit}
\item[{\tt CPTIME} = {\it x}] Total CPU job time limit.
(Default = 30000.)  SPICE option accepted but not implemented.
There is no limit imposed.

\index{limtim option}
\item[{\tt LIMTIM} = {\it x}] CPU time reserved for plotting.
(Default = 2.)  SPICE option accepted but not implemented.

\index{limpts option}
\item[{\tt LIMPTS} = {\it x}] Max number of points printed.
(Default = 201.)  SPICE option accepted but not implemented.

\index{lvlcod option}
\item[{\tt LVLCOD} = {\it x}] Matrix solution and allocation
method.  (Default = 2, generate machine language.)  SPICE
option not implemented.

\index{lvltim option}
\index{time step control}
\item[{\tt LVLTIM} = {\it x}] Time step control method.
(Default = 2, truncation error.)  SPICE option not implemented.

\index{method option}
\index{integration method}
\item[{\tt METHOD} = {\it x}] Integration method.  (Default =
{\tt TRAPezoidal}.)  Possible values are {\tt GEAR} or {\tt
TRAPezoidal}.  SPICE option not implemented.

\index{maxord option}
\index{integration order}
\item[{\tt MAXORD} = {\it x}] Maximum order for integration
method.  (Default = 2.)  Must be between 1 and 6.  Applies only
if {\tt METHOD} = {\tt GEAR}.  SPICE option not implemented.

\index{defl option}
\index{mosfet defaults}
\item[{\tt DEFL} = {\it x}] MOSFET default channel length in 
meters.  (Default = 100u.)

\index{defw option}
\item[{\tt DEFW} = {\it x}]  MOSFET default channel width in 
meters.  (Default = 100u.)

\index{defad option}
\item[{\tt DEFAD} = {\it x}] MOSFET default drain diffusion area
in square meters.  (Default = 0.)

\index{defas option}
\item[{\tt DEFAS} = {\it x}]  MOSFET default source diffusion area
in square meters.  (Default = 0.)

\index{seed option}
\index{random number seed}
\item[{\tt SEED} = {\it x}] Seed used by the random number
generator.  (Default = 1.)  (ECA-2 equivalent = {\tt Random}.)
(Not available in SPICE.)  The same random numbers will be used
every time, determined by this seed number.  Setting this to
zero is a special case, causing each run to start from a random
point.

\index{wczero option}
\index{zero: worst case}
\item[{\tt WCZERO} = {\it x}] Worst case zero window.  (Default
= 1e-9) (Not available in SPICE.)  Sets a window for the
difference in a DC or bias worst case analysis.  Differences
less than this are assumed to be zero, for purposes of setting
direction flags.  This prevents cluttering up the screen with
very small numbers that are essentially zero.
	
\index{damp option}
\index{damped Newton's method}
\item[{\tt DAMP} = {\it x}] Newton damping factor.  (Default =
1.)  Sets the damping factor for iteration by damped Newton's
method.  Must be between 0 and 1, as close to 1 as possible and
still achieve convergence.  Useful range is from .9 to 1.
Setting {\tt DAMP} too low may cause convergence to a nonsense
result.
	
\index{floor option}
\index{suppressing numerical noise}
\item[{\tt FLOOR} = {\it x}] Effective zero value.  (Default =
1e-20) Results values less than {\\ FLOOR} are shown as zero.
	
\index{tempamb option}
\index{ambient temperature}
\item[{\tt TEMPAMB} = {\it x}] Simulation temperature.
(Default = 27$^{\circ}$ C.)  Sets the ambient temperature, in
degrees Celsius.  This is the temperature at which the
simulation takes place, unless changed by some other command.

\index{short option}
\index{short circuit resistance}
\index{voltage source resistance}
\index{resistance of short}
\item[{\tt Short} = {\it x}] Resistance of voltage source or
short.  (Default = 1e-7 or 10 $\mu\Omega$.)  Sets the default
resistance of voltage sources.  In some cases, inductors are
replaced by resistors, if so, this is the value.  It is also
the resistance used to replace short circuits anywhere they are
not allowed and the program finds one.

\index{transits option}
\index{mixed mode control}
\item[{\tt TRansits} = {\it x}] Mixed mode transition count. (Default = 2)
Sets the number of ``good'' transitions for a supposedly digital signal
to be accepted as digital.

\index{in option}
\index{input width option}
\index{width command}
\item[{\tt IN} = {\it x}] Input width.  (Default = 80.)
Sets the last column read from each line of input.  Columns
past this are ignored.  This option is present only for SPICE
compatibility, through the {\tt width} command, which is an
alias for {\tt options}.

\index{out option}
\index{output width option}
\item[{\tt OUT} = {\it x}] Output width.  (Default = 80.)
Sets the output print width, for tables and character graphics.

\index{xdivisions option}
\index{plot control}
\item[{\tt XDivisions} = {\it x}]  X axis divisions. (Default = 4)
Sets the number of divisions on the X axis for plotting.

\index{ydivisions option}
\index{plot control}
\item[{\tt YDivisions} = {\it x}]  Y axis divisions. (Default = 4)
Sets the number of divisions on the Y axis for plotting.

\item[{\tt ORder} = {\it x}] Equation ordering.  (Default = auto.)
Determines how external node numbers are mapped to internal numbers.  The
values are {\tt FORward}, {\tt REVerse}, and {\tt AUTo}.

\item[{\tt MODe} = {\it x}] Simulation mode selection.  (Default = mixed.)
Values are {\tt ANAlog}, {\tt DIGital}, and {\tt MIXed}.  In analog mode,
logic elements (type U) are replaced by their subcircuits as if they were
type X.  In digital mode, logic elements are simulated as digital regardless
of whether the signals are proper or not, as in traditional mixed-mode
simulation.  In mixed mode, logic elements may be simulated as analog or
digital depending on the signals present.

\index{bypass option}
\item[{\tt BYPass}] Bypass model evaluation if appropriate.  If the last two
iterations indicate that an element is converged or dormant, do not evaluate
it but use its old values directly.  (Default)

\index{vbypass option}
\item[{\tt VBYpass}] Check only voltage to bypass model evaluation.  This
produces a faster but possibly less accurate simulation.

\item[{\tt NOBYpass}] Do not bypass model evaluation.

\index{lubypass option}
\item[{\tt LUBypass}] Bypass parts of LU decomposition if appropriate.  If
only a few elements of the matrix were changed solve only those parts
of the LU matrix that depend on them.  (Default)

\item[{\tt NOLUbypass}] Do not bypass parts of LU decomposition.  Solve
the entire LU matrix whenever a matrix solution is called for regardless
of whether it is actually needed.  

\index{incmode option}
\item[{\tt INCmode}] Incrementally update the matrix.  Instead of 
rebuilding the matrix on every iteration, keep as much of the old 
matrix as possible and make incremental changes.  (Default)

\item[{\tt NOIncmode}] Do not incrementally update the matrix.  This
eliminates a possible cause of roundoff error at the expense of a slower
simulation.

\index{limit option}
\index{voltage limiting}
\item[{\tt LIMIT} = {\it x}] Internal differential branch voltage
limit.  (Default = 1e10, essentially disabled.)  All circuit branch
voltages may be limited to $\pm x$ to aid in convergence.  This is
intended as a convergence aid only.

\item[{\tt VMIN} = {\it x}] Negative node voltage limit.  (Default
= -1e10, essentially disabled)  All node voltages may be limited
to $-x$ to aid in convergence.  This is intended as a convergence
aid only.

\item[{\tt VMAX} = {\it x}] Positive node voltage limit.  (Default
= 1e10, essentially disabled.)  All node voltages may be limited
to $+x$ to aid in convergence.  This is intended as a convergence
aid only.

\index{dtmin option}
\index{minimum resolvable time}
\index{minimum time step}
\item[{\tt DTMIn} = {\it x}] Minimum time step.  (Default = 1e-12.)
The smallest internal time step in transient analysis.  The {\tt
transient} command {\tt dtmin} option and the {\tt dtratio} option
override it if it is bigger.

\item[{\tt DTRatio} = {\it x}] The ratio between minimum and maximum
time step.  (Default = 1e9).

\index{rstray option}
\index{mosfet series resistance}
\item[{\tt RSTray}] Include series resistance in device models.  This 
creates internal nodes and results in a significant speed and memory 
penalty.  It also makes convergence characteristics worse.

\item[{\tt NORSTray}] Do not include series resistance in device
models.  This results in faster simulations and better numerical
accuracy at the expense of model accuracy.  Differences between
{\tt rstray} and {\tt norstray} have been observed to be insignificant
most of the time.  Some popular commercial versions of SPICE do
not implement series resistance at all, so {\tt norstray} may be
more consistent with other simulators.(Default)

\index{cstray option}
\index{mosfet capacitance}
\index{diode capacitance}
\item[{\tt CSTray}] Include capacitance in device models.  This may
create internal nodes and result in a significant speed and memory 
penalty.  It also may make convergence characteristics worse.  (Default)

\item[{\tt NOCSTray}] Do not include capacitance in device models.
This results in faster simulations and better numerical accuracy
at the expense of model accuracy.  Differences between {\tt cstray}
and {\tt nocstray} are usually significant, since often the strays
are the dominant reactive elements.

\index{harmonics option}
\index{fourier: harmonics}
\item[{\tt Harmonics} = {\it x}] Harmonics in Fourier analysis.
(Default = 9) The number of harmonics to display in a Fourier
analysis, unless specified otherwise.

\item[{\tt TRSTEPGrow} = {\it x}] The maximum internal step size
growth in transient analysis.  (Default = 2.)

\item[{\tt TRSTEPShrink} = {\it x}] The amount to decrease the
transient step size by when convergence fails.  (Default = 8.)

\item[{\tt TRReject} = {\it x}] Transient error rejection threshold.
(Default = .5)  Controls how bad the truncation error must be to
reject a time step.  A value of .5 means that if the step reqested
is smaller than .5 times the step size used, the current step will
be rejected.  If the new step is .8 times the old step size it will
be adjusted but the step just calculated will not be rejected.

\end{description}
%------------------------------------------------------------------------
\subsection{Examples}

\begin{description}

\item[{\tt options}] Display the present settings.

\item[{\tt options  itl1=50}] Allows 50 iterations in a {\tt dc} or {\tt
op} analysis.

\end{description}
%------------------------------------------------------------------------
%------------------------------------------------------------------------
