Selecting Simulation Output Parameters

This section discusses how to define specific parameters so that the simulation provides the appropriate output. Define simulation parameters using the .OPTION and .MEASURE statements and specific variable element definitions.

DC and Transient Output Variables

Some types of output variables for DC and transient analyses are:

The codes that you can use to specify the element templates for output are summarized in Print Control Options.

Nodal Voltage

Syntax

V (n1<,n2>)

 

n1, n2

Defines the nodes between which the voltage difference (n1-n2) is to be printed or plotted. When n2 is omitted, the voltage difference between n1 and ground (node 0) is given.

Current: Voltage Sources

Syntax

I (Vxxx)

 

where:

 

Vxxx

Voltage source element name. If an independent power supply is within a subcircuit, its current output is accessed by appending a dot and the subcircuit name to the element name, for example, I(X1.Vxxx).

Example

.PLOT TRAN I(VIN)

.PRINT DC I(X1.VSRC)

.PLOT DC I(XSUB.XSUBSUB.VY)

Current: Element Branches

Syntax

In (Wwww)

where:

 

n

Node position number in the element statement. For example, if the element contains four nodes, I3 denotes the branch current output for the third node; if n is not specified, the first node is assumed.

Wwww

Element name. If the element is within a subcircuit, its current output is accessed by appending a dot and the subcircuit name to the element name, for example, I3(X1.Wwww).

Example

I1(R1)

This example specifies the current through the first node of resistor R1.

I4(X1.M1)

The above example specifies the current through the fourth node (the substrate node) of the MOSFET M1, which is defined in subcircuit X1.

I2(Q1)

The last example specifies the current through the second node (the base node) of the bipolar transistor Q1.

Define each branch circuit by a single element statement. Star-Hspice evaluates branch currents by inserting a zero-volt power supply in series with branch elements.

If Star-Hspice cannot interpret a .PRINT or .PLOT statement containing a branch current, a warning is generated.

Branch current direction for the elements in Figures Resistor (node1, node2) through MOSFET (node1, node2, node3, node4) - n-channel is defined in terms of arrow notation (current direction) and node position number (terminal type).

Figure 8-1: Resistor (node1, node2)

 

Figure 8-2: Capacitor (node1, node2); Inductor (node 1, node2)
Figure 8-3: Diode (node1, node2)

 

Figure 8-4: JFET (node1, node2, node3) - n-channel

 

Figure 8-5: BJT (node1, node2, node3, node4) - npn
Figure 8-6: MOSFET (node1, node2, node3, node4) - n-channel

Power Output

For power calculations, Star-Hspice computes dissipated or stored power in each passive element (R, L, C), and source (V, I, G, E, F, and H) by multiplying the voltage across an element and its corresponding branch current. However, for semiconductor devices, Star-Hspice calculates only the dissipated power. The power stored in the device junction or parasitic capacitances is excluded from the device power computation. Equations for calculating the power dissipated in different types of devices are shown in the following sections.

Star-Hspice also computes the total power dissipated in the circuit, which is the sum of the power dissipated in the devices, resistors, independent current sources, and all the dependent sources. For hierarchical designs, Star-Hspice computes the power dissipation for each subcircuit as well.


NOTE: For the total power (dissipated power + stored power), it is possible to add up the power of each independent source (voltage and current sources).
Print or Plot Power

Output the instantaneous element power and the total power dissipation using a .PRINT or .PLOT statement.

Syntax

.PRINT <DC | TRAN> P(element_or_subcircuit_name)POWER

Power calculation is associated only with transient and DC sweep analyses. The .MEASURE statement can be used to compute the average, rms, minimum, maximum, and peak-to-peak value of the power. The POWER keyword invokes the total power dissipation output.

Example
.PRINT TRAN			P(M1)		P(VIN)		P(CLOAD)		POWER
.PRINT TRAN			P(Q1)		P(DIO)		P(J10)		POWER
.PRINT TRAN			POWER		$ Total transient analysis power
* dissipation
.PLOT DC POWER				P(IIN)		P(RLOAD)		P(R1)
.PLOT DC POWER				P(V1)		P(RLOAD)		P(VS)
.PRINT TRAN P(Xf1) P(Xf1.Xh1)
Diode Power Dissipation

 

 

Pd

Power dissipated in diode

Ido

DC component of the diode current

Icap

Capacitive component of the diode current

Vp'n

Voltage across the junction

Vpp'

Voltage across the series resistance RS

BJT Power Dissipation

Vertical

 

Lateral

 

 

Ibo

DC component of the base current

Ico

DC component of the collector current

Iso

DC component of the substrate current

Pd

Power dissipated in BJT

Ibtot

Total base current (excluding the substrate current)

Ictot

Total collector current (excluding the substrate current)

Ietot

