Command line options for starting ngspice and ngnutmeg
Command Synopsis:
ngspice [ -o logfile] [ -r rawfile] [ -b ] [ -i ] [ input files ]
ngnutmeg [ - ] [ datafile ... ]
Options are:
Option
|
Long option
|
Meaning
|
-
|
Don't try to load the default data file ("rawspice.raw") if no other files are given (ngnutmeg only).
|
|
-n
|
--no-spiceinit
|
Don't try to source the file .spiceinit upon start-up. Normally ngspice and ngnutmeg try to find the file in the current directory, and if it is not found then in the user's home directory (obsolete).
|
-t TERM
|
--terminal=TERM
|
The program is being run on a terminal with mfb name term (obsolete).
|
-b
|
--batch
|
Run in batch mode. Ngspice reads the default input source (e.g. keyboard) or reads the given input file and performs the analyses specified; output is either Spice2-like line-printer plots ("ascii plots") or a ngspice rawfile. See the following section for details. Note that if the input source is not a terminal (e.g. using the IO redirection notation of "<") ngspice defaults to batch mode (-i overrides). This option is valid for ngspice only.
|
-s
|
--server
|
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 ngspice daemon. This option is valid for ngspice only.
Example for using pipes from the console window:
cat adder.cir|ngspice -s|more
|
-i
|
--interactive
|
Run in interactive 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. This option is valid for ngspice only.
|
-r FILE
|
--rawfile=FILE
|
Use rawfile as the default file into which the results of the simulation are saved. This option is valid for ngspice only.
|
-p
|
--pipe
|
Allow a program (e.g., xcircuit) to act as a GUI frontend for ngspice through a pipe. Thus ngspice will assume that the input pipe is a tty and allows to run in interactive mode.
|
-o FILE
|
--output=FILE
|
All logs generated during a batch run (-b) will be saved in outfile.
|
-h
|
--help
|
A short help statement of the command line syntax.
|
-v
|
--version
|
Prints a version information.
|
-a
|
--autorun
|
Start simulation immediately, as if a control section
.control
run
.endc
had been added to the input file.
|
--soa-log=FILE
|
output from Safe Operating Area (SOA) check
|
Further arguments to ngspice are taken to be ngspice input files, which are read and saved (if running in batch mode then they are run immediately). Ngspice accepts Spice3 (and also most Spice2) input files, and outputs ASCII plots, Fourier analyses, and node printouts as specified in .plot, .four, and .print cards. If an out parameter is given on a .width card (15.6.7), the effect is the same as set width = .... Since ngspice ASCII plots do not use multiple ranges, however, if vectors together on a .plot card have different ranges they do not provide as much information as they do in a scalable graphics plot.
For ngnutmeg, further arguments are taken to be data files in binary or ASCII raw file format (generated with -r in batch mode or the write (see 17.5.93) command) that are loaded into ngnutmeg. If the file is in binary format, it may be only partially completed (useful for examining output before the simulation is finished). One file may contain any number of data sets from different analyses.