home *** CD-ROM | disk | FTP | other *** search
-
- An abridged spice3 manual, it might even be useful. This manual
- covers basic spice syntax and commands for using Spice TR3e2 in both
- interactive and batch modes. It may not be complete, but a more
- complete version is being worked on.
-
- SPICE (simulation program with integrated circuit emphasis) was
- developed in the Electronics Research Laboratory at the University of
- California at Berkeley. Spice3 is based on spice2. When used in batch
- mode, most of the syntax and commands are the same, but there are
- changes. For example, the output can be similar, using the -o option,
- or the may be written in a "RAW" file format (the raw file format must
- be used if it is to be plotted with Spice TR3e2's graphics capability).
- Polynomial non-linear sources are replaced by a General non-linear
- source (NOTE: most opamp libraries are made for spice2g6 and use
- polynomial non-linear sources-> exception: most of Linear Technology
- Corporation's models will work with either spice2 or spice3).
- Polynomial nonlinear capacitors are not supported in Spice3.
-
- *************** input format ****************************
-
- A circuit to be analyzed by Spice is described by a netlist which
- defines the circuit topology, element (or part) values, and may
- include the type of analysis to be run.
-
- Spice uses ASCII input files. The input format for Spice is of the
- free format type. Fields on a line are separated by one or more
- blanks, a comma, an equal (=) sign, or a left or right parenthesis;
- extra spaces are ignored. A line may be continued by entering a "+" in
- column one of the following line. Comments can be included in the
- listing-just place a "*" in column one of the line (a space will also
- work for Spice3).
-
- The first line in a Spice input file is assumed to be the circuit
- title. The last line must be the ".END" line. Between are the parts,
- type of analysis, and any subcircuits or models. The order of these
- statements is arbitrary (except [of course], that continuation lines
- must immediately follow the line being continued, and element lines
- belonging to a subcircuit must be between the ".SUBCKT" and ".ENDS"
- lines for that subcircuit). Other files may be added by using the
- ".include file_name" command.
-
- Spice is not case-sensitive most of the time (the ".include" command
- must be lower case).
-
- In Spice2, nodes must be labeled as number, in Spice3 they may be may
- be arbitrary character strings, except for the ground node which must
- be named "0". All nodes must have a dc path to ground. The circuit
- cannot contain a loop of voltage sources and/or inductors and cannot
- contain a series connection of current sources and/or capacitors.
- Every node must have at least two connections, except for transmission
- line nodes (to permit unterminated transmission lines) and MOSFET
- substrate nodes (which have two internal connections anyway).
-
- Numbers may be interred directly, followed by a integer exponent, or a
- scale factor. 6000, 6e3, and 6k all have the same value. The scale
- used are: T=e12 G=e9 Meg=e6 K=e3 mil=25.4e-6
- m=e-3 u=e-6 n=e-9 p=e-12 f=e-15
- Letters immediately following a number that are not scale factors are
- ignored, and letters immediately following a scale factor are ignored.
- Hence, 10, 10V, 10VOLTS, and 10hz all represent the same number, and M,
- MA, MSEC, and MMHOS all represent the same scale factor.
-
- Each element in the circuit is specified by an element line that
- contains the element name, the circuit nodes to which the element is
- connected, and the values of the parameters that determine the
- electrical characteristics of the element. The first letter of the
- element name specifies the element type. The format for the SPICE
- element types is given in what follows. The strings XXXXX, YYYYY, and
- ZZZZZ denote arbitrary alphanumeric strings. For example, a resistor
- name must begin with the letter `R' and can contain one or more
- characters. Hence, R, R1, RSE, ROUT, and R3AC2ZY are valid resistor
- names.
-
-
-
-
- ******* Command line Usage ************
-
- spice [ -n ] [ -b ] [ -o outfile ] [ -r rawfile ] [ input_file ]
-
- -n (or -N)
- Don't try to source the file "spice.rc" upon startup.
- Normally Spice tries to find this file in the current
- directory.
-
- -b (or -B)
- Run in batch mode. Spice will read the specified input
- file and do the simulation.
-
- -r rawfile (or -R rawfile)
- Use rawfile as the default file into which the results of
- the simulation are saved. If the -r option is used, the
- .print and .plot commands will be ignored.
-
- -o outfile (or -O outfile)
- Print analysis time and memory usage to a file, and if the
- -r option is not used, use the .print and .plot commands to
- make a Spice2 type output file.
-
- Further arguments are taken to be Spice input files, which are read and
- saved. (If batch mode is requested then they are run immediately.)
-
- Spice files specified on the command line are read in before the
- "spice.rc" file is read. Thus if you define aliases there, any that
- are used in a Spice source file mentioned on the command line won't be
- recognized.
-
-
-
- **************** Parts ******************************
- Data fields that are enclosed in less than and greater than signs ("<"
- or ">") are optional.
-
- resistor
- Format: Rname Node1 Node2 value
- Examples: R1 32 45 1k
- rload 8 0 200
-
- The name must start with the letter R. The value may be
- positive or negative, but not zero.
-
- capacitor
- Format: Cname Node1 Node2 value
- Examples: C1 32 45 1uf
- cload 8 0 200pf
-
- The name must start with the letter C.
-
- inductor
- Format: Lname +Node -Node value
- Examples: L1 32 45 1uh
- lload 8 0 200uh
-
- The name must start with the letter L.
-
- mutual inductor
- Format: Kname Lname1 Lname2 value
- Example: k1 L5 L9 .987
-
- The name must start with the letter K. Two inductors are
- referenced. The standard dot convention determines polarity-
- with the positive node on the inductors having the dot. Value
- is the coefficient of coupling, which must be between 0 and 1.
-
- Lossless Transmission Lines
-
- Format: Tname N1 N2 N3 N4 Z0=value TD=value
- Tname N1 N2 N3 N4 Z0=value F=freq NL=nrmlen
-
- Example: t1 1 0 2 0 z0=75 td=15ns
-
- The name must start with the letter T. N1 and N2 are the nodes
- at port one; N3 and N4 are the nodes at port two. Z0 is the
- characteristic impedance. The length of the line must be
- expressed in either one of two forms : the delay may be specified
- directly (TD=value) or a frequency (F=freq) must be given. If
- the frequency is given, the normalized electrical length
- (NL=value) may be given (the default is NL=.25).
-
- NOTE1: This models only one propagating mode. If all four nodes
- are distinct in the actual circuit, then two modes may be
- excited. To simulate this, two transmission line elements
- are required.
-
- NOTE2: The lossy transmission line with zero loss may be more
- accurate due to implementation details.
-
- sources
- independent source
- Format: _name +node -node [dc value] [ac value] [tran_value]
- Examples: Vcc 10 0 15
- Icc 2 5 1ma
- vin 1 0 dc 0 ac 1 pulse(-0.5 0.5 20us 20us 20us 200us 400us)
-
- If the name starts with a V it is a voltage source and if it
- starts with an I it is a current source. The transient value
- may have the following values:
- PULSE(v1 v2 pulse_delay [rise_time fall_time pulse_width period])
- SIN(offset_voltage amplitude frequency [start_delay damping_coef])
- PWL(time_point1 volt_or_amp1 [t2 v_or_a2 ...])
-
- linear dependent sources
- Format: _name +nodeOut -nodeOUT +nodeIN -nodeIN value
- Examples: G1 10 0 5 0 15mmho
- E1 2 0 5 0 1e8
-
- If the name starts with a G, it is a voltage controlled
- current source. If the name starts with a E, it is a voltage
- controlled voltage source.
-
- Format: _name +nodeOut -nodeOUT vname value
- Examples: F1 1 2 vz 26
- H3 5 7 vy 345
-
- Vname is the name of a voltage source through which the
- controlling current flows. If the name starts with a F, it is
- a current controlled current source. If the name starts with
- a H, it is a current controlled voltage source.
-
- non-linear dependent sources (these sources are not spice2 compatible)
- Format: Bname +nodeOut -nodeOUT <I=expr> <V=expr>
- Examples: b1 1 0 i=cos(v(1))+sin(v(2))
- b2 5 3 v=log(v1))^2
-
- The name must start with the letter B. The values of the V
- and I parameters determine the voltages and currents across
- and through the device, respectively. Only one of these
- parameters must be given. The expressions given for V and I
- may be any function of voltages and currents through voltage
- sources in the system. The following functions of real
- variables are defined: abs asinh cosh sin
- acos atan exp sinh
- acosh atanh ln sqrt
- asin cos log tan
-
- The following operations are defined:
- + - * / ^ unary
-
- If the argument of log, ln or sqrt becomes less than zero, the
- absolute value of the argument is used. If a divisor becomes
- zero, an error will result. Other problems may arise where
- the partial derivative of a function is undefined.
-
- Parts that need MODELS:
-
- Some devices (or parts) that spice simulates require many parameter
- values. Since these devices may be used more than once in a circuit
- (with the same set of parameters), they have a set of "model"
- parameters that is defined on a separate model line with the format:
- .MODEL model_name type(parameters)
- Examples:
- .model mod1 npn (BF=50 IS=1e-13 VBF=50)
- .model dm1 d (is=2e-17)
- Among the model types used in Spice TR3e2bl are npn, pnp, d, njf, pjf,
- ltra and sw.
-
- NOTE: Although the model line is required for these parts, spice will
- use the default values for the unspecified parameter values.
- Please see some "real" spice documentation for the semiconductor
- default values.
-
- diodes (D)
- Format: Dname NodeA NodeC modname
- Example: d1 32 45 d1n4841
-
- The name must start with the letter D. NodeA is the anode and
- NodeC is the cathode.
-
- bipolar junction transistors (NPN, PNP)
- Format: Qname collector base emitter modname
- Examples: Q1 32 45 40 Q2N2222A
- q27 1 2 3 q2n2222a
-
- The name must start with the letter Q.
-
- junction FETs (NJF, PJF)
- Format: Jname drain gate source modname
- Example: J1 32 45 40 JN2
-
- The name must start with the letter J.
-
- Lossy Transmission Lines (LTRA)
-
- Format: Oname N1 N2 N3 N4 modname
- Example: o1 1 0 2 0 tran1
-
- The name must start with the letter O. N1 and N2 are the nodes
- at port one; N3 and N4 are the nodes at port two. Note: a
- lossy transmission line with zero loss may be more accurate
- than a lossless transmission line due to implementation details.
-
- MODEL parameters
- R resistance/length (default 0.0)
- L inductance/length (default 0.0)
- G conductance/length (default 0.0)
- C capacitance/length (default 0.0)
- LEN length of line required -> no default
- REL breakpoint control (default 1)
- ABS breakpoint control (default 1)
- NOSTEPLIMIT do not limit timestep to less than time delay (flag)
- NOCONTROL don't do complex timestep control (flag)
- LININTERP use linear interpolation (flag)
- MIXEDINTERP use linear when quadratic seems bad (flag)
- COMPACTREL special reltol for history compaction
- COMPACTABS special abstol for history compaction
- TRUNCNR use Newton-Raphson method for timestep control (flag)
- TRUNCDONTCUT don't limit timestep to keep impulse-response errors
- low (flag)
-
- Only the following types of lines have been implemented so far:
- RLC - uniform transmission line with series loss only
- RC - uniform RC line
- LC - lossless transmission line
- RG - distributed series resistance and parallel conductance
- Any other combination will yield erroneous results and should not be tried.
-
- Switches (SW)
- Format: Sname N+ N- NC+ NC- modname <on><off>
- Example: s1 2 5 3 0 sw1
-
- The name must start with the letter S (for a voltage
- controlled switch). Switches must always have a finite
- positive value. It is wise to set switch impedances only high
- and low enough to be negligible with respect to other circuit
- elements. Switches will not change state in AC analyses.
-
- MODEL parameters
- VT threshold voltage (default 0.0v)
- VH hysteresis (default 0.0v)
- RON on resistance (default 1 ohm)
- ROFF off resistance (default 1/GMIN ohm)
-
-
-
- ******************** Subcircuits **********************
-
- A subcircuit consists of spice elements and can be referenced in a
- fashion similar to device models. Spice will automatically insert the
- group of elements wherever the subcircuit is referenced.
-
- Format for subcircuit reference: xname node1 node2 <node...> subname
-
- The name must start with the letter X.
-
- Format for subcircuit: .subckt subname sub_node1 <sub_node...>
- parts sub_nodes...
- .ends
-
- The subcircuit must end with the line: ".ends <subname>"
- Ground (the 0 node) may be used in a subcircuit but can not
- be listed as an external node. Node references in a subcircuit
- are independent of (not the same node as) any node which may have
- the same name in either the main circuit or another
- subcircuit.
-
- ** example of a subcircuit **
- .subckt pienet 2 3
- c1 2 0 100p
- l1 2 3 10u
- c2 3 0 100p
- .ends pienet
- ** end of example **
-
-
-
- *************** Spice file commands *********************
-
- These commands are placed in the input files for use in the batch mode,
- or with the interactive "run" command.
-
- dc operating point
-
- Format: .op
- This command directs spice3 to include the dc operating
- information in the RAW output file.
-
- DC analysis
-
- Format: .dc source_name vstart vstop vincrement
-
- AC analysis
-
- Format: .ac dec nd fstart fstop
- dec is for the decade variation, oct or lin can be used instead
- for the octave or linear variation. nd is the number of points
- per decade, octave or absolute, depending on option chosen.
- At least one independent source must have been specified with
- an ac value for the analysis to be meaningful.
- NOTE: AC analysis is a linear small-signal analysis. No clipping
- of signals will take place.
-
- Transient analysis
-
- Format: .tran tstep tstop <tstart <tmax>>
- Transient analysis always start at time zero, if tstart is
- non-zero, the data between zero and tstart is not saved.
-
-
- ***************** other file commands **********************
-
- These commands are placed in the input files, all are used in the batch
- mode, some will not do anything in the interactive mode. Try it. If
- it works, it works.
-
- .NODESET V(node_number)=value V(node_number)=value ...
- This line may help spice find the DC or initial transient solution
- by making a preliminary pass with the specified nodes held to the
- given voltages. The restriction is then released and the iteration
- continues to the true solution. The .NODESET line may be necessary
- for convergence on bistable or astable circuits, but it should not
- otherwise be needed.
-
- .IC V(node_number)=value V(node_number)=value ...
- This line is for setting transient initial conditions. It has two
- different interpretations, depending on whether the UIC parameter
- is specified on the .TRAN line. The .IC line should not be confused
- with the .NODESET line -> the .NODESET line does not affect final
- bias solution (except for multi-stable circuits).
- If the UIC parameter is not specified on the .TRAN control line,
- the DC bias (initial transient) solution is computed before the
- transient analysis. In this case, the node voltages specified on
- the .IC control line is forced to the desired initial values during
- the bias solution. During transient analysis, the constraint on
- these node voltages is removed. This is the preferred method since
- it allows spice to compute a consistent DC solution.
- If the UIC parameter is specified on the .TRAN control line, the
- node voltages specified on the .IC control line are used to compute
- the capacitor, diode, BJT JFET, and MOSFET initial conditions. This
- is equivalent to specifying the IC=... parameter on each device
- line, but is more convenient. The IC=... parameter can still be
- specified and takes precedence over the .IC values. Since no DC
- bias (initial transient) solution is computed before the transient
- analysis, one should take care to specify all dc source voltages on
- the .IC control line if they are to be used to compute device
- initial conditions.
-
- .OPTIONS option1=value option2=value ...
- This line allows the user to reset program control and user options
- for specific simulation purposes. Any combination of the following
- options may be included, in any order. Below, 'x' represents some
- positive number.
-
- option effect
-
- GMIN=x the minimum conductance allowed (default 1.0e-12)
- RELTOL=x the relative error tolerance (default .001 -> 0.1
- percent)
- ABSTOL=x the absolute current error tolerance (default 1
- picoamp)
- VNTOL=x the absolute voltage error tolerance
- (default 1 microvolt)
- CHGTOL=x the charge tolerance (default 1.0e-14)
- TRTOL=x the transient error tolerance (default 7) This
- parameter is an estimate of the factor by which
- spice overestimates the actual truncation error.
- PIVTOL=x the absolute minimum value for a matrix entry to be
- accepted as a pivot (default 1.0e-13)
- PIVREL=x the relative ratio between the largest column entry
- and an acceptable pivot value (default 1.0e-3)
- TNOM=x the nominal temperature at which device parameters
- are measured (default 27 deg C)
- TEMP=x the operating temperature of the circuit (default
- 27 deg C)
- ITL1=x the DC iteration limit (default 100)
- ITL2=x the DC transfer curve iteration limit (default 50)
- ITL3 and ITL5 are not implemented in spice3
- ITL4=x the transient analysis timepoint iteration limit
- (default 10)
- METHOD=name sets the numerical integration method used by spice.
- possible names "Gear" or "trapezoidal" (or
- "trap") (default trap)
-
- .save [ node1 ] [ node2 ... ]
- Save a set of outputs, discarding the rest. Useful only in batch
- mode when a raw file format is used. If a node has been mentioned in
- a save command, it will appear in the raw file. If there are no
- save commands given, all outputs are saved. The save command must
- be given before an analysis command to have an affect.
-
- .print analysis_type output_var1 <output_var2 ... output_var8>
- .plot analysis_type output_var1 <output_var2 ... output_var8>
- These commands are ignored if a raw file is produced.
- Examples:
- .print ac vdb(1) db(out)
- .print tran v(2) i(vin)
- .plot tran out
-
- .four fundamental_frequency [ value ... ]
- This command is ignored if a raw file is produced. Does a fourier
- analysis of each of the given values, using the first 10 multiples
- of the fundamental frequency.
- Example:
- .four 10k out
-
- .include file_name
- Examples:
- .include d1n4148.mod
- .include ltc\lm301a
-
-
- ***************** interactive commands ******************
-
- This chapter describes the most important interactive commands
- available for use with Spice TR3e2. It must be remembered that Spice
- 3e2 was written for the Unix operating system. Not all of the
- "Berkeley" commands will work under DR(MS)-DOS. Commands that did not
- work, or were considered not useful, are not listed. Those who may
- disagree on my definition of "what is useful" are free to call Berkeley
- for the "real" documentation(??).
-
- Analysis Commands:
-
- Note: While commands, in general, are not case sensitive in input
- files, they ARE case sensitive in the interactive mode -> use
- lower case.
-
- op Do an operating point analysis.
-
- tran [ .tran card args ]
- Do a transient analysis.
-
- ac [ .ac card args ]
- Do an ac analysis.
-
- dc [ .dc card args ]
- Do a dc transfer curve analysis.
-
- Other Commands:
-
- alias [ word ] [ text ... ]
- Causes word to be aliased to text. History substitutions
- may be used, as in C-shell aliases.
-
- cd [ directory ]
- Change the current working directory to directory, or to
- the user's home directory if none is given.
-
- destroy [ plot_name ] [ all ]
- Throws away the data in the named plot. This can be
- necessary if a lot of large simulations are being done.
- Spice should warn the user if the size of the memory usage
- is approaching the maximum allowable size (within about 90%).
- It is advisable to run the rusage command occasionally if
- running out of space is a possibility, since Spice will crash
- if it does runs out of memory. If the argument to destroy is
- all, all plots except the constant plot will be thrown away
- (it is not possible to destroy the constant plot). If no
- argument is given the current plot is destroyed.
-
- display [ vector_name ... ]
- Prints a summary of currently defined vectors, or of the
- names specified. The vectors are sorted by name unless the
- variable nosort is set. The information given is the name of
- the vector, the length, the type of the vector, and whether
- it is real or complex data. Additionally, one vector will be
- labeled [scale]. When a command such as plot is given without
- a vs argument, this scale is used for the X-axis. It is
- always the first vector in a rawfile, or the first vector
- defined in a new plot. If you undefine the scale (i.e, let
- TIME = []), a random remaining vector will become the scale.
-
- edit [ file ]
- If a filename is given, then edit that file and (when done)
- load it (making the circuit the current one)- else edit the
- current SPICE3 deck. The default editor is "VI". The "set
- editor=XXX" command (in either spice or DOS) can be used to
- select a different editor.
-
- fourier fundamental_frequency [ value ... ]
- Does a fourier analysis of each of the given values, using
- the first 10 multiples of the fundamental frequency (or the
- first nfreqs, if that variable is set). The output is like
- that of the .four card. The values may be any valid
- expression. The values are interpolated onto a fixed-space
- grid with the number of points given by the fourgridsize
- variable, or 200 if it is not set. The interpolation will be
- of degree polydegree if that variable is set, or 1. If
- polydegree is 0, then no interpolation will be done. This is
- likely to give erroneous results if the time scale is not
- monotonic, though.
-
- hardcopy file plotargs
- Just like plot, except creates a file containing the plot.
- The default file format is postscript. Other available
- formants are not useful under DOS.
-
- history [ number ]
- Print out the history, or the last number commands typed at
- the keyboard. Historical substitution is possible, !!<CR>
- will repeat the last command, !1<CR> will repeat the first
- command given.
-
- linearize [ vec ... ]
- Create a new plot with all of the vectors in the current
- plot, or only those mentioned if arguments are given. The
- new vectors will be interpolated onto a linear time scale,
- which is determined by the values of tstep, tstart, and tstop
- in the currently active transient analysis. The currently
- loaded deck must include a transient analysis (a tran command
- may be run interactively before the last reset, alternately),
- and the current plot must be from this transient analysis.
- This command is needed because SPICE3 doesn't output the
- results from a transient analysis in the same manner that
- SPICE2 did.
-
- listing [ logical ] [ physical ] [ deck ] [ expand ]
- Print a listing of the current circuit. If the "logical"
- argument is given, the listing is with all continuation lines
- collapsed into one line, and if the "physical" argument is
- given the lines are printed out as they were found in the
- file. The default is logical. A deck listing is just like the
- physical listing, except without the line numbers it
- recreates the input file verbatim (except that it does not
- preserve case). If the word "expand" is present, the circuit
- will be printed with all subcircuits expanded.
-
- load [ filename ] ...
- Loads the raw data from the files named. The default
- filename is rawspice, or the argument to the -r flag
- if there was one.
-
- plot exprs [ samep ] [ ylimit ylo yhi ] [ xlimit xlo xhi ]
- [ xindices xilo xihi ] [ xcompress comp ] [ xdelta xdel ]
- [ ydelta ydel ] [ xlog ] [ ylog ] [ vs xname ] [ xlabel word ]
- [ ylabel word ]
- Plot the given exprs on the screen. If samep is given, the
- values of the other parameters (other than xname) from the
- previous plot, or hardcopy command will be used unless
- re-defined on the command line. The xlimit and ylimit
- arguments determine the high and low x- and y-limits of the
- axes, respectively. The xindices arguments determine what
- range of points are to be plotted - everything between the
- xilo'th point and the xihi'th point is plotted. The
- xcompress argument specifies that only one out of every comp
- points should be plotted. If an xdelta or a ydelta parameter
- is present, it specifies the spacing between grid lines on
- the X- and Y-axis. These parameter names may be abbreviated
- to xl, yl, xind, xcomp, xdel, and ydel respectively. The
- xname argument is an expression to use as the scale on the
- x-axis. If xlog or ylog are present, the X or Y scale
- respectively will be logarithmic. The xlabel and ylabel
- arguments cause the specified labels to be used for the X and
- Y axes, respectively.
-
- print [ col ] [ line ] expr ...
- Prints the vector described by the expression expr. If the
- col argument is present, print the vectors named side by
- side. If line is given, the vectors are printed horizontally.
- col is the default, unless all the vectors named have a
- length of one, in which case line is the default. The
- options width, length, and nobreak are effective for this
- command. If the expression is all, all of the vectors
- available are printed. The scale vector (time, frequency)
- will always be in the first column unless the variable
- noprintscale is true.
-
- quit
- Quit, return to DOS.
-
- rusage [ resource ... ]
- Print resource usage statistics. If any resources are given,
- just print the usage of that resource. Currently valid
- resources are:
-
- elapsed
- The amount of time elapsed since the last rusage
- elapsed call.
-
- space
- Data space used.
-
- time
- CPU time used so far.
-
- everything
- all
- All of the above, and more.
-
- resume
- Resume a simulation after a stop (a control C will stop a
- run).
-
- run [ rawfile ]
- Run the simulation as specified in the input file. If a
- rawfile is given, the data is written, it is also
- available interactively.
-
- save [ node1 ] [ node2 ... ]
- Save a set of outputs, discarding the rest. If a node has
- been mentioned in a save command, it will appear in the
- working plot after a run has completed. If there are no save
- commands given, all outputs are saved. The save command must
- be given before an analysis command to have an affect. To
- save the branch current through voltage source, add
- "source_name#branch" to the list of nodes.
-
- set [ variable ] [ variable = value ]
- Set the variable to value, if it is present. If no value is
- given then the value is the boolean 'true'. You can set a
- variable to be any value (numeric or string). If a variable
- is set to a list of values that are enclosed in parentheses
- (which must be separated from their values by white space),
- the value of the variable is that list.
-
- Variables for Spice TR3e2:
-
- abstol The absolute tolerance used by the diff command.
-
- appendwrite
- Append to the file when a write command is issued,
- if one already exists.
-
- combplot
- Plot vectors by drawing a vertical line from each
- point to the X-axis, as opposed to joining the
- points. Note that this option is subsumed in the
- plottype option, below.
-
- editor The editor to use for the edit command.
-
- fourgridsize
- How many points to use for interpolating into when
- doing fourier analysis.
-
- gridsize
- If this variable is set to an integer, this number
- will be used as the number of equally spaced
- points to use for the Y-axis when plotting.
- Otherwise the current scale will be used (which
- may not have equally spaced points). If the
- current scale isn't strictly monotonic, then this
- option will have no effect.
-
- height The length of the page for print col.
-
- history
- The number of events to save in the history list.
-
- nfreqs The number of frequencies to compute in the
- fourier command. (Defaults to 10.)
-
- noaskquit
- Do not check to make sure that there are no
- circuits suspended and no plots unsaved. Normally
- SPICE3 will warn the user when he tries to quit if
- this is the case.
-
- nobjthack
- Assume that BJT's have 4 nodes.
-
- nobreak
- Don't have print col break between pages.
-
- noclobber
- Don't overwrite existing files when doing IO
- redirection.
-
- nogrid Don't plot a grid when graphing curves (but
- do label the axes).
-
- nomoremode
- If nomoremode is not set, whenever a large amount
- of data is being printed to the screen (e.g, the
- print or display commands), the output will be
- stopped every screenful and will continue when a
- carriage return is typed. If nomoremode is set
- then data will scroll off the screen without
- hesitation.
-
- noprintscale
- Don't print the scale in the leftmost column when
- a print col command is given.
-
- nosort Don't have display sort the variable names.
-
- numdgt
- The number of digits to print when printing tables
- of data (fourier, print col). The default
- precision is 6 digits. Approximately 16 decimal
- digits are available, so numdgt should not be more
- than 16. If the number is negative, one fewer
- digit is printed to ensure constant widths in
- tables.
-
- polydegree
- The degree of the polynomial that the plot command
- should fit to the data. If polydegree is N, then
- nutmeg will fit a degree N polynomial to every set
- of N points and draw 10 intermediate points in
- between each end point. If the points aren't
- monotonic, then it will try rotating the curve and
- reducing the degree until a fit is achieved.
-
- polysteps
- The number of points to interpolate between every
- pair of points available when doing curve fitting.
- The default is 10. (This should really be done
- automatically.)
-
- prompt The prompt, with the character `!' replaced by
- the current event number.
-
- rawfile
- The default name for rawfiles created.
-
- rawfileprec
- The number of digits to use in the ascii rawfile
- format. The default is 15.
-
- reltol The relative tolerance used by the diff command.
-
- sourcepath
- A list of the directories to search when a source
- command is given. The default is the current
- directory and the SPICE_PATH\scripts.
-
- units If this is degrees, then all the trig functions
- will use degrees instead of radians.
-
- unixcom
- When this variable is set, Spice will try to
- "shell" any non-spice command.
-
- vntol The absolute voltage tolerance used by the
- diff command.
-
- width The width of the page for print col.
-
- setcirc [ circuit name ]
- Change the current circuit. The current circuit is the one
- that is used for the simulation commands below. When a
- circuit is loaded with the "source" command (see below) it
- becomes the current circuit.
-
- setplot [ plotname ]
- Set the current plot to the plot with the given name, or if
- no name is given, prompt the user with a menu. (Note that
- the plots are named as they are loaded, with names like tran1
- or op2. These names are shown by the setplot and display
- commands and are used by diff, below.) If the "New plot" item
- is selected, the current plot will become one with no vectors
- defined. Note that here the word "plot" refers to a group of
- vectors that are the result of one SPICE run. When more than
- one file is loaded in, or more than one plot is present in
- one file, they are keep separate and only the vectors in the
- current plot can be plotted.
-
- shell [ args ... ]
- Fork a shell, or execute the arguments as a command to DOS.
- If the "set unixcom" command is used (as it is in the default
- spice.rc file), Spice will try to "shell" any non-spice
- command that it can not "source".
-
- show device
- Show a device's parameters.
-
- source file
- Read the Spice input file file. Interactive Spice commands
- may be included in the file, but they must be enclosed
- between the lines ".control" and ".endc" (the file
- "spice.rc" which is read on startup does not need these two
- lines). These commands are executed immediately after the
- circuit is loaded. Spice3 command scripts, other than
- spice.rc, must begin with a blank or title line. Also, any
- line beginning with the characters "*#" will be executed as a
- command.
-
- The use of this command is some what unnecessary, since Spice
- will try to "source" any non-spice command.
-
- unalias [ word ... ]
- Removes any aliases present for the words.
-
- unset [ word ] ...
- Unset the variables word.
-
- version [ version_id ]
- displays the version of Spice that is running. If there are
- arguments, it checks to make sure that the arguments match
- the current version of Spice. This is mainly used as a
- command line in rawfiles.
-
- where
- Gives the name of the last node or device to cause
- non-convergence (for transient and operating point analysis).
- Note: only one node or device is printed- there may be more
- than one problem.
-
- write [ file ] [ exprs ... ]
- Writes the expr's to file. First vectors are grouped together
- by plots, and written out as such. Additionally, if the
- scale for a vector isn't present, it is automatically written
- out as well. The default filename is rawspice.raw, or the
- argument to the -r flag on the command line, if there was
- one, and the default expression list is all.