HSPICE Devices

This page lists some typical circuit devices and their uses and notations in HSPICE.


Index:


Return to the HSPICE Help Page.


General Element Statements

The element statement specifies the type of element or independent source used. It has a field for the element name, the connecting nodes, a value for the component, and optional parameters.

General Form:

	NAME node1 node2 nodeN <model reference> value <optional parameters>
Note: all fields in '<>' are optional and do not have to be included.

The fields are:

NAME
Specifies the type and name of element. The first letter in the name field identifies the element as a specific type, e.g., C=capacitor, L=inductor, R=resistor. The remaining letters give the element a unique name.
node
Specifies how the element is connected in the netlist, e.g., what nodes the element is between.
value
Gives the values of the element.
<model reference>
Refers to the model when the basic element value does not provide an adequate description.
<optional parameters>
Used to modify existing values within a .MODEL for this particular element. In other words a .MODEL might have a temperature of 27 degrees when you want 40 degrees Centigrade.

Example:

	c1 2 0 10u
Represents an a 10uF capacitor (named '1') located between node 2 and ground.

Another example for element statements can be found in lab1a.sp. The element statements are those not beginning with a '.'.

----Return to Index----

.Model Statements

.MODEL statements allow extra device descriptions are required for accuracy. For instance, a .MODEL statement can be used to give resistors operating temperatures, L and W values to MOSFET's, or even insulator thickness on a capacitor. .MODEL statements can be included any within the .lis, though they are usually placed before the netlist for convenience.

General Form:

	.MODEL mname modeltype<keyword=value>

The fields are:

mname
The model reference name specified in the asociated element statement.
moeltype
Specifies the model type to be used, i.e., R for a resister, C for a capacitor, and L for inductor.
Example:
	.MODEL res1 R RES=1k	$just a 1 ohm resistor
	.MODEL res2 R RAC=100	$resistor with 100 ohm AC resistance

Example file lab3b.sp displays a .MODEL statement where tansisters labn and labp are labeled as npn and pnp respectively.

----Return to Index----

.Param Statements

.PARAM statements allow the user to define local variables. The variables can be defined as values, equations, or even functions.

General Form:

	.PARAM variable = 'expression'
			or
	.PARAM variable = value

The fields are:

variable
Represents the name of the variable or function to be defined.
expression
Represents the value, equation, or function to be assigned to the variable.
Example:
	.PARAM x=5		$x assigned the value of 5
	.PARAM x='y+3'		$algebraic equation
	.PARAM rho(leff,weff)='x*leff*weff-2u'
	+			$Function declarations

Example file Index----


Devices

Passive:

Resistors:

The resistor elements use the following formats:

General Form:

	Rxxx n1 n2 Rval	

	Rxxx n1 n2 <mname> Rval <TC1=val> <TC2=val> <SCALE=val> <m=val>
	+<AC=val> <DTEMP=val> <L=val> <W=val> <C=val>
				
	Rxxx n1 n2 R='equation'

The fields are:

AC
AC resistance used in the AC analysis. Default=Reff
C
Capacitance connected from node n2 to bulk. Default=0.0
DTEMP
Element and circuit temperature difference. Defualt=0.0
equation
The resistor can be described as a function of any node voltages, branch currents, and any independent variables such as TIME, frequency (HERTZ), or temperature (TEMPER).
L
Resistor length. Defualt=0.0
M
Multiplier used to simulate parallel resistors. Default=1
mname
Model name.
n1
Positive terminal node name.
n2
Negative terminal node name.
R
Resistance.
Rxxx
resistor element name. Must begin with an 'R' followed by up to 15 alphanumeric characters.
SCALE
Element scale factor for resistance and capacitance. Default=1
TC1
1st order Temp. Coeff. for resistor.
TC2
2nd order Temp. Coeff. for resistor.
W
Resistor width. Default=0.0
Examples:
	R1 Rnode1 Rnode2 100		$100 ohm res. between Rnode1 and Rnode2
	RC1 12 17 1k TC=0.001, 0 1.2	$res. with TC1=0.001, SCALE =0, and
					$M=1.2
	R4 33 0 45 RTC1 RTC2 7		$45 ohm res. with TC1=RTC1, TC2=RTC2,
					$and SCALE =7.

