Upload
uam22
View
476
Download
3
Embed Size (px)
Citation preview
7/24/2019 Hspice Guide
1/45
HSICE Simulation GuideHSICE Simulation Guide
Mixed Signal Chip Design Lab
Department of Computer Science & Engineering
The Penn State Univ
7/24/2019 Hspice Guide
2/45
Jan. 26, 2006 !nsoo "im
HSPICE Input/Output Files & SuffixesHSPICE Input/Output Files & Suffixes
HSPICE Input
input netlist .sp design configuration .cfg
initiali#ation hspiceini
HSPICE Output
run status .st0 output listing .lis
initial condition .ic
measure output .m* $eg mt%mt'(
)nal*sis data transient .t! $eg tr%tr'(
)nal*sis data dc .s" $eg s+%s+'(
)nal*sis data ac .ac $eg ac%ac'(
Plot file g! $eg gr% gr'(Note: # is either a sweep or a hardcopy file number.
Typical Invocations:
hspice design > design.lisor...
hspice design.ckt > design.out
.lis file contains results of:
.print & .plot
.op operating point!
.options results!
"un time status
epends on .$ption %ost
7/24/2019 Hspice Guide
3/45
Jan. 26, 2006 !nsoo "im
#etlist St!uctu!e $ %ecommended Fo!mat#etlist St!uctu!e $ %ecommended Fo!mat
Title
ontrols
'ources
omponents
(odels & 'ubckts
***This is a better netlist
.options post acct opts node
.tran 0.1 5 $ needs 5 seconds tosettle
.print v(6) i(r16)
.plot v(4) v(14) v(data)
* Voltage sources
v4 4 0 dc 0 ac 0 0 pulse 0 1 0 .15 .15 .4 2
vdata data 0 sin(1.0 1.0 1.0 0.0 1.0)v6 6 0 exp(1 0 .1 .02 .6 .2)
* Components
L6 6 16 .05
c6 16 0 .05
r16 16 0 40c4 4 14 .1
L5 data 15 1
c5 15 0 .2
.odel ...
.end
7/24/2019 Hspice Guide
4/45
Input Cont!olInput Cont!ol
option
param
alter
model
Lib
7/24/2019 Hspice Guide
5/45
Jan. 26, 2006 !nsoo "im
.OPIO#.OPIO#
,PT!,- L!ST
Prints a list of netlist elements node connections and valuesCalculates effective si#es of elements and .e* values
Useful in diagnosing topolog* related problems
,PT!,- -,DE
Prints a node connection table The nodal cross/reference table lists
each node and all the elements connected to it Useful in diagnosing topolog* related non/convergence problems
,PT!,- )CCT
0eports 1ob accounting and run/time statistics at the end of the output
listing
Useful in observing simulation efficienc* Maximum performance is +henTotal !teration Count 2 Convergent !teration Count is 32'
,PT!,- -,M,D
Suppresses the print/out of M,DEL parameters
7/24/2019 Hspice Guide
6/45
Jan. 26, 2006 !nsoo "im
.OPIO#.OPIO#
,PT!,- P,ST P0,4E
5raph nodal voltages element currents circuit responsealgebraic expressions from transient anal*sis DC s+eeps )C
anal*sis
0e6uesting 5raph Data 7ormat
,PT!,- P,ST $binar*(
,PT!,- P,ST83 $)SC!! platform independent( P0,4E
9rite directl* to the 5raph Data 7ile $+ithout +riting to the L!S file(
Limit data in 5raph Data file to that specified in P0!-T PL,T
P0,4E 50)P:
7/24/2019 Hspice Guide
7/45Jan. 26, 2006 !nsoo "im
.OPIO#.OPIO#
,PT!,- SC)LE
profound effect on element parameter values 5eometric ELEME-T parameters $L 9 area etc(
5lobal +or.s for M,S7ETs D!,DEs and ;7ETs
,PT!,- SC)LE8
7/24/2019 Hspice Guide
8/45Jan. 26, 2006 !nsoo "im
.P'%'(.P'%'(
P)0)M parnam'8val'
7/24/2019 Hspice Guide
9/45Jan. 26, 2006 !nsoo "im
.P'%'(.P'%'(
Defining *our o+n functions
param
7/24/2019 Hspice Guide
10/45
Jan. 26, 2006 !nsoo "im
.'E%.'E%
)LTE0 0erun a simulation several times +ith different
Circuit Topolog*
Models
Librar* Components
Elements
Parameter ?alues
,ptions
Source stimulus
)nal*sis ?ariables
PrintAPlot commands $must be parameteri#ed( 'st 0un / :SP!CE reads input netlist file up to the first )LTE0
Subse6uent / 0eads input netlist to next )LTE0 etc
)LTE0 Se6uence for 9orst Case Corner )nal*sis
DELETE L!4 0emoves previous librar* selection
L!4 )dd ne+ librar* case
7/24/2019 Hspice Guide
11/45
Jan. 26, 2006 !nsoo "im
.'E%.'E%
Limitations2
C)- include Element Statements $except source(
D)T) L!4 DEL L!4 !-CLUDE M,DEL statements
!C -,DESET statements
,P ,PT!,-S P)0)M TEMP T7 T0)- DC )C
C)--,T include
P0!-T PL,T 50)P: or an* other !A, statements
)?,!D adding anal*sis statements under each )LTE0 bloc.
$ +ill cause huge penalt* in simulation time and confusion inresult outputting(
7/24/2019 Hspice Guide
12/45
Jan. 26, 2006 !nsoo "im
.'E%.'E%
Example
Parameteri#e Source Statements
.PA#AM A=+n$ ,=n$
V1 VA BN< PLSE 08 8 0n$ A , +6.n$ 100n$
V2 V, BN< PLSE 08 8 0n$ A , 6n$ 200n$
V? VC BN< PLSE 08 8 0n$ A , 16.n$ +00n$
.ALTE#
.PA#AM A=n$ ,=6n$
.ALTE#
.PA#AM A=6n$ ,=Dn$
.EN!i5>m$1.da%
.end! TT
.!i5 HH F 'a$% *re$$
.*aram TO7G9=200 ...
.in!"de >"$r>!i5>m$1.da%
.end! HH
( 'i!e:
>"$r>!i5>m$1.da%.mde! n@an
3 !e8e!=1? ...
3 %)=%)G9
7/24/2019 Hspice Guide
16/45
Output Cont!olOutput Cont!ol
measure
7/24/2019 Hspice Guide
17/45
Jan. 26, 2006 !nsoo "im
.P%I#.P%I#
s*ntax
P0!-T ant*pe ov'
7/24/2019 Hspice Guide
18/45
Jan. 26, 2006 !nsoo "im
.P%I#.P%I#
III !D/?ds curve temp8% nmos +8@% l8%G dbp%'' III
option nomod nopage acct +l scale8%Ku co8'3
temp 3@inc AhomeAusers3A.*usunAmodelAmodelFt*p
param paFvgs8G%v
dc vds %v G@v %@v
vds vds gnd
vgs vg gnd paFvgsvbb vbb gnd /'%v
mnmos vds vg gnd vbb g +8%> l8%3
r' vds vsFim '%.
r3 vsFim gnd '%.
print i$mnmos(
end
Input file
Print value of current
through element mnmos
7/24/2019 Hspice Guide
19/45
Jan. 26, 2006 !nsoo "im
.P%I#.P%I#
III id/vds curve temp8% nmos +8@% l8%G dbp%'' III
IIIIII dc transfer curves tnom8 3@%%% temp8 3@%%%
IIIIII
x
volt current
mnmos
% '%%%%p
@%%%%%%%m G3Hu'%%%%% K%KHGGu
'@%%%% ''G'@Ku
3%%%%% '3G@H@u
3@%%%% '>G%@u
%%%%% 'K@G%u
@%%%% 'G%@uG%%%%% 'G3%@@Ku
G@%%%% 'G%G@u
*
IIIII 1ob concluded
Output file
(.lis)
7/24/2019 Hspice Guide
20/45
Jan. 26, 2006 !nsoo "im
.(E'S+%E.(E'S+%E
ME)SU0E
Print user/defined electrical specifications of a circuit ME)SU0E is a post processor
Seven 7undamental Measurement modes2
0ise 7all Dela*
)verage 0MS Min Max & Pea./to/Pea.
7ind/9hen
E6uation Evaluation
Derivative Evaluation
!ntegral Evaluation
0elative Error
7/24/2019 Hspice Guide
21/45
Jan. 26, 2006 !nsoo "im
.(E'S+%E.(E'S+%E
ME)SU0E
7/24/2019 Hspice Guide
22/45
Jan. 26, 2006 !nsoo "im
.(E'S+%E.(E'S+%E
ME)SU0E
7/24/2019 Hspice Guide
23/45
Jan. 26, 2006 !nsoo "im
.(E'S+%E.(E'S+%E
7!-D/9:E- )llo+s an* independent variables $time fre6 parameter( b* using
9:E- s*ntax or an* dependent variables $voltage current etc( b*
using 7!-D/9:E-s*ntax to be measured +hen some specific event
occurs
ME)SU0E
7/24/2019 Hspice Guide
24/45
Jan. 26, 2006 !nsoo "im
.(E'S+%E.(E'S+%E
E6uation Evaluation
Use this statement to evaluate an e6uation that can be a functionof the results of previous Measure statements
The e6uation MUST -,T be a function of node voltages or
branch currents
ME)SU0E
7/24/2019 Hspice Guide
25/45
Po"e! Sou!cesPo"e! Sou!ces
!ndependent Sources
7/24/2019 Hspice Guide
26/45
Jan. 26, 2006 !nsoo "im
Independent Sou!ces$ ,C- 'CIndependent Sou!ces$ ,C- 'C
S*ntax ?xxx nJ n/
7/24/2019 Hspice Guide
27/45
Jan. 26, 2006 !nsoo "im
Independent Sou!ces$ !ansientIndependent Sou!ces$ !ansient
Time ?ar*ing $Transient(
PULSE v' v3
7/24/2019 Hspice Guide
28/45
Jan. 26, 2006 !nsoo "im
Independent Sou!ces$ P3Independent Sou!ces$ P3
Piece/9ise Linear
P9L t' v'
7/24/2019 Hspice Guide
29/45
Jan. 26, 2006 !nsoo "im
Independent !ansient Sou!cesIndependent !ansient Sou!ces$$ SI#- (ixedSI#- (ixed
S!-
S!- vo va
7/24/2019 Hspice Guide
30/45
'nal4sis'nal4sis
DC anal*sis
)C anal*sis
Transient anal*sis
Temperature anal*sis
7/24/2019 Hspice Guide
31/45
Jan. 26, 2006 !nsoo "im
'nal4sis t4pes'nal4sis t4pes
T*pes and ,rder of Execution
DC ,perating $4ias( Point 7irst and most important 1ob is to determine the DC stead* state
response $called the DC operating point(
DC 4ias Point & DC S+eep )nal*sis
DC ,P T7 SE-S
)C 4ias Point & )C 7re6uenc* S+eep )nal*sis )C -ET -oise Distortion
Transient 4ias Point & Transient S+eep )nal*sis
Trans 7ourier ,P
7/24/2019 Hspice Guide
32/45
7/24/2019 Hspice Guide
33/45
Jan. 26, 2006 !nsoo "im
.,C.,C
DC Statement / DC S+eep
DC var' start' stop' incr'
7/24/2019 Hspice Guide
34/45
Jan. 26, 2006 !nsoo "im
.,C.,C
Examples
.,C I# 0.56 6.0 0.56S+eep ?!- from 3@ to @v b* 3@v increments
.,C ,S 0 0 .6 GS 0 6
S+eep ?DS from % to '%v b* @ incr at ?5S values of % ' 3 G & @v
.,C E(P 766 56 0S+eep TEMP from /@@C to '3@C in '% degree C increments
.,C x1al 8 08 .68 S3EEP E(P I# 6 56 56
DC anal*sis performed at each temperature value Linear TEMP s+eep
from 3@ to '3@ $@ points( +hile s+eeping a resistor value called Bxval
from '" to '%" in @"
7/24/2019 Hspice Guide
35/45
Jan. 26, 2006 !nsoo "im
.OP & .F.OP & .F
,P
7/24/2019 Hspice Guide
36/45
Jan. 26, 2006 !nsoo "im
'C 'nal4sis'C 'nal4sis
)nal*#e 7re6uenc* 0esponse )fter doing ,P anal*sis :SP!CE conducting )C anal*sis of the
nonlinear device such as M,S7ET at the DC operating point !ncludes +hite -oise Calculation considering resistors semiconductor
device
7lic.er noise estimation
)C )nal*sis Statements
)C Compute output variables as a function of fre6uenc* -,!SE -oise )nal*sis
D!ST, Distortion )nal*sis
-ET -et+or. anal*sis
S)MPLE Sampling -oise
)C S+eep Statements2 7re6uenc* Element ?alue Temperature Model parameter ?alue
0andom S+eep $Monte Carlo( ,ptimi#ation and )C Design )nal*sis
7/24/2019 Hspice Guide
37/45
Jan. 26, 2006 !nsoo "im
.'C.'C
)C S+eep )C t*pe np fstart fstop )C t*pe np fstart fstop
7/24/2019 Hspice Guide
38/45
Jan. 26, 2006 !nsoo "im
.'C.'C
Examples
)C DEC '% '" '%%ME5 7re6 s+eep '% points per decade for '":# to '%%M:#
Total )C anal*sis points2 @'
4ecause 7re6 range is '.W'%%M log$'%%MA'"( 8 @ decades
and '% points per decade
)C L!- '%% ' '%%h# Linear S+eep '%% points from 'h# to '%%:#
Use L!- +hen the 7re6 range is narro+
Mixed Command
)C DEC '% ' '%" S9EEP cload L!- 3% 'pf '%pf
)C anal*sis for each value of cload +ith a linear s+eep of cload bet+een'pf and '%pf $3% points( S+eeping fre6uenc* '% points per decade from
':# to '%":# $G'point fre6(
7/24/2019 Hspice Guide
39/45
Jan. 26, 2006 !nsoo "im
!ansient 'nal4sis!ansient 'nal4sis
Transient )nal*sis Statements
Compute circuit solution as a function of time over a time range T0)- Statement Can be Used for2
Transient ,perating Point $eg ,P 3%n(
Transient Temperature S+eep
Transient Monte Carlo )nal*sis $random s+eep( Transient Parameter S+eep
Transient ,ptimi#ation
Ta.ing ,P results as a initial value for Transient )nal*sis
7/24/2019 Hspice Guide
40/45
Jan. 26, 2006 !nsoo "im
.%'#.%'#
T0)- Statement
T0)- tincr' tstop'
7/24/2019 Hspice Guide
41/45
Jan. 26, 2006 !nsoo "im
.%'#.%'#
tincr' PrintingAplotting increment for printer output and the suggested computing increment for the postprocessor
tstop' Time at +hich the transient anal*sis stops incrementing b*tincr' var -ame of an independent voltage or current source
an* element or model parameter or the .e*+ord TEMP pstart Starting voltage current element model parameter
or temperature values
pstop 7inal voltage current element model parameteror temperature values pincr ?oltage current element model parameter
or temperature increment values ST)0T Time at +hich printingAplotting begins S9EEP !ndicates a second s+eep is specified on the T0)- statement
np -umber of points per decade $or depending on the preceding .e*+ord( D)T)8datanm Datanm is the reference name of a T0)- statement
t*pe Can be an* of the follo+ing .e*+ords2 DEC ,CT L!- P,!
7/24/2019 Hspice Guide
42/45
Jan. 26, 2006 !nsoo "im
.%'#.%'#
Examples
T0)- 'ns '%%ns Transient anal*sis is made and printed ever* 'ns for '%%ns
T0)- 'ns 3@ns 'ns G%ns ST)0T8'%ns
Calculation is made ever* 'ns for the first 3@ns and then ever* 'ns
until G%ns The printing and plotting begin at '%ns
T0)- '%ns 'us S9EEP cload P,! 'pf @pf '%pf Calculation is made ever* '%ns for 'us at three cload $P,! / Points
of !nterests(
7/24/2019 Hspice Guide
43/45
ExamplesExamples
Transient )nal*sis
)C )nal*sis
7/24/2019 Hspice Guide
44/45
Jan. 26, 2006 !nsoo "im
!ansient 'nal4sis!ansient 'nal4sis((( SPICE Ne%!i$% 'i!e 'r
7/24/2019 Hspice Guide
45/45
'C 'nal4sis'C 'nal4sis
((( SPICE Ne%!i$% 'i!e 'r y"$"n>%!>mde!>!i5m$00%22a.$* CMOS1
.end