Batch output
.SAVE Lines
General form
.SAVE vector vector vector ...
Examples
.SAVE i(vin) input output .SAVE @m1[id]
The vectors listed on the .SAVE line are recorded in the rawfile for use later with Spice3f5 (see the load command). The standard vector names are accepted. If no .SAVE line is given, then the default set of vectors are saved (node voltages and voltage source branch currents). If .SAVE lines are given, only those vectors specified are saved. For more discussion on internal device data, see Appendix B. See also the section on the interactive command interpretor for information on how to use the rawfile.
.PRINT Lines
General form
.PRINT PRTYPE OV1 <OV2 ... OV8>
Examples
.PRINT TRAN V(4) I(VIN) .PRINT DC V(2) I(VSRC) V(23, 17) .PRINT AC VM(4, 2) VR(7) VP(8, 3)
The Print line 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 the same as given in the previous section for the print command; Spice2 restricts the output variable to the following forms (though this restriction is not enforced by Spice3):
V(N1<,N2>)- specifies the voltage difference between nodes N1 and N2. If N2 (and the preceding comma) is omitted, ground (0) is assumed. See the print command in the previous section for more details. For compatibility with spice2, the following five additional values can be accessed for the ac analysis by replacing the "V" in V(N1,N2) with:
VR - real part VI - imaginary part VM - magnitude VP - phase VDB - 20 log10(magnitude)
I(VXXXXXXX)- specifies the current flowing in the independent voltage 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.
There is no limit on the number of .PRINT lines for each type of analysis.
.PLOT Lines
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)
The Plot line 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 line and for the plot command in the interactive mode.
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 is printed as well as plotted. If a printout of all variables is desired, then a companion .PRINT line should be included.
There is no limit on the number of .PLOT lines specified for each type of analysis.
.FOUR: Fourier Analysis of Transient Analysis Output
General form
.FOUR FREQ OV1 <OV2 OV3 ...>
Examples
.FOUR 100K V(5)
The Four (or Fourier) line controls whether SPICE performs a Fourier analysis as a part of the transient analysis. FREQ is the fundamental frequency, and OV1, 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 harmonics are determined. For maximum accuracy, TMAX (see the .TRAN line) should be set to period/100.0 (or less for very high-Q circuits).