----Return to Index----

Capacitors:

The capacitor elements use the following formats:

General Form:

	Cxxx n1 n2 capval

	Cxxx n1 n2 <mname> capval <TC1 <TC2>> <SCALE=val> <IV=val> <M=val>
	+<DTEMP=val> <L=val> <W=val>
				
	Cxxx n1 n2 <mname> C=val <TC1=val> <TC2=val> <IV=val> <SCALE=val> <M=val>
	+<DTEMP=val> <L=val> <W=val>			
				
	Cxxx n1 n2 C='equation' CTYPE=0 or 1

The fields are:

Cxxx
Capacitor element name. Must begin with an 'C' followed by up to 15 alphanumeric characters.
C
Capacitance in farads at room temperature.
CTYPE
For capacitance, if C is a function of v(n1,n2), then CTYPE=0 else, CTYPE=1. The capacitance charge is calculated differently depending on the value of CTYPE.
DTEMP
Element and circuit temperature difference. Defualt=0.0
equation
The capacitor value can be described as a function of any node voltages, branch currents, and any independent variables such as TIME, frequency (HERTZ), or temperature (TEMPER).
IV
Initial volatge across the capacitor in volts.
L
Capacitor length length. Defualt=0.0
M
Multiplier used to simulate parallel capacitors. Default=1
mname
Model name.
n1
Positive terminal node name.
n2
Negative terminal node name.
SCALE
Element scale factor. Default=1
TC1
1st order Temp. Coeff.
TC2
2nd order Temp. Coeff.
W
Capacitor width. Default=0.0
Examples:
	C1 1 2 CAPXX	$Capacitor between nodes 1 and 2 with value CAPXX
	Cload 5 0 10u	$10uF cap. between node 5 and ground.

----Return to Index----

Inductors:

The inductor elements use the following formats:

General Form:

	Lxxx n1 n2 lval

	Lxxx n1 n2 lval <TC1 <TC2>> <SCALE=val> <IC=val> <M=val>
	+<DTEMP=val> <R=val>
				
	Lxxx n1 n2 L=val <TC1=val> <TC2=val> <IC=val> <SCALE=val> <M=val>
	+<DTEMP=val> <R=val>			
				
	Lxxx n1 n2 C='equation' LTYPE=0 or 1 <R=val>

The fields are:

DTEMP
Element and circuit temperature difference. Defualt=0.0
equation
The indcutor value can be described as a function of any node voltages, branch currents, and any independent variables such as TIME, frequency (HERTZ), or temperature (TEMPER).
IC
Initial current through the inductor in ampres.
Lxxx
Inductor element name. Must begin with an 'L' followed by up to 15 alphanumeric characters.
LTYPE
For capacitance, if L is a function of I(Lxxx), then LTYPE=0 (default) else, LTYPE=1. The inductance flux is calculated differently depending on the value of LTYPE.
M
Multiplier used to simulate parallel inductors. Default=1
n1
Positive terminal node name.
n2
Negative terminal node name.
SCALE
Element scale factor. Default=1
TC1
1st order Temp. Coeff.
TC2
2nd order Temp. Coeff.
R
Resistance in ohms of the inductor element.
Examples:
	Llink 42 69 1u				$1uH ind. between nodes 42 and 69
	Lshunt 23 51 10u .001 0 15 IC=15.7m	$10uH ind. between nodes 23 and
						$51 with a 1st oder temp. 
						$coeff.=.001, SCALE=15, and 
						$15.7mA of initial current

----Return to Index----

Active:

diodes:

Diodes in HSPICE can be anywhere from very complex realistic diodes to simple ideal ones depending on the circuit designer. In general all diodes will have a model name and be defined by a .MODEL statement. Since most models are provided, .MODEL descriptions will not be given in any detail. The diode element uses the following foramts:

