The .WIDTH Card
The .OPTIONS Cards
The .OP Card Operating Point Analysis
The .DC Card
The .NODESET Card
The .IC Card Initial Conditions
The .TF Card The transfer function for small-signal DC analysis
The .SENS Card
The .AC Card
The .DISTO Card Distortion Analysis
The .NOISE Card
The .TRAN Card Transient Analysis
The .FOUR Card Fourier Analysis
The .PRINT Card
The .PLOT Card
General form:
.WIDTH IN=COLNUM OUT=COLNUM
Examples:
.WIDTH IN=72 OUT=133
COLNUM is the last column read from each line of input; the setting takes effect with the next line read. The default value for COLNUM is 80. The out parameter specifies the output print width. Permissible values for the output print width are 80 and 133.
General form:
.OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...)
Examples:
.OPTIONS ACCT LIST NODE
This card 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. 'x' (below) represents some positive number.
The various options are :
ACCT causes accounting and run time statistics to be printed
LIST auses the summary listing of the input data to be printed
NOMOD suppresses the printout of the model parameters.
NOPAGE suppresses page ejects
NODE causes the printing of the node table.
OPTS causes the option values to be printed.
GMIN=x resets the value of GMIN, the minimum conductance allowed by the program. The default value is 1.0E-12.
RELTOL=x resets the relative error tolerance of the program. The default value is 0.001 (0.1 percent).
ABSTOL=x resets the absolute current error tolerance of the program. The default value is 1 picoamp.
VNTOL=x resets the absolute voltage error tolerance of the program. The default value is 1 microvolt.
TRTOL=x resets the transient error tolerance. The default value is 7.0. This parameter is an estimate of the factor by which SPICE overestimates the actual truncation error.
CHGTOL=x resets the charge tolerance of the program. The default value is 1.0E-14.
PIVTOL=x resets the absolute minimum value for a matrix entry to be accepted as a pivot. The default value is 1.0E-13.
PIVREL=x resets the relative ratio between the largest column entry and an acceptable pivot value. The default value is 1.0E-3.
In the numerical pivoting algorithm the allowed minimum pivot value is determined by:
EPSREL=AMAX1(PIVREL*MAXVAL,PIVTOL)
where MAXVAL is the maximum element in the column where a pivot is sought (partial pivoting).
NUMDGT=x resets the number of significant digits printed for output variable values. X must satisfy the relation 0 < x < 8. The default value is 4.
Note: this option is independent of the error tolerance used by SPICE (i.e., if the values of options RELTOL, ABSTOL, etc., are not changed then one may be printing numerical 'noise' for NUMDGT > 4.
TNOM=x resets the nominal temperature. The default value is 27 deg C (300 deg K).
ITL1=x resets the dc iteration limit. The default is 100.
ITL2=x resets the dc transfer curve iteration limit. The default is 50.
ITL3=x resets the lower transient analysis iteration limit. the default value is 4.
ITL4=x resets the transient analysis timepoint iteration limit.The default is 10.
ITL5=x resets the transient analysis total iteration limit. the default is 5000. Set ITL5=0 to omit this test.
ITL6=x resets the dc iteration limit at each step of the source stepping method. The default is 0 which means not to use this method.
CPTIME=xthe maximum cpu-time in seconds allowed for this job.
LIMTIM=x resets the amount of cpu time reserved by SPICE for generating plots should a cpu time-limit cause job termination. The default value is 2 (seconds).
LIMPTS=x resets the total number of points that can be printed or plotted in a dc, ac, or transient analysis. The default value is 201.
LVLCOD=x if x is 2 (two), then machine code for the matrix solution will be generated. Otherwise, no machine code is generated. The default value is 2. Applies only to CDC computers.
LVLTIM=x if x is 1 (one), the iteration timestep control is used. if x is 2 (two), the truncation-error timestep is used. The default value is 2. If method=Gear and MAXORD>2 then LVLTIM is set to 2 by SPICE.
METHOD=name sets the numerical integration method used by SPICE. Possible names are Gear or trapezoidal. The default is trapezoidal.
MAXORD=x sets the maximum order for the integration method if Gear's variable-order method is used. X must be between 2 and 6. The default value is 2.
DEFL=x resets the value for MOS channel length; the default is 100.0 micrometer.
DEFW=x resets the value for MOS channel width; the default is 100.0 micrometer.
DEFAD=x resets the value for MOS drain diffusion area; the default is 0.0.
DEFAS=x resets the value for MOS source diffusion area; the default is 0.0.
General form:
.OP
The inclusion of this card in an input deck will force SPICE to determine the dc operating point of the circuit with inductors shorted and capacitors opened. Note: a dc analysis is automati- cally performed prior to a transient analysis to determine the transient initial conditions, and prior to an ac small-signal analysis to determine the linearized, small-signal models for nonlinear devices.
SPICE performs a dc operating point analysis if no other analyses are requested.
General form:
.DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2]
Examples:
.DC VIN 0.25 5.0 0.25
.DC VDS 0 10 .5 VGS 0 5 1
.DC VCE 0 10 .25 IB 0 10U 1U
This card defines the dc transfer curve source and sweep limits. SRCNAM is the name of an independent voltage or current source. VSTART, VSTOP, and VINCR are the starting, final, and incrementing values respectively. The first example will cause the value of the voltage source VIN to be swept from 0.25 Volts to 5.0 Volts in increments of 0.25 Volts. A second source (SRC2) may optionally be specified with associated sweep parameters. In this case, the first source will be swept over its range for each value of the second source. This option can be useful for obtaining semiconductor device output characteristics. See the second example data deck in that section of the guide.
General form:
.NODESET V(NODNUM)=VAL V(NODNUM)=VAL ...
Examples:
.NODESET V(12)=4.5 V(4)=2.23
This card helps the program 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 card may be necessary for convergence on bistable or astable circuits. In general, this card should not be necessary.
General form:
.IC V(NODNUM)=VAL V(NODNUM)=VAL ...
Examples:
.IC V(11)=5 V(4)=-5 V(2)=2.2
This card is for setting transient initial conditions. It has two different interpretations, depending on whether the UIC parameter is specified on the .TRAN card. Also, one should not confuse this card with the .NODESET card. The .NODESET card is only to help dc convergence, and does not affect final bias solu tion (except for multi-stable circuits). The two interpretations of this card are as follows:
General form:
.TF OUTVAR INSRC
Examples:
.TF V(5,3) VIN
.TF I(VLOAD) VIN
This card defines the small-signal output and input for the dc small- signal analysis. OUTVAR is the small-signal output variable and INSRC is the small-signal input source. If this card is included, SPICE will compute the dc small-signal value of the transfer function (output/input), input resistance, and out- put resistance. For the first example, SPICE would compute the ratio of V(5,3) to VIN, the small-signal input resistance at VIN, and the small-signal output resistance measured across nodes 5 and 3.
General form:
.SENS OV1 < OV2 ... >
Examples:
.SENS V(9) V(4,3) V(17) I(VCC)
If a .SENS card is included in the input deck, SPICE will
determine the dc small-signal sensitivities of each specified
output variable with respect to every circuit parameter.
Note: for large circuits, large amounts of output can be generated.
General form:
.AC DEC ND FSTART FSTOP
.AC OCT NO FSTART FSTOP
.AC LIN NP FSTART FSTOP
Examples:
.AC DEC 10 1 10K
.AC DEC 10 1K 100MEG
.AC LIN 100 1 100HZ
DEC stands for decade variation, and ND is the number of
points per decade.
OCT stands for octave variation, and NO is the number of points per octave.
LIN stands for linear variation, and NP is the number of points.
FSTART is the starting frequency, and FSTOP is the final frequency.
If this card is included in the deck, SPICE will perform an ac analysis of the circuit over the specified frequency range. Note that in order for this analysis to be meaningful, at least one independent source must have been specified with an ac value.
General form:
.DISTO RLOAD < INTER < SKW2 < REFPWR < SPW2 > > > >
Examples:
.DISTO RL 2 0.95 1.0E-3 0.75
This card controls whether SPICE will compute the distortion characteristic of the circuit in a small-signal mode as a part of the ac small-signal sinusoidal steady-state analysis. The analysis is performed assuming that one or two signal frequencies are imposed at the input; let the two frequencies be f1 (the nominal analysis frequency) and f2 (=SKW2*f1). The program then computes the following distortion measures:
RLOAD is the name of the output load resistor into which all
distortion power products are to be computed.
INTER is the interval at which the summary printout of the contributions of all nonlinear devices to the total distortion is to be printed.If omitted or set to zero, no summary printout will be made.
REFPWR is the reference power level used in computing the distortion products; if omitted, a value of 1 mW (that is, dbm) is used.
SKW2 is the ratio of f2 to f1. If omitted, a value of 0.9
is used (i.e., f2 = 0.9*f1).
SPW2 is the amplitude of f2. If omitted, a value of 1.0 is assumed.
The distortion measures HD2, HD3, SIM2, DIM2, and DIM3 may also be be printed and/or plotted (see the description of the .PRINT and .PLOT cards).
General form:
.NOISE OUTV INSRC NUMS
Examples:
.NOISE V(5) VIN 10
This card controls the noise analysis of the circuit. The
noise analysis is performed in conjunction with the ac analysis
(see .AC card).
OUTV is an output voltage which defines the summing point.
INSRC is the name of the independent voltage or current source which is the noise input reference.
NUMS is the summary interval. SPICE will compute the equivalent output noise at the specified output as well as the equivalent input noise at the specified input. In addition, the contributions of every noise generator in the circuit will be printed at every NUMS frequency points (the summary interval). If NUMS is zero, no summary printout will be made.
The output noise and the equivalent input noise may also be printed and/or plotted (see the description of the .PRINT and .PLOT cards).
General form:
.TRAN TSTEP TSTOP < TSTART < TMAX > > < UIC >
Examples:
.TRAN 1NS 100NS
.TRAN 1NS 1000NS 500NS
.TRAN 10NS 1US UIC
TSTEP is the printing or plotting increment for line-printer
output. For use with the post-processor, TSTEP is the suggested
computing increment.
TSTOP is the final time
TSTART is the initial time. If TSTART is omitted, it is assumed to be zero.
The transient analysis always begins at time zero. In the inter- val < zero, TSTART >, the circuit is analyzed (to reach a steady state), but no outputs are stored. In the interval < TSTART,TSTOP > , the circuit is analyzed and outputs are stored.
TMAX is the maximum stepsize that SPICE will use (for default, the program chooses either TSTEP or (TSTOP-TSTART)/50.0, whichever is smaller. TMAX is useful when one wishes to guarantee a computing interval which is smaller than the printer increment, TSTEP.
UIC (use initial conditions) is an optional keyword which indicates that the user does not want SPICE to solve for the quiescent operating point before beginning the transient analysis. If this keyword is specified, SPICE uses the values specified using IC=... on the various elements as the initial transient condition and proceeds with the analysis. If the .IC card has been specified, then the node voltages on the .IC card are used to compute the intitial conditions for the devices. Look at the description on the .IC card for its interpretation when UIC is not specified.
General form:
.FOUR FREQ OV1 < OV2 OV3 ... >
Examples:
.FOUR 100K V(5)
This card controls whether SPICE performs a Fourier analysis as a part of the transient analysis. FREQ is the fundamental frequency, and OV1, ..., are the output variables for which the analysis is desired. The Fourier analysis is performed over the interval < TSTOP-period, TSTOP >, where TSTOP is the final time specified for the transient analysis, and period is one period of the fundamental frequency. The dc component and the first nine components are determined. For maximum accuracy, TMAX (see the .TRAN card) should be set to period/100.0 (or less for very high-Q circuits).
General form:
.PRINT PRTYPE OV1 < OV2 ... OV8 >
Examples:
.PRINT TRAN V(4) I(VIN)
.PRINT AC VM(4,2) VR(7) VP(8,3)
.PRINT DC V(2) I(VSRC) V(23,17)
.PRINT NOISE INOISE
.PRINT DISTO HD3 SIM2(DB)
This card defines the contents of a tabular listing of one to eight output variables. PRTYPE is the type of the analysis (DC, AC, TRAN, NOISE, or DISTO) for which the specified outputs are desired. The form for voltage or current output variables is as follows:
V(N1< ,N2 >) specifies the voltage difference between nodes N1 and N2. If N2 (and the preceding comma) is omitted, ground (0) is assumed. For the ac analysis, five additional outputs can be accessed by replacing the letter V by:
VR - real part
VI - imaginary part
VM - magnitude
VP - phase
VDB - 20*log10(magnitude)
I(VXXXXXXX) specifies the current flowing in the independent vol- tage source named VXXXXXXX. Positive current flows from the positive node, through the source, to the negative node. For the ac analysis, the corresponding replacements for the letter I may be made in the same way as described for voltage outputs.
Output variables for the noise and distortion analyses have
a different general form from that of the other analyses, i.e.
OV<(X)>
where OV is any of ONOISE (output noise), INOISE (equivalent
input noise), D2, HD3, SIM2, DIM2, or DIM3 (see description of
distortion analysis), and X may be any of:
R - real part
I - imaginary part
M - magnitude (default if nothing specified)
P - phase
DB - 20*log10(magnitude)
thus, SIM2 (or SIM2(M)) describes the magnitude of the SIM2 dis- tortion measure, while HD2(R) describes the real part of the HD2 distortion measure.
There is no limit on the number of .PRINT cards for each type of analysis.
General form:
.PLOT PLTYPE OV1 < (PLO1,PHI1) > < OV2 < (PLO2,PHI2) > ... OV8 >
Examples:
.PLOT DC V(4) V(5) V(1)
.PLOT TRAN V(17,5) (2,5) I(VIN) V(17) (1,9)
.PLOT AC VM(5) VM(31,24) VDB(5) VP(5)
.PLOT DISTO HD2 HD3(R) SIM2
.PLOT TRAN V(5,3) V(4) (0,5) V(7) (0,10)
This card defines the contents of one plot of from one to eight output variables. PLTYPE is the type of analysis (DC, AC, TRAN, NOISE, or DISTO) for which the specified outputs are desired. The syntax for the OVI is identical to that for the .PRINT card, described above.
The optional plot limits (PLO,PHI) may be specified after any of the output variables. All output variables to the left of a pair of plot limits (PLO,PHI) will be plotted using the same lower and upper plot bounds. If plot limits are not specified, SPICE will automatically determine the minimum and maximum values of all output variables being plotted and scale the plot to fit. More than one scale will be used if the output variable values warrant (i.e., mixing output variables with values which are orders-of-magnitude different still gives readable plots).
The overlap of two or more traces on any plot is indicated by the letter X.
When more than one output variable appears on the same plot, the first variable specified will be printed as well as plotted. If a printout of all variables is desired, then a companion .PRINT card should be included.
There is no limit on the number of .PLOT cards specified for each type of analysis.