Next: Environment Variables
Up: The WRspice User Interface
Previous: The WRspice User Interface
The WRspice simulator is invoked by typing
wrspice options ... input_files ...
All arguments are optional. There are several options which are
recognized specifically by WRspice. These options are case
insensitive -- the option letters can be given in upper or lower
case. In addition, there are a few additional options recognized by
the graphics system.
The command line options are flagged with the `-' character, but
this can be changed by setting the SPICE_OPTCHAR environment variable.
Below, the use of the `-' character is assumed for simplicity.
Graphical WRspice requires an X server under UNIX. When using X,
the DISPLAY environment variable should already be set, but if
one wants to display graphics on a different machine than the one
running WRspice, DISPLAY should be of the form machine:0. For example, if one wants the display to go to the
workstation named ``crab'', for the C-shell one would enter
``setenv DISPLAY crab:0'' at the shell prompt, or equivalently
for the Bourne shell one would enter ``DISPLAY=crab; export
DISPLAY'' or the more compact form ``export DISPLAY=crab'' if
supported. Note that this can also be supplied using the -d
Further arguments are taken to be WRspice input files, which are
read and saved in memory. If batch mode is requested (-b
option) then they are run immediately. WRspice will accept SPICE2
input files, and output ASCII plots, Fourier analyses, and node
printouts as specified in .plot, .four, and .print
lines. If an out parameter is given on a .width line, the
effect is the same as ``set width = ...''. Since WRspice
ASCII plots do not use multiple ranges, however, if vectors together
on a .plot card have different ranges they will not provide as
much information as they would in SPICE2. The output of WRspice is
also much less verbose than SPICE2, in that the only data printed is
that requested by the above lines.
The following option forms are accepted by WRspice. The option
letter can be lower or upper case.
Run in batch mode. WRspice will read the standard input or the
specified input files and do the simulation. Note that if the
standard input is not a terminal, WRspice will default to batch
mode, unless the -i option is given. In batch mode, WRspice
generates output files for operating range and Monte Carlo analysis,
otherwise if the -r option is used (-r filename)
WRspice generates a plot data file, or generates an ASCII plot or
print on standard output, as per .plot/.print lines, if no filename was specified. See the description of the write
command (4.5.11) for information about the file formats
available and how they can be specified.
- -c flags
This option sets the case sensitivity of various name classes
in WRspice. These classes are:
User-defined function names.
Node and device names.
The flags is a word consisting of letters, each letter
corresponds to a class from the list above. If lower-case, the class
will be case-sensitive. If upper-case, the class will be
The letters are f, u, v, p, c, and n corresponding to the classes listed above. By default, all
identifiers are case-insensitive, which corresponds to the string
``FUVPCN''. Letters can appear in any order, and unrecognized
characters are ignored. Not all letters need be included, only those
seen will be used.
This word should follow -c or -C in the command line
options, separated by space.
Case sensitivity can also be set from a startup file using the setcase command. This command takes as an argument a string as
described above. The command line setting occurs after setting from a
- -d [host]:server[.screen]
This option is applicable when running under X windows, and specifies
the name of the display to use. The host is the hostname of the
physical display, server specifies the display server number,
and screen specifies the screen number. Either or both of the
host and screen elements to the display specification can
be omitted. If host is omitted, the local display is assumed.
If screen is omitted, screen 0 is assumed (and the period is
unnecessary). The colon and (display) server are necessary in
all cases. This option can also be given as -display and -display.
This is a special form of the -d option that when given will
suppress all use of graphics. This can be desirable when running
WRspice remotely over a slow terminal connection. This option will
also work under Windows, if for some reason it is necessary to run
WRspice in text-only mode.
Run in interactive (as opposed to batch) mode. This is useful if the
standard input is not a terminal but interactive mode is desired.
Command completion is not available unless the standard input is a
terminal, however. Interactive mode is the default when the standard
input is a terminal.
Run in JSPICE3 compatibility mode. This applies when running
interactively, and causes the following behavior.
- The Tool Control window is not shown.
- The noerrwin variable is set, which causes error messages
to be printed in the console rather than to a separate error window.
- The subc_catmode variable is set to ``spice3'' and
the subc_catchar variable is set to ``:'' (colon). This
sets the subcircuit expansion method to match JSPICE3 and SPICE3.
- -m path
The path is to a loadable device module (see 3.18)
file, or to a directory containing module files. Giving this option
causes the indicated module, or modules found in the directory, to be
loaded into WRspice on program startup, after the
<tt>.wrspiceinit</tt> file has been read. The option can be given
more than once. If given, auto-loading of modules from the modpath or the devices sub-directory in the startup
directory will not be done. Modules can be loaded from within
WRspice with the devload command.
This option will suppress auto-loading of modules from the modpath or the devices sub-directory in the startup
Don't try to execute the user's startup files (.wrspiceinit
files) upon startup. Normally WRspice tries to find these files in
the user's home directory and the current directory, and will execute
them in that order. In Windows, the ``home directory'' can be
specified by setting the HOME environment variable. The global
file wrspiceinit in the system startup directory is sourced in
- -o outfile
The argument outfile specifies a file to be used for output,
rather than the standard output (terminal).
Open WRspice in a mode which takes input from a UNIX port, used to
establish interprocess communications as a slave process.
Disable command completion, which saves memory and may run slightly
faster. This prevents initial loading of the command completion data
structures. If the variable nocc is set and unset, command
completion will be turned on, however most internal keywords will not
be present in the database.
- -r filename
Use filename as the default file into which the results of the
simulation are saved with the write command, and for data output
in batch mode. This can be overridden with the rawfile
variable. See the description of the write command
(4.5.11) for information about the file formats available, and
how they can be specified.
Run in server mode. This is like batch mode, except that a temporary
rawfile is used and then written to the standard output, preceded by a
line with a single `@', after the simulation is done. This mode
is used by the /WRspice daemon wrspiced. In server mode,
WRspice reads input from the standard input, and generates output,
in rawfile or margin analysis file format, on the standard output.
The -r and -b options are ignored.
- -t termname
This specifies the name of the terminal, as known in a termcap or
terminfo database. The terminal name is only needed in interactive
mode when line editing is enabled, and is generally obtained from the
TERM environment variable. Occasionally, this option is useful
in overriding bad terminal info specifications allowing line editing
to work, such as by giving a value of ``vt220'' when running in
This option, if given, will cause WRspice to provide its own window
for text input, if WRspice is in interactive mode and graphics is
available. Under the X window system, the ``xterm'' command
is used to obtain the text window.
The UNIX/Linux graphical subsystem will accept the following options.
It is unlikely that the user will ever need these.
- -class classname
This option specifies the application class name under which resources
for the application should be found.
- -name appname
This option specifies the name under which resources for the
application should be found. This option is useful in shell aliases
to distinguish between invocations of an application, without
resorting to creating links to alter the executable file name.
This option can also be given as ``-name''.
This option indicates that requests to the X server should be sent
synchronously, instead of asynchronously. Since Xlib normally buffers
requests to the server, errors do not necessarily get reported
immediately after they occur. This option turns off the buffering so
that the application can be debugged. It should never be used with a
working program. This option can also be given as ``-synchronous''.
If set, the X server will not use shared memory.
If this argument is given, WRspice will print a version string
consisting of three tokens to the standard output, and exit. The
version osname arch
for example ``4.3.11 LinuxCentos7 x86_64''.
If this argument is given, WRspice will print a CVS-style release
tag string in the form
to the standard output, and exit.
If this argument is given, WRspice will print the build date to the
standard output, and exit.
Next: Environment Variables
Up: The WRspice User Interface
Previous: The WRspice User Interface
Stephen R. Whiteley