Total emitter current

Istot

Total substrate current

Vb'e'

Voltage across the base-emitter junction

Vbb'

Voltage across the series base resistance RB

Vc'e'

Voltage across the collector-emitter terminals

Vcc'

Voltage across the series collector resistance RC

Vee'

Voltage across the series emitter resistance RE

Vsb'

Voltage across the substrate-base junction

Vsc'

Voltage across the substrate-collector junction

JFET Power Dissipation

 

 

Icgd

Capacitive component of the gate-drain junction current

Icgs

Capacitive component of the gate-source junction current

Ido

DC component of the drain current

Igdo

DC component of the gate-drain junction current

Igso

DC component of the gate-source junction current

Pd

Power dissipated in JFET

Vd's'

Voltage across the internal drain-source terminals

Vdd'

Voltage across the series drain resistance RD

Vgd'

Voltage across the gate-drain junction

Vgs'

Voltage across the gate-source junction

Vs's

Voltage across the series source resistance RS

MOSFET Power Dissipation

 

 

Ibdo

DC component of the bulk-drain junction current

Ibso

DC component of the bulk-source junction current

Icbd

Capacitive component of the bulk-drain junction current

Icbs

Capacitive component of the bulk-source junction current

Icgd

Capacitive component of the gate-drain current

Icgs

Capacitive component of the gate-source current

Ido

DC component of the drain current

Pd

Power dissipated in the MOSFET

Vbd'

Voltage across the bulk-drain junction

Vbs'

Voltage across the bulk-source junction

Vd's'

Voltage across the internal drain-source terminals

Vdd'

Voltage across the series drain resistance RD

Vs's

Voltage across the series source resistance RS

AC Analysis Output Variables

Output variables for AC analysis include:

AC output variable types are listed in AC Output Variable Types. The type symbol is appended to the variable symbol to form the output variable name. For example, VI is the imaginary part of the voltage, or IM is the magnitude of the current.

Table 8-1: AC Output Variable Types

Type Symbol

Variable Type

DB

decibel

I

imaginary part

M

magnitude

P

phase

R

real part

T

group delay

Specify real or imaginary parts, magnitude, phase, decibels, and group delay for voltages and currents.

Nodal Voltage

Syntax

Vx (n1,<,n2>)

where:

 

x

Specifies the voltage output type (see AC Output Variable Types)

n1, n2

Specifies node names. If n2 is omitted, ground (node 0) is assumed.

Example

.PLOT AC VM(5) VDB(5) VP(5)

The above example plots the magnitude of the AC voltage of node 5 using the output variable VM. The voltage at node 5 is plotted with the VDB output variable. The phase of the nodal voltage at node 5 is plotted with the VP output variable.

Since an AC analysis produces complex results, the values of real or imaginary parts of complex voltages of AC analysis and their magnitude, phase, decibel, and group delay values are calculated using either the SPICE or Star-Hspice method and the control option ACOUT. The default for Star-Hspice is ACOUT = 1. To use the SPICE method, set ACOUT = 0.

The SPICE method is typically used to calculate the nodal vector difference in comparing adjacent nodes in a circuit. It is used to find phase or magnitude across a capacitor, inductor, or semiconductor device.

Use the Star-Hspice method to calculate an inter-stage gain in a circuit (such as an amplifier circuit) and to compare its gain, phase, and magnitude.

The following example defines the AC analysis output variables for the Star-Hspice method and then for the SPICE method.

Example
Star-Hspice Method (ACOUT = 1, Default)

Real and imaginary:

VR(N1,N2) = REAL [V(N1,0)] - REAL [V(N2,0)]

VI(N1,N2) = IMAG [V(N1,0)] - IMAG [V(N2,0)]

Magnitude:

VM(N1,0) = [VR(N1,0) 2 + VI(N1,0) 2 ] 0.5

VM(N2,0) = [VR(N2,0) 2 + VI(N2,0) 2 ] 0.5

VM(N1,N2) = VM(N1,0) - VM(N2,0)

Phase:

VP(N1,0) = ARCTAN[VI(N1,0)/VR(N1,0)]

VP(N2,0) = ARCTAN[VI(N2,0)/VR(N2,0)]

VP(N1,N2) = VP(N1,0) - VP(N2,0)

Decibel:

VDB(N1,N2) = 20 · LOG10(VM(N1,0)/VM(N2,0))

SPICE Method (ACOUT = 0)

Real and imaginary:

VR(N1,N2) = REAL [V(N1,0) - V(N2,0)]

VI(N1,N2) = IMAG [V(N1,0) - V(N2,0)]

Magnitude:

VM(N1,N2) = [VR(N1,N2) 2 +VI(N1,N2) 2 ] 0.5

Phase:

VP(N1,N2) = ARCTAN[VI(N1,N2)/VR(N1,N2)]

