hspice tutorial
TRANSCRIPT
Hspice Tutorial2010/10/21
Advisor : Jin-Fu Li Teaching Assistant : Che-Wei Chou Che Wei Advanced Reliable Systems (ARES) Laboratory Department of Electrical Engineering National Central University Jhongli, Taiwan
ContentsIntroduction Simulation Input and Controls Waveform Instructions Simulation Output
ARES Lab-2010
Hspice Tutorial
2
Introduction(1/2)
IC Design Verilog Cell-Based DSD VLSI Design g Hspice Full-Custom VLSI Design AIC
ARES Lab-2010
Hspice Tutorial
3
Introduction(2/2)SPICE :Simulation Program with Integrated Circuit Emphasis
Hspice H i Hspice Hspice Hspice Hspice
ARES Lab-2010
Hspice Tutorial
4
Basic Flow for SPICE
OP/DC/TRAN/AC
.probe/measurement
?
?
ARES Lab-2010
Hspice Tutorial
5
ContentsIntroduction Simulation Input and Controls Waveform Instructions Simulation Output
ARES Lab-2010
Hspice Tutorial
6
Instance and Element NamesC I L
Capacitor Current Inductor MOSFET Resistor Voltage Source Subcircuit Call
M R V X
ARES Lab-2010
2010/10/21
Hspice Tutorial
7
Unit and Scale FactorUnits: R Ohm (e.g. R1 node1 node2 1K) L Henry (e.g. L1 node1 node2 1n) C Farad (e.g. C1 node1 node2 1p) Scale Factors: F 1e-15 T 1e12 P 1e-12 K 1e3 N 1e-9 Meg 1e6 U 1e-6 G 1e9 M 1e-3 DB 20log10
ARES Lab-2010
Hspice Tutorial
8
Instance and Element Descriptions
Mname D G S B N/PMOS W=?u L=?u Mp out in vdd vdd pch W=3u L=1u W 3u L 1u
R1 A
B 1K
C1 out gnd 1p
ARES Lab-2010
Hspice Tutorial
9
Subcircuit.SUBCKT .ENDS .subckt inv out in Wn=0.22u Wp=0.22u Lmin=0.18u mp0 out in vdd vdd pch w=Wp l=Lmin mn0 out i vss vss nch w=Wn l L i 0 in h W l=Lmin .ends inv
SPICE Xname X d 1 d 2 S bxinv dout0 d0 inv Wn=0.22u Wp=0.22u Lmin=0.18u
ARES Lab-2010
Hspice Tutorial
10
Example***** inv ***** .global vdd vss global .subckt inv in out MM0 out in vdd vdd pch w=3u l=350n MM1 out in vss vss nch w=1u l=350n .ENDS x1 in net1 inv x2 net1 out inv
in
net1
out
x1 in 1 inv x2 1 out inv
x1 in 0 inv x2 0 out inv
in
1
out
in
0
out
ARES Lab-2010
2010/10/21
Hspice Tutorial
11
Input Control StatementGLOBALALL nodes are assumed to be local Node names can across all subcircuits by .GLOBAL
.GLOBAL VDD VSS
ARES Lab-2010
Hspice Tutorial
12
Netlist StructureTitle .Title inv .GLOBAL gnd! + vdd! .protect .lib C:\VLSI\mm0355v l' TT lib C:\VLSI\mm0355v.l .unprotect .op .options post options .tran 0.05n 25n .temp 25 v1 vdd! 0 3 3 1 dd! 3.3v v2 gnd! 0 0v v3 Vin 0 pulse( 0v 3.3v 0.1n 0.1n 0.1n 0.5n 1.2n) MM1 Vout Vin vdd! vdd! Pch W=3u L=350.00n MM0 Vout Vin gnd! gnd! Nch W=1u L=350.00n .endHspice Tutorial 13
Model
Controls
Sources
Components END file eARES Lab-2010
Example******inverter******* .GLOBAL gnd! + vdd! .protect .lib 'e:\temp\mm0355v.l' TT .unprotect .op .options post .tran 0.05n 25n .temp 25 v1 vdd! 0 3.3v v2 gnd! 0 0v v3 Vin 0 pulse( 0v 3.3v 0.1n 0.1n 0.1n 0.5n 1.2n) MM1 Vout Vin vdd! vdd! Pch W=3u L=350.00n MM0 Vout Vin gnd! gnd! Nch W=1u L=350.00n .endARES Lab-2010
TT
.end end14
Hspice Tutorial
Control Statements.AC .DC .OP .NOISE .TRAN .SUBCKT .ENDS .OPTIONS OPTIONS .PRINT .PLOT PLOT .TEMP .ENDARES Lab-2010
() Hspice Tutorial 15
2010/10/21
ContentsIntroduction Simulation Input and Controls Waveform Instructions Simulation Output
ARES Lab-2010
Hspice Tutorial
16
Transient SourcesPulse P l (PULSE F Function) ti ) Sinusoidal (SIN Function) Exponential (EXP F E ti l Function) ti ) Piecewise Linear (PWL Function) Single-Frequency FM ( i l (SFFM Function) i ) Single-Frequency AM (AM Function)
ARES Lab-2010
Hspice Tutorial
17
PULSEPULSE (Periodic Waveform)PULSE ( V1 V2 td tr tf pw per)PULSE ( 0V 5V 10ns 10ns10ns 40ns 100ns )
ARES Lab-2010
Hspice Tutorial
18
PWLPWL (Piece Wise Linear Waveform)PWL ( t1 V1 t2 V2 t3 V3 R) PWL (1n 0v 2n 0v 3n 3.3v 8n 3.3v 9n 0v R 0)
ARES Lab-2010
Hspice Tutorial
19
SINSIN (Sinusoidal Waveform) ( ) SIN ( Voffset Vacmag < Freq Tdelay Dfactor > )Vin 3 0 SIN ( 0V 1V 100Meg 2ns 5e7 )
ARES Lab-2010
Hspice Tutorial
20
ContentsIntroduction Simulation Input and Controls Waveform Instructions Simulation Output
ARES Lab-2010
Hspice Tutorial
21
Timing Measurement.meas tran Tr trig v(out) val=3.3*0.1 rise=2 targ v(out) val=3.3*0.9 rise=2 val=3.3*0.9
val=3.3*0.1
rise=1ARES Lab-2010
rise=2Hspice Tutorial
fall=422
ExampleSP
mt0
Simulate Tr=6.738e-11 T 6 738 11 sARES Lab-2010 Hspice Tutorial 23
PowerCommand : .meas tran pwr avg power *.mt0
ARES Lab-2010
Hspice Tutorial
24
ContentsIntroduction d Simulation Input and Controls Waveform Instructions Simulation Output Appendix
ARES Lab-2010
2010/10/21
Hspice Tutorial
25
Example
ARES Lab-2010
Hspice Tutorial
26
Compile
ARES Lab-2010
Hspice Tutorial
27
Job Aborted
ARES Lab-2010
Hspice Tutorial
28
Job Conculded
ARES Lab-2010
Hspice Tutorial
29
verdi
ARES Lab-2010
Hspice Tutorial
30
New Waveform
ARES Lab-2010
Hspice Tutorial
31
Open File
ARES Lab-2010
Hspice Tutorial
32
ARES Lab-2010
Hspice Tutorial
33
Waveform File(.tr0)
Step 2
Step 1
Step 3ARES Lab-2010 Hspice Tutorial 34
Get Signals
ARES Lab-2010
Hspice Tutorial
35
ARES Lab-2010
Hspice Tutorial
36
ARES Lab-2010
Hspice Tutorial
37
PC_Hspice
ARES Lab-2010
Hspice Tutorial
38
sp
ARES Lab-2010
Hspice Tutorial
39
ARES Lab-2010
Hspice Tutorial
40
ARES Lab-2010
Hspice Tutorial
41
ARES Lab-2010
Hspice Tutorial
42
ARES Lab-2010
Hspice Tutorial
43
sp open edit NLspARES Lab-2010
Hspice Tutorial
44
Editing
ARES Lab-2010
Hspice Tutorial
45