Spice3f5

The spice program

The circuit simulator, with its Qt front end.

Synopsis

spice [ -b ] [ -s ] [ -i ] [ -q ] [ -n ] [ -o outfile ] [ -r rawfile ] [ input file ... ]

Run without -b or -s, Spice3f5 opens its Qt window, with the input files (if any) loaded into the editor. See the Qt front end and the interactive interpreter. With -b it runs without a window: it reads the input files, or the standard input, runs the analyses they specify and exits.

Options

-b (or -B)
Batch mode: run the input without the Qt window. Output is either Spice2-like line-printer plots and printouts, as requested by .plot, .print and .four cards, or, with -r, a rawfile. If the input's .control block runs the circuit (with run, op, tran and so on), the analyses aren't run again afterwards: the results the block made are used for the .print, .plot and .four output, or written to the rawfile.
-s (or -S)
Server mode: 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.
-i (or -I)
Interactive mode. This is the default.
-q (or -Q)
Turn off command completion.
-n (or -N)
Don't read the .spiceinit file at startup.
-o outfile (or -O)
Write the standard output to outfile.
-r rawfile (or -R)
Use rawfile as the default rawfile. In batch mode, the results are written to it instead of being printed; see the rawfile format.

The -t term option, which named a graphics terminal, is still accepted but has no effect.

Files

lib/scripts/spinit
Commands run at startup, before .spiceinit.
.spiceinit
Commands run at startup, from the current directory or, if there is none there, from your home directory. Its first line is not treated as a title. It is read in batch mode too, before the input, but not in server mode. -n skips it.
lib/news
A message printed at startup, if the file exists.
lib/helpdir/spice.txt, spice.idx
The text of the help command, and its index.
rawspice.raw
The default rawfile, unless -r or the rawfile variable gives another.

Here lib is the library directory: the one set when Spice3f5 is built, or SPICE_LIB_DIR. When running Spice3f5 from its build directory, set SPICE_LIB_DIR to the lib directory of the source tree.

Environment variables

SPICE_LIB_DIR
The library directory, holding scripts, helpdir and news.
SPICE_EXEC_DIR
The directory holding the programs.
SPICE_SCRIPTS
The directory of startup scripts (default lib/scripts). It is also where the source command looks for files.
SPICE_HELP_DIR
The directory of the help text (default lib/helpdir).
SPICE_NEWS
The file printed at startup (default lib/news).
SPICE_EDITOR
The editor for the edit command, unless the editor variable is set.
SPICE_ASCIIRAWFILE
Whether rawfiles are written in ASCII rather than binary by default. The filetype variable overrides it.
SPICE_PATH
The program run by the aspice command (default spice3 in SPICE_EXEC_DIR).
SPICE_HOST
The default host for the rspice command.
SPICE_BUGADDR
The address the bug command reports to.