Decibel:

VDB(N1,N2) = 20 · LOG10[VM(N1,N2)]

Current: Independent Voltage Sources

Syntax

Iz (Vxxx)

where:

 

z

Current output type (see AC Output Variable Types)

Vxxx

Voltage source element name. If an independent power supply is within a subcircuit, its current output is accessed by appending a dot and the subcircuit name to the element name, for example, IM(X1.Vxxx).

Example

.PLOT AC IR(V1) IM(VN2B) IP(X1.X2.VSRC)

Current: Element Branches

Syntax

Izn (Wwww)

where:

 

z

Current output type (see AC Output Variable Types)

n

Node position number in the element statement. For example, if the element contains four nodes, IM3 denotes the magnitude of the branch current output for the third node.

Wwww

Element name. If the element is within a subcircuit, its current output is accessed by appending a dot and the subcircuit name to the element name, for example, IM3(X1.Wwww).

Example

.PRINT AC IP1(Q5) IM1(Q5) IDB4(X1.M1)

If the form In(Xxxx) is used for AC analysis output, the magnitude IMn(Xxxx) is the value printed.

Group Time Delay

The group time delay, TD, is associated with AC analysis and is defined as the negative derivative of phase, in radians, with respect to radian frequency. In Star-Hspice, the difference method is used to compute TD, as follows

 

where phase1 and phase2 are the phases, in degrees, of the specified signal at the frequencies f1 and f2, in Hertz.

Syntax

.PRINT AC VT(10) VT(2,25) IT(RL)

.PLOT AC IT1(Q1) IT3(M15) IT(D1)


NOTE: Since there is discontinuity in phase each 360°, the same discontinuity is seen in TD, even though TD is continuous.
Example
INTEG.SP ACTIVE INTEGRATOR 
******  INPUT LISTING
******
V1       1   0  .5   AC   1
R1       1   2      2K
C1       2   3      5NF
E3       3   0      2 0 -1000.0
.AC DEC   15 1K  100K
.PLOT AC VT(3) (0,4U) VP(3) 
.END

Network

Syntax

Xij (z), ZIN(z), ZOUT(z), YIN(z), YOUT(z)

where:

 

X

Specifies Z for impedance, Y for admittance, H for hybrid, or S for scattering parameters

ij

i and j can be 1 or 2. They identify which matrix parameter is printed.

z

Output type (see AC Output Variable Types). If z is omitted, the magnitude of the output variable is printed.

ZIN

Input impedance. For a one port network ZIN, Z11, and H11 are the same

ZOUT

Output impedance

YIN

Input admittance. For a one-port network, YIN and Y11 are the same.

YOUT

Output admittance

Example

.PRINT AC Z11(R) Z12(R) Y21(I) Y22 S11 S11(DB)

.PRINT AC ZIN(R) ZIN(I) YOUT(M) YOUT(P) H11(M)

.PLOT AC S22(M) S22(P) S21(R) H21(P) H12(R)

Noise and Distortion

This section describes the variables used for noise and distortion analysis.

Syntax

ovar <(z)>

where:

 

ovar

Noise and distortion analysis parameter. It can be either ONOISE (output noise), or INOISE (equivalent input noise) or any of the distortion analysis parameters (HD2, HD3, SIM2, DIM2, DIM3).

z

Output type (only for distortion). If z is omitted, the magnitude of the output variable is output.

Example

.PRINT DISTO HD2(M) HD2(DB)

Prints the magnitude and decibel values of the second harmonic distortion component through the load resistor specified in the .DISTO statement (not shown).

.PLOT NOISE INOISE ONOISE


NOTE: The noise and distortion output variable may be specified along with other AC output variables in the .PRINT AC or .PLOT AC statements.

Element Template Output

Element templates are used in .PRINT, .PLOT, .PROBE, and .GRAPH statements for output of user-input parameters, state variables, stored charges, capacitor currents, capacitances, and derivatives of variables. The Star-Hspice element templates are listed at the end of this chapter.

Syntax

Elname:Property

 

Elname

Name of the element

Property

Property name of an element, such as a user-input parameter, state variable, stored charge, capacitance current, capacitance, or derivative of a variable

The alias is:

LVnn(Elname)

or

LXnn(Elname)

 

LV

Form to obtain output of user-input parameters, and state variables

LX

Form to obtain output of stored charges, capacitor currents, capacitances, and derivatives of variables

nn

Code number for the desired parameter, given in the tables in this section

Elname

Name of the element

Example

.PLOT TRAN V(1,12) I(X2.VSIN) I2(Q3) DI01:GD

.PRINT TRAN X2.M1:CGGBO M1:CGDBO X2.M1:CGSBO

Star-Hspice Manual - Release 2001.2 - June 2001