General Form:

	Dxxx nplus nminus mname <options)
	
	Dxxx nplus nminus mname <AREA=val> <PJ=val> <WP=val> <LP=val> <WM=val>
	+	<LM=val> <OFF> <IC=vd> <M=val> <DTEMP=val>
	
	Dxxx nplus nminus mname <W=val> <L=val> <WP=val> <LP=val> <WM=val>
	+	<LM=val> <OFF> <IC=vd> <M=val> <DTEMP=val>

The fields are:

AREA
Represetns the area of the diode. Default=1.
DTEMP
The temperature difference between the element and circuit. Defualt=0.
Dxxx
Diode element name. Must begin with an 'D' followed by up to 15 alphanumeric characters.
IC
Initial diode voltage.
L
Diode length (in meters).
LM
Metal cpacitor length (in meters).
LP
Polysilicon capacitor length (in mters).
M
Multiplier factor to simulate multiple diodes.
mname
Diode model name (up to 16 characters).
nplus
Positive terminal name (arrow end) of the diode (up to 16 characters).
nminus
Negative terminal name (line end) of the diode (up to 16 characters).
OFF
Sets the diode initially to the off operation region (DC analysis). Default=ON.
PJ
Periphery of junction.
vd
Value of the initial voltage across the diode.
W
Diode width (in meters).
WM
Metal capacitor width (in meters).
WP
Polysilicon capacitor width (in meters).
Examples:
	Dbridge 2 10 diode1		$simple diode modeled by diode1 that
					$lies between nodes 2 and 10.
	dclmmmp 3 substrate dmod IC=0.2	$diode conected between nodes 3 and
					$substrate, model name dmod, and .2v 
					$initial voltage.

----Return to Index----

