The following section describes the statements used to display simulation results for your specific requirements.
The .PRINT statement specifies output variables for which values are printed.
The maximum number of variables in a single .PRINT statement is 32. You can use additional .PRINT statements for more output variables.
To simplify parsing of the output listings, a single "x" printed in the first column indicates the beginning of the .PRINT output data, and a single "y" in the first column indicates the end of the .PRINT output data.
.PRINT antype ov1 <ov2 ... ov32>
Star-Hspice produces different .sw0 and .tr0 files based on the order of the .print and .dc statements. If no analysis type is given for a .print command, then the analysis type will match the last analysis command found in the netlist before the .print. See examples below.
.print TRAN v(din) i(mnx)
then all 3 cases have identical .sw0 and .tr0 files.
.print DC v(din) i(mnx)
then the .sw0 and .tr0 files will be different.
.PRINT TRAN V(4) I(VIN) PAR(`V(OUT)/V(IN)')
This example prints out the results of a transient analysis for the nodal voltage named 4 and the current through the voltage source named VIN. The ratio of the nodal voltage at node "OUT" and node "IN" is also printed.
.PRINT AC VM(4,2) VR(7) VP(8,3) II(R1)
VM(4,2) specifies that the AC magnitude of the voltage difference (or the difference of the voltage magnitudes, depending on the value of the ACOUT option) between nodes 4 and 2 is printed. VR(7) specifies that the real part of the AC voltage between nodes 7 and ground is printed. VP(8,3) specifies that the phase of the voltage difference between nodes 8 and 3 (or the difference of the phase of voltage at node 8 and voltage at node 3 depending on the value of ACOUT options) is printed. II(R1) specifies that the imaginary part of the current through R1 is printed.
.PRINT AC ZIN YOUT(P) S11(DB) S12(M) Z11(R)
The above example specifies that the magnitude of the input impedance, the phase of the output admittance, and several S and Z parameters are to be printed. This statement would accompany a network analysis using the .AC and .NET analysis statements.
.PRINT DC V(2) I(VSRC) V(23,17) I1(R1) I1(M1)
This example specifies that the DC analysis results are to be printed for several different nodal voltages and currents through the resistor named R1, the voltage source named VSRC, and the drain-to-source current of the MOSFET
named M1.
In this example, the equivalent input noise is printed.
This example prints the magnitude of the third-order harmonic distortion and the decibel value of the intermodulation distortion sum through the load resistor specified in the .DISTO statement.
.PRINT AC INOISE ONOISE VM(OUT) HD3
In this statement, specifications of NOISE, DISTO, and AC output variables are included on the same .PRINT statement.
.PRINT pj1 = par(`p(rd) +p(rs)`)
This statement prints the value of pj1 with the specified function.
The .PLOT statement plots output values of one or more variables in a selected analysis. Each .PLOT statement defines the contents of one plot, which can have 1 to 32 output variables.
When no plot limits are specified, Star-Hspice automatically determines the minimum and maximum values of each output variable being plotted and scales each plot to fit common limits. To cause Star-Hspice to set limits for certain variables, set the plot limits to (0,0) for those variables.
To make Star-Hspice find plot limits for each plot individually, select .OPTION PLIM to create a different axis for each plot variable. The PLIM option is similar to the plot limit algorithm in SPICE2G.6. In the latter case, each plot can have limits different from any other plot. The overlap of two or more traces on a plot is indicated by a number from 2 through 9.
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 more than one variable is desired, include another .PLOT statement.
The number of .PLOT statements you can specify for each type of analysis is unlimited. Plot width is set by the option CO (columns out). For a CO setting of 80, a 50-column plot is produced. If CO is 132, a 100-column plot is produced.
.PLOT antype ov1 <(plo1,phi1)> ... <ov32>
+ <(plo32,phi32)>
In the following example, PAR invokes the plot of the ratio of the collector current and the base current of the transistor Q1.
.PLOT DC V(4) V(5) V(1) PAR(`I1(Q1)/I2(Q1)')
.PLOT TRAN V(17,5) (2,5) I(VIN) V(17) (1,9)
.PLOT AC VM(5) VM(31,24) VDB(5) VP(5) INOISE
The second of the two examples above uses the VDB output variable to plot the AC analysis results of the node named 5 in decibels. Also, NOISE results may be requested along with the other variables in the AC plot.
.PLOT AC ZIN YOUT(P) S11(DB) S12(M) Z11(R)
.PLOT TRAN V(5,3) V(4) (0,5) V(7) (0,10)
.PLOT DC V(1) V(2) (0,0) V(3) V(4) (0,5)
In the last example above, Star-Hspice sets the plot limits for V(1) and V(2), while 0 and 5 volts are specified as the plot limits for V(3) and V(4).
The .PROBE statement saves output variables into the interface and graph data files. Star-Hspice usually saves all voltages and supply currents in addition to the output variables. Set .OPTION PROBE to save output variables only. Use the .PROBE statement to specify which quantities are to be printed in the output listing.
If you are only interested in the output data file and do not want tabular or plot data in your listing file, set .OPTION PROBE and use the .PROBE statement to specify which values you want saved in the output listing.
.PROBE DC V(4) V(5) V(1) beta = PAR(`I1(Q1)/I2(Q1)')
The .GRAPH statement allows high resolution plotting of simulation results. This statement is similar to the .PLOT statement with the addition of an optional model. When a model is specified, you can add or change graphing properties for the graph. The .GRAPH statement generates a .gr# graph data file and sends this file directly to the default high resolution graphical device (specified by PRTDEFAULT in the meta.cfg configuration file).
Each .GRAPH statement creates a new .gr# file, where # ranges first from 0 to 9, and then from a to z. The maximum number of graph files that can exist is 36. If more than 36 .GRAPH statements are used, the graph files are overwritten starting with the .gr0 file. To overcome this limitation, the option ALT999 or ALT9999 should be used to extend the number of digits allowed in the file name extension to .gr### or .gr#### (in this case # ranges from 0 to 9).
.GRAPH antype <MODEL = mname> <unam1 = > ov1,
+ <unam2 = >ov2, ... <unam32 = > ov32 (plo,phi)
This section describes the model statement for .GRAPH.
.MODEL mname PLOT (pnam1 = val1 pnam2 = val2....)
.GRAPH DC cgb = lx18(m1) cgd = lx19(m1) cgs = lx20(m1)
.GRAPH DC MODEL = plotbjt
+ model_ib = i2(q1) meas_ib = par(ib)
+ model_ic = i1(q1) meas_ic = par(ic)
+ model_beta = par('i1(q1)/i2(q1)')
+ meas_beta = par('par(ic)/par(ib)')(1e-10,1e-1)
.MODEL plotbjt PLOT MONO = 1 YSCAL = 2 XSCAL = 2 XMIN = 1e-8 + XMAX = 1e-1
The number of output variables printed on a single line of output is a function of the number of columns, set by the option CO. Typical values are CO = 80 for narrow printouts and CO = 132 for wide printouts. CO = 80 is the default. The maximum number of output variables allowed is 5 per 80-column output and 8 per 132-column output with twelve characters per column. Star-Hspice automatically creates additional print statements and tables for all output variables beyond the number specified by the CO option.
where OUT is the output print width
.WIDTH OUT = 132 $ SPICE compatible style
.OPTION CO = 132 $ preferred style
Permissible values for OUT are 80 and 132. OUT can also be set with option CO.
The output files for postprocessor (from .OPTION POST) or .GRAPH statements have unique extensions .xx#, where xx is a 2-character text string to denote the output type (see Specifying Simulation Output for more information), and # is an alphanumeric character that denotes the .ALTER number of the current simulation. This limits the total number of .ALTER statements in a netlist to 36 before the outputs begin overwriting the current files.
The options ALT999 and ALT9999 extend the output file name extension syntax to .xx### and .xx####, respectively, where # now represents a numerical character only. This syntax allows for 1000 and 10,000 .ALTERs in the input netlist while maintaining a unique file name for the output files.
Variable values are printed in engineering notation by default:
F = 1e-15 M = 1e-3
P = 1e-12 K = 1e3
N = 1e-9 X = 1e6
U = 1e-6 G = 1e9
In contrast to the exponential format, the engineering notation provides two to three extra significant digits and aligns columns to facilitate comparison. To obtain output in exponential format, specify INGOLD = 1 or 2 with an .OPTION statement.
Use an .OPTION POST statement to use AvanWaves to display high resolution plots of simulation results on a graphics terminal or a high resolution laser printer. Use the .OPTION POST to provide output without specifying other parameters. POST has defaults that supply most parameters with usable data.
A detailed accounting report is generated using the ACCT option, where:
The following output appears at the end of the output listing.
****** job statistics summary tnom = 25.000 temp = 25.000
# nodes = 15 # elements = 29 # real*8 mem avail/used = 333333/ 13454
# diodes = 0 # bjts = 0 # jfets = 0 # mosfets = 24
analysis time # points tot. iter conv.iter
op point 0.24 1 11
transient 5.45 161 265 103 rev = 1
pass1 0.08
readin 0.12
errchk 0.05
setup 0.04
output 0.00
the following time statistics are already included in the analysis time
load 5.22
solver 0.16
# external nodes = 15 # internal nodes = 0
# branch currents = 5 total matrix size = 20
pivot based and non pivotting solution times
non pivotting: ---- decompose 0.08 solve 0.08
matrix size( 109) = initial size( 105) + fill( 4)
words copied = 111124
total cpu time 6.02 seconds
job started at 11:54:11 21-sep92
job ended at 11:54:36 21-sep92
The definitions for the items in the previous listing follow:
The ratio of TOT.ITER to CONV.ITER is the best measure of simulator efficiency. The theoretical ratio is 2:1. In this example the ratio was 2.57:1. SPICE generally has a ratio of 3:1 to 7:1.
In transient, the ratio of CONV.ITER to # POINTS is the measure of the number of points evaluated to the number of points printed. If this ratio is greater than about 4, the convergence and time step control tolerances might be too tight for the simulation.
A simulation that has a large number of .ALTER statements might fail due to the limit on the number of file descriptors. For example, for a Sun workstation, the default number of file descriptors is 64, and a design with more than 50 .ALTER statements is liable to fail with the following error message:
error could not open output spool file /tmp/tmp.nnn
a critical system resource is inaccessible or exhausted
To prevent this on a Sun workstation, enter the following operating system command before you start the simulation:
For platforms other than Sun workstations, see your system administrator for help with increasing the number of files you can open concurrently.
The following examples demonstrate how to print or plot voltages of nodes in subcircuit definitions using .PRINT, .PLOT, .PROBE or .GRAPH.
.PRINT v(B) v(N1) $ Print statement 1
M1 N1 A vdd vdd pch w = 6u l = 0.8u
M2 Y B N1 vdd pch w = 6u l = 0.8u
M3 Y A vss vss nch w = 3u l = 0.8u
M4 Y B vss vss nch w = 3u l = 0.8u
Print statement 1 invokes a printout of the voltage on input node B and internal node N1 for every instance of the nor2 subcircuit.
.PRINT v(1) v(X1.A) $ Print statement 2
The print statement above specifies two ways of printing the voltage on input A of instance X1.
.PRINT v(3) v(X1.Y) v(X2.A) $ Print statement 3
This print statement specifies three different ways of printing the voltage at output Y of instance X1. (input A of instance X2).
.PRINT v(X2.N1) $ Print statement 4
The print statement above prints out the voltage on the internal node N1 of instance X2.
.PRINT i(X1.M1) $ Print statement 5
The print statement above prints out the drain-to-source current through MOSFET M1 in instance X1.
.PRINT V(X1.25) V(X1.X2.56) V(6)
The .PRINT statement voltages are:
This example prints analysis results for the voltage at node 56 within the sub-circuits X2 and X1. The full path name X1.X2.56 specifies that node 56 is within subcircuit X2 that is within subcircuit X1.
Star-Hspice Manual - Release 2001.2 - June 2001