bipolar transistors (BJT's):

BJT's in HSPICE, like the diode, also require .MODEL statements. Since the .MODEL statement defines if a transistor is npn or pnp, a general .MODEL statement is shown below:
	.MODEL mname NPN <or PNP> <paramters>
Only the model name (up to 16 characters) and NPN (or PNP) must be included. The BJT element uses the following formats:

General Form:

	Qxxx nc nb ne mname
	
	Qxxx nc nb ne <ns> mname <aval> <OFF> <IC=vbeval,vceval> <M=val>
	+	<DTEMP=val>
	
	Qxxx nc nb ne <ns> mname <AREA=val> <AREAB=val> <AREAC=val> <OFF>
	+	<VBE=val> <VCE=val> <M=val> <DTEMP=val>

The fields are:

AREA
Multiplying factor for the emitter area. Default=1 (effects resistances, capacitances, and currents within the transistor).
AREAB
Area of the base. Default=AREA.
AREAC
Area of the collector. Default=Area.
aval
Value of the AREA variable.
DTEMP
The temperature difference between the element and circuit. Defualt=0.
IC
Variable for the initial condition of the transistor.
M
Multiplier factor to simulate multiple BJTs (effects all resistance, capacitance, and currents).
mname
Transistor model name (up to 16 characters).
nb
Node name for the base terminal (up to 16 characters).
nc
Node name for the collector terminal (up to 16 characters).
ne
Node name for the emitter terminal (up to 16 characters).
ns
Node name for the substrate terminal (up to 16 characters).
OFF
Sets the transistor initially to the off operation region (DC analysis). Default=ON.
Qxxx
BJT element name. Must begin with an 'Q' followed by up to 15 alphanumeric characters.
vbeval
Initial base-emitter voltage.
vceval
Initial collector-emitter voltage.
Examples:
	Q23 10 24 13 qmod	$BJT with collector, base, and emiter at nodes
				$10, 24, and 13 respectively and model name qmod
	Q50 11 265 4 20 mod1	$substrate connection at node 20
	
	q100 cx bx ex qpnp AREA=1.5 AREAB=2.5 AREAC=3.0
				$Differing emitter, base, and collector areas

----Return to Index----

MOSFETS:

MOSFETs are another device within HSPICE that requires a .MODEL statement. The .MODEL statement is required to define whether or not the circuit designer want to deal with a p- or n-channel device. The syntax for the .MODEL statement is shown below:
	.MODEL mname NMOS <or PMOS> <parameters>
Only the model name, mname, and the NMOS (or PMOS) are required. The MOSFET transistor element uses the follwing formats:

General Form:

	Mxxx nd ng ns mname
	
	Mxxx nd ng ns <nb> mname <L=val> <W=val> <AD=val> <AS=val> <PD=val>
	+	<PS=val> <NRD=val> <NRS=val> <RDC=val> <RSC=val> <OFF>
	+	<IC=vds,vgs,vbs> <M=val> <DTEMP=val> <GEO=val> <DELVTO=val>
	
	Mxxx nd ng ns <nb> mname lval wval...

The fields are:

AD
Diffusion area of the drain.
AS
Diffusion area of the source.
DELVTO
Zero-bias threshold voltage shift. Default=0.
DTEMP
The temperature difference between the element and circuit. Defualt=0.
GEO
Source-drain sharing selector (only use for ACM=3 in .MODEL). Default=0.
L
Channel length (in meters).
mname
Transistor model name (up to 16 characters).
M
Multiplier factor to simulate multiple MOSFETs
Mxxx
MOSFET element name. Must begin with an 'M' followed by up to 15 alphanumeric characters.
nb
Node name for the bulk terminal (up to 16 characters).
nd
Node name for the drain terminal (up to 16 characters).
ng
Node name for the gate terminal (up to 16 characters).
ns
Node name for the source terminal (up to 16 characters).
NRD
Number of resistance squares of drain diffusion. Default=0.
NRS
Number of resistance squares of source diffusion. Default=0.
OFF
Sets the transistor initially to the off operation region (DC analysis). Default=ON.
PD
Drain junction perimeter (including channel edge). Default=0.
PS
Source junction perimeter (including channel edge). Default=0.
RDC
Contact resistance on the drain. Default=0.
RSC
Contact resistance on the source. Default=0.
vbs
Initial bulk-source voltage.
vds
Initial drain-source voltage.
vgs
Initial gate-source voltage.
W
Channel width (in meters).
Examples:
	m1 24 2 0 type1		$MOSFET with drain node 24, gate node 2, and
				$source ground.  The transistor is defined dy 
				$the type1 model.
	M2 2 17 6 10 MODM 5u 2u	$bulk connection at node 10 and has a 5um
				$legnth and 2um width channel.
				
	m3 2 9 3 0 mod1 ad=100p as=100p pd=40u ps=40u
				$100pm^2 drain and 100pm^2 source diffusion
				$area and 40um perimeter source and drain
				$junctions

----Return to Index----

Independent sources:

general form:

In general, voltage and current sources in HSPICE can be very almost anything from simple dc sources too incedibly complex piecewise linear ones. The general form for both current and voltage sources are shown below:

General Form:

  Voltage:	
	Vxxx n+ n- <DC=>dcval

	Vxxx n+ n- <AC=>acmag, acphase
	
	Vxxx n+ n- tranfun
  Current:
	Ixxx n+ n- <DC=>dcval
	
	Ixxx n+ n- <AC=>acmag, acphase
	
	Ixxx n+ n- tranfun

The fields are:

AC
Indicates the source is to be used in AC small signal analysis.
acmag
magnitude of AC source.
acphase
phase of AC source. Default=0.
tranfun
Transient source function (i.e. PULSE, PU, SIN, EXP, PWL, PL).
Ixxx
Independent current source element name. Must begin with an "I" followed by up to 15 alphanumeric characters.
M
Multiplier used for simulating parallel current sources. Default=1.
n+
Positive node
n-
Negative node
Vxxx
Independent voltage source element name. Must begin with an "V" followed by up to 15 alphanumeric characters.
Examples:
	Vx 1 0 5		$5 volt dc source between 1 and ground
	Vb 2 0 dc=vcc		$dc source with voltage vcc
	Vh 3 6 dc=2 ac=1,90	$2v dc souce with a 1v 90degree ac component
	Ig 8 7 PWL(1ma 0s 5ma 25ms) $piecewise linear current source

----Return to Index----

pulse function:

The pulse function can create either a linear rectangular or linear trapazoidal pulse with an initial time delay. The function also has user defined rise, fall, and high times. The functions are placed in the tranfun position listed above. The pulse function has the form:

General Form:

	PULSE <(>v1 v2 <td> <tr> <tf> <pw> <per> <)>

	PU <(>v1 v2 <td> <tr> <tf> <pw> <per> <)>

The fields are:

per
Pulse repetition period in seconds (i.e. how often it repeats). Defualt=TSTEP (the transient timestep).
pw
Pulse width (the time the pulse remains high). Default=TSTEP
td
Time delay for the start of the transient interval to the up ramp. Default=0
tf
Fall time. Default=TSTEP.
tr
Rise time. Default=TSTEP.
v1
Initial value of voltage or current before the pulse.
v2
Pulse current or volatge value
Examples:
	Vin 3 0 PULSE (-1 1 2n 2n 2n 50n 100n)	$Pulse function form -1v to +1v
						$with a 2ns delay, 2ns rise time, 2ns fall time,
						$50ns pulse width, and a 500ns
						$repitition period.
	V1 99 0 PU 1 5 3ns 1ns 1ns 25ns 150ns	$An alternaive notation

----Return to Index----

sin function:

The HSPICE sin function can produce a sin wave input with user defined delay, magnitude, and phase. Also, HSPICE can also produce exponentially damped sin sources.

General Form:

	SIN <(>vo va <freq <td <damp<pd>>>> <)>

The fields are:

freq
Wave frequency in Hz. Default=1/TSTOP
pd
Phase delay in degrees (not radians). Default=0
td
Wave time delay in seconds. Default=0.
damp
Wave damping factor in 1/seconds. Default=0.
va
Wave voltage or current amplitude in volts or amps.
vo
Wave offset in volts or amps.
Examples:
	VIN 3 0 sin (0 1 100meg 1ns 1e10)	$1 volt 0 offset 100MHz sin
						$wave with a 1ns delay and 
						$1e10 damping factor
	V12 1 0 sin 0 5	10k			$5v 0v offset 10kHz sin wave

----Return to Index----

exponential function:

The exp function produces an exponential with user definable rise time and fall time constants and delay values.

General Form:

	EXP <(> v1 v2 <td1> <t1> <td2> <t2> <)>

The fields are:

t1
Rise time constant in seconds. Default=TSTEP
t2
Fall time constant in seconds. Default=TSTEP
td1
Rise delay time in seconds. Default=0
td2
Fall delay time in seconds. Default=td1+TSTEP
v1
Starting voltage (in volts) or current (in amps).
v2
Pulse value of voltage (in volts) or current (in amps).
Examples:
	Vin 3 0 exp -4 -1 2n 30n 60n 40n	$A waveform that rises from -4v
						$to -1v exponentially with a
						$30ns time constant. The drops
						$to -4v at 60ns with 40ns time
						$constant.

----Return to Index----

piecewise linear function:

The HSPICE piecewise linear function is a collection of user defined pulses and steps. All plateaus and rise and fall times are also user definable. In addition, when moving between differing voltages or currents, the function will always proceed linearly.

General Form:

	PWL <(> v1 t1, <v2 t2, v3 t3,...> <R =<repeat>> <TD=delay> <)>

The fields are:

R
Forces the function to repeat.
repeat
The start time for the function to repeat in seconds.
t1...
The time values in seconds.
TD
Keyword for the function time delay
delay
Actual time delay in secnonds.
v1...
Current or voltage values.
Note: Each volatage and time come in pairs. For example, at t1 the function will be at voltage v1, at t2, the function will be v2.

Examples:

	V1 1 0 pwl 60n 0v, 120n 0v, 130n 5v, 170n 5v, 180 0v, R
	
	$This pwl function mimics a pulse function with a rise time of 10ns
	$(from 120n-130n) a 5v high for 40ns (130n-170n), and a 10ns fall time
	$(170n-180n). Next the function repeats (period=180ns).

----Return to Index----

Ryan L. Carlson / ECE / carlsor@ece.orst.edu
File last modified 8-9-95