Hspice Tutorial
Hspice Tutorial
SPICE Overview
Course Objectives
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-2
Chip Implementation Center
SPICE 1. SPICE Overview
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-4
Chip Implementation Center
SPICE 1. SPICE Overview
Circuit/System Design :
A procedure to construct a physical structure which is based on
a set of basic component, and the constructed structure will
provide a desired function at specified time/ time interval under a
given working condition.
Foundry
Manufacturing
?
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-5
Chip Implementation Center
SPICE 1. SPICE Overview
gain
Behavior
V
Electrical characteristic f
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-6
Chip Implementation Center
SPICE 1. SPICE Overview
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-7
Chip Implementation Center
SPICE 1. SPICE Overview
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-8
Chip Implementation Center
SPICE 1. SPICE Overview
Load Linearized
conductance into matrix
No
Convergence
Yes
Source : SBT training manual
Transient solution procedure
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-9
Chip Implementation Center
SPICE 1. SPICE Overview
No
End of time interval
Yes
Yes
Source : SBT training manual Stop
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-10
Chip Implementation Center
SPICE 1. SPICE Overview
SPICE 之外所需的基本概念
了解元件的基本特性
熟悉所設計電路的功能
了解需要驗證的電路規格及對應的模擬種類及電路組態
了解電路的輸入信號特性
了解電路各項規格的相依性及優先程度
了解電路元件參數與架構對各項電路特性的相關性,以利
模擬結果的改進
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-11
Chip Implementation Center
SPICE 1. SPICE Overview
(8). Basic Flow
for SPICE 基本電路架構
設定工作條件 製程條件、工作電壓、溫度、負載
選擇分析種類及輸入訊號型態 OP/DC/TRAN/AC
建立模擬電路組態
選擇觀察輸出及測量參數 .probe/measurement
執行模擬程式
否
變更電路元件參數 滿足規格?
是
是 否
其他規格? 結束
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
1-12
Chip Implementation Center
SPICE 2. Simulation Input and Controls
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-1
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-2
Chip Implementation Center
SPICE 2. Simulation Input and Controls
Command Input
hspice -i demo.sp
Graph
GraphTools
Tools
awaves
awaves
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-3
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-4
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-6
Chip Implementation Center
SPICE 2. Simulation Input and Controls
Scale Factors :
F 1e-15 K 1e3 Examples:
P 1e-12 Meg 1e6 1pF
N 1e-19 G 1e9 1nH
U 1e-6 T 1e12 10Meg Hz
M 1e-3 DB 20log10 vdb(v3)
Circuit Topology
Models
Elements Statement
Parameter Values
Options
Analysis Variables, etc.
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-9
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-10
Chip Implementation Center
SPICE 2. Simulation Input and Controls
CANNOT Include:
.PRINT, .PLOT, .GRAPH, or any I/O Statements
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-11
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-12
Chip Implementation Center
SPICE 2. Simulation Input and Controls
Example 3:
.TEMP 100
D1 n1 n2 DMOD DTEMP=30 $ D1 simulated at 130 oC HSPICE : DTEMP
D2 n3 n4 DMOD $ D2 simulated at 100 oC SBTSPICE : TEMP
R1 n5 n6 1K
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-13
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-14
Chip Implementation Center
SPICE 2. Simulation Input and Controls
.INCLUDE ‘$installdir/parts/ad’
.LIB Definition and Call Statement File reference and Corner selection
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-16
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-17
Chip Implementation Center
SPICE 2. Simulation Input and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
2-18
Chip Implementation Center
SPICE 2. Simulation Input and Controls
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-1
Chip Implementation Center
SPICE 3. Sources and Stimuli
Source types
1. 固定值獨立電源
提供固定偏壓或固定驅動電流
2. 時變/頻變 獨立電源
提供變動的電壓或電流輸入,㆒般供輸入信號用
3. 時變/頻變 壓控/源控 相依電源
提供可控制的電壓或電流源,㆒般供建立模型用
壓控電壓源(VCVS)
壓控電流源(VCCS)
流控電壓源(CCVS)
流控電流源(CCCS)
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-2
Chip Implementation Center
SPICE 3. Sources and Stimuli
V1 1 0 DC=5V V4 4 0 AC=10V, 90
V2 2 0 5V V5 5 0 AC 1.0 180
I3 3 0 5mA *AC or Freq. Response Provide Impulse Response
V6 6 0 5V AC=1V, 90
V7 7 0 0.5V AC 1.0 SIN (0 1 1Meg)
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-3
Chip Implementation Center
SPICE 3. Sources and Stimuli
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-4
Chip Implementation Center
SPICE 3. Sources and Stimuli
Example :
7
5
Vin (V)
3
1
-1
0 10 20 30 40 50 60 70 80 90 100 110 120 130
-3
Time (ns)
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-5
Chip Implementation Center
SPICE 3. Sources and Stimuli
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-6
Chip Implementation Center
SPICE 3. Sources and Stimuli
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-7
Chip Implementation Center
SPICE 3. Sources and Stimuli
.VEC ` digital_vector_file`
$ The digital vector file consists of three parts:
• Vector Pattern Definition
• Waveform Characteristics
• Tabular Data
Digital Vector File Example :
; Vector Pattern
Radix 1 2 3 44
vname v1 va[[1:0]] vb[3:1] vc[8:1]
io i i i oo
tunit ns
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-8
Chip Implementation Center
SPICE 3. Sources and Stimuli
; Waveform Characteristics
slope 1.2
trise 0.2 1 3 7 FF
tfall 0.5 1 3 7 FF
tdealy 0.5 1 3 7 FF
vih 3.3 1 3 7 FF
vil 0.0 0 0 0 00
; Tabular Data
period 10
1 0 2 45
1 3 7 FF
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-9
Chip Implementation Center
SPICE 3. Sources and Stimuli
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
3-10
Chip Implementation Center
SPICE 4. Analysis Types
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-1
Chip Implementation Center
SPICE 4. Analysis Types
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-2
Chip Implementation Center
SPICE 4. Analysis Types
.OP Statement :
.OP Print out :(1). Node Voltages; (2). Source Currents; (3). Power
Dissipation; (4). Semiconductors Device Currents, Conductance,
Capacitance
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-3
Chip Implementation Center
SPICE 4. Analysis Types
(3). Analysis Types : DC Sweep & DC Small Signal Analysis
DC Analysis Statements :
.DC : Sweep for Power Supply, Temp., Param., & Transfer Curves
.OP : Specify Time(s) at which Operating Point is to be Calculated
.TF : Calculate DC Small-Signal Transfer Function (.OP is not Required)
Examples :
.DC VIN 0.25 5.0 0.25
.DC VDS 0 10 0.5 VGS 0 5 1
.DC TEMP -55 125 10
.DC TEMP POI 5 0 30 50 100 125
.DC xval 1k 10k 0.5k SWEEP TEMP LIN 5 25 125
.DC DATA=datanm SWEEP par1 DEC 10 1k 100k
.DC par1 DEC 10 1k 100k SWEEP DATA=datanm
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-5
Chip Implementation Center
SPICE 4. Analysis Types
Optimization
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-6
Chip Implementation Center
SPICE 4. Analysis Types
Examples :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-7
Chip Implementation Center
SPICE 4. Analysis Types
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-8
Chip Implementation Center
SPICE 4. Analysis Types
Optimization
.Param Parameter
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-9
Chip Implementation Center
SPICE 4. Analysis Types
.TRAN tincr1 tstop1 < tincr2 tstop2 ..... > < START=val>
.TRAN tincr1 tstop1 < tincr2 tstop2 ..... > < START=val> UIC <SWEEP..>
Examples :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-10
Chip Implementation Center
SPICE 4. Analysis Types
.FFT Statement :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
4-11
Chip Implementation Center
SPICE 5. Simulation Output and Controls
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-1
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-2
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-3
Chip Implementation Center
SPICE 5. Simulation Output and Controls
Output Variables:
DC and Transient Analysis : Displays Individual Voltage, Current, & Power
AC Analysis : Display Real & Imag. Components of Voltage & Current.....
Element Template Analysis : Display Element-Specific Voltage, Current.....
.MEASURE : Display User-Defined Variables Defined in .MEAS Statement
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-4
Chip Implementation Center
SPICE 5. Simulation Output and Controls
AC Analysis :
AC : V(2), VI(3), VM(5,7), VDB(OUT), IP(9), IP4(M4) R : Real
Element Template : I : Imaginary
@x1.mn1[vth] M : Magnitude
P : Phase
@x1.mn1[gds]
DB : Decibels
@x1.mn1[gm],@x1.mn1[gbs],@x1.mn1[cgd]
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-5
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-6
Chip Implementation Center
SPICE 5. Simulation Output and Controls
Built-In Functions :
sin(x) cos(x) tan(x) asin(x) acos(x) atan(x) sinh(x) tanh(x) abs(x)
sqrt(x) log(x) log10(x) exp(x) db(x) min(x,y) max(x,y) power(x,y)...
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-7
Chip Implementation Center
SPICE 5. Simulation Output and Controls
Examples :
.PRINT TRAN V(4) V(X3.3) P(M1) P(VIN) POWER PAR(‘V(OUT)/V(IN)’)
.PRINT AC VM(4,2) VP(6) VDB(3)
.PRINT AC INOISE ONOISE VM(OUT) HD3
.PRINT DISTO HD3 HD3(R) SIM2
.PLOT DC V(2) I(VSRC) V(37,29) I1(M7) BETA=PAR(‘I1(Q1)/I2(Q1)’)
.PLOT AC ZIN YOUT(P) S11(DB) S12(M) Z11(R)
.PLOT TRAN V(5,3) (2,5) V(8) I(VIN)
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-8
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-9
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-10
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-11
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-12
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-13
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-14
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-15
Chip Implementation Center
SPICE 5. Simulation Output and Controls
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
5-16
Chip Implementation Center
SPICE 6. Elements & Device Models
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-1
Chip Implementation Center
SPICE 6. Elements & Device Models
Netlist Rxxx, n1,n2, mname, rval Cxxx, n1,n2, mname, cval Lxxx, n1,n2, mname, lval Kxxx, Lyyy, Lzzz, kval
Temperature DTEMP, TC1, TC2 DTEMP, TC1, TC2 DTEMP, TC1, TC2
Parasitics C R
Examples :
R1 12 17 1K TC1=1.3e-3 TC2=-3.1e-7
C2 7 8 0.6pf IC=5V
LSHUNT 23 51 10UH 0.01 1 IC=15.7mA
K4 Laa Lbb 0.9999
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-3
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-4
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-5
Chip Implementation Center
SPICE 6. Elements & Device Models
.OPTIONS SCALE=1e-6
M1 24 2 0 20 MODN L=5 W=100 M=4
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-6
Chip Implementation Center
SPICE 6. Elements & Device Models
Corner_LIB of Models:
.LIB TT or (FF|SS|FS|SF) .LIB MOS
.param toxn=0.0141 toxp=0.0148...... .MODEL NMOD NMOS (LEVEL=49
.lib ‘~/simulation/model/cmos.l’ MOS + TOXM=toxn LD=3.4e-8 , ......)
.ENDL TT or (FF|SS|FS|SF) .ENDL MOS
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-7
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-8
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-11
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-13
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-14
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-15
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-16
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-17
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-18
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-19
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-20
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-21
Chip Implementation Center
SPICE 6. Elements & Device Models
(13). MOSFET Transistor Basics : Transfer Characteristics
Transfer Characteristics of NMOS :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-23
Chip Implementation Center
SPICE 6. Elements & Device Models
(14). MOSFET Transistor Basics : SPICE Parameters(Cont.)
Normal SPICE Model Parameters(Cont.) :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-24
Chip Implementation Center
SPICE 6. Elements & Device Models
(15). MOSFET Transistor Basics : Higher-Order Effects
Geometry and Doping Effects on Vth :
Short Channel Effect (Small L)
Narrow Channel Effect (Small W)
Non-Uniform Doping Effect
Physical Effects on Output Resistance :
Channel Length Modulation (CLM)
Drain Induced Barrier Lowering (DIBL)
Substrate Current Induced Body Effects (SCBE)
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-25
Chip Implementation Center
SPICE 6. Elements & Device Models
First Generation :
“Physical” Analytical Models
Geometry Coded into the Model Equations
Level 1, Level 2, & Level 3
Second Generation :
Shift in Emphasis to Circuit Simulation
Extensive Mathematical Conditioning
Individual Device Parameters & Separate Geometry Parameter
Shift “Action” to Parameter Extraction (Quality of Final Model is Heavily
Dependent on Parameter Extraction)
BSIM1, Modified BSIM1, BSIM2
Source : IEEE 1997 CICC Educational Sessions E3.3
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-26
Chip Implementation Center
SPICE 6. Elements & Device Models
Third Generation :
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-27
Chip Implementation Center
SPICE 6. Elements & Device Models
(17). Overview of Most Popular MOSFET Models :
UCB Level 1 : (Level = 1)
Shichman-Hodges Model (1968)
Simple Physical Model, Applicable to L> 10um with Uniform Doping
Not Precise Enough for Accurate Simulation
Use only for Quick, Approximate Analysis of Circuit Performance
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-28
Chip Implementation Center
SPICE 6. Elements & Device Models
(17). Overview of Most Popular MOSFET Models(Cont.) :
UCB Level 3 : (Level = 3)
Semi-Empirical Model Model (1979)
Applicable to Long Channel Device (~ 2um)
Includes Some New Physical Effects (DIBL, Mobility Degradation by
Lateral Field)
Very successful Model for Digital Design (Simple & Relatively Efficient)
BSIM : (Level = 13)
First of the “Second Generation” Model (1985)
Applicable to Short Channel Device with L~ 1.0um
Emphasis on Mathematical Conditioning of Circuit Simulation
Empirical Approach to Small Geometry Effects
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-31
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-32
Chip Implementation Center
SPICE 6. Elements & Device Models
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
6-33
Chip Implementation Center
SPICE 7. Optimization
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
7-1
Chip Implementation Center
SPICE 7. Optimization
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
7-2
Chip Implementation Center
SPICE 7. Optimization
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
7-3
Chip Implementation Center
SPICE 7. Optimization
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
7-4
Chip Implementation Center
SPICE 7. Optimization
.lib “ls35_4_1.l” tt
.option post probe Specify parameter range
.param Cload =10p
.param Tpw=opt1(0, 0, 15n)
.model optmod opt method=passfail
Analysis type and
.tran 0.1n 20n sweep optimize=opt1
optimization algorithm
+ result = Tprop
+ model = optmod
.measure Tran Tprop Trig V(in) Val=2.5 Rise = 1 Optimization goal by
+ Targ v(out) Val=2.5 Fall = 1 measure command
vcc 1 0 5
vin in 0 pulse(0 5 1n 1n 1n Tpw 20n)
....
.end
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
7-5
Chip Implementation Center
SPICE 8. Control Options & Convergence
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-1
Chip Implementation Center
SPICE 8. Control Options & Convergence
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-4
Chip Implementation Center
SPICE 8. Control Options & Convergence
Use MOS ACM=1, ACM=2, or ACM=3 Source and Drain Diode Calculation
to Automatically Generate Parasitics.
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-6
Chip Implementation Center
SPICE 8. Control Options & Convergence
(4).Steps for Solving DC Operating Point NonConvergence
(Cont.)
(3). General Remarks (Cont.):
Open Loop OP Amp have High Gain, which can Lead to Difficulties in
Converging. ==> Start OP Amp in Unity-Gain Configuration and Open
them Up in Transient Analysis with a Voltage-Variable Resistor or a
Resistor with a Large AC Value for AC Analysis.
(4). Check Your Options :
Remove All Convergence-Related Options and Try First with No Special
Options Setting.
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-7
Chip Implementation Center
SPICE 8. Control Options & Convergence
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-9
Chip Implementation Center
SPICE 8. Control Options & Convergence
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
8-11
Chip Implementation Center
SPICE 9. Graphic Tools
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-1
Chip Implementation Center
SPICE 9. Graphic Tools
The waveform tool define its own color table, the color table may
conflict with other programs, so some colors in waveform window
might not be visible, quit other application
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-2
Chip Implementation Center
SPICE 9. Graphic Tools
(2).SBTPLOT
Environment setup
source /usr/sbt/sbt.cshrc
sbtplot
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-3
Chip Implementation Center
SPICE 9. Graphic Tools
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-4
Chip Implementation Center
SPICE 9. Graphic Tools
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-5
Chip Implementation Center
SPICE 9. Graphic Tools
(5).Waveform
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-6
Chip Implementation Center
SPICE 9. Graphic Tools
HSPICE 模擬波形觀測介面-awaves簡介
• HSPICE 係模擬程式,模擬結果依選項揩示存於檔案㆗。
• 原波形界面 gsi 及 hsplot 已由 awaves(avanwaves)取代,98.4版
㆗不提供此兩者之執行檔。
• Gsi 仍可使用awaves 之license
• awaves係視窗程式,需在Xwindow環境㆘使用。
• 在輸入netlist檔㆗需指定graphic輸出,hspice才會儲存waveform
資料,即加入 .option post 的指令項
• 99.4版的輸出資料,gsi無法接受,需於netlist 檔㆗加入 .option
post_version-9007 的指令項
• 執行awaves 之指令
/usr/meta/cur/bin/awaves
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-7
Chip Implementation Center
SPICE 9. Graphic Tools
Data names
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-8
Chip Implementation Center
SPICE 9. Graphic Tools
To path
File type to list
Cd ..
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-9
Chip Implementation Center
SPICE 9. Graphic Tools
Design name
Analysis type
in design
Set X axis
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-10
Chip Implementation Center
SPICE 9. Graphic Tools
Awaves - Measurement
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-11
Chip Implementation Center
SPICE 9. Graphic Tools
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-12
Chip Implementation Center
SPICE 9. Graphic Tools
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-13
Chip Implementation Center
SPICE 9. Graphic Tools
Awaves - Expressions
Expressions provide capability for data calculation
Can use drag&drop to type expression
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
9-14
Chip Implementation Center
SPICE 10. Application Demo
Contents
1. SPICE Overview
2. Simulation Input and Controls
3. Sources and Stimuli
4. Analysis Types
5. Simulation Output and Controls
6. Elements and Device Models
7. Optimization
8. Control Options & Convergence
9. Graphic Tools
10. Applications Demonstration
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
10-1
Chip Implementation Center
SPICE 10. Application Demo
5 CL
M8 M7
Vbias M5
vss
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
10-2
Chip Implementation Center
SPICE 10. Application Demo
(2). Netlist
* Feedback CAP
*Two stage OP design Cc vout 4 0.44pF
.lib ”9905spice.model" mos_tt Cl vout 0 4pF
.option post nomod Ibias vdd vbias 8.8u
.TEMP 27
* Netlist information * Voltage sourses
M1 3 1 5 0 nmos L=2u W=8u AS=18p AD=18p vdd vdd 0 5v
+ PS=18u PD=18u vss vss 0 0v
M2 4 2 5 0 nmos L=2u W=8u AS=18p AD=18p
+ PS=18u PD=18u
M3 3 3 vdd vdd pmos L=10u W=10u AS=12p AD=12p PS=16u PD=16u
M4 4 3 vdd vdd pmos L=10u W=10u AS=12p AD=12p PS=16u PD=16u
M5 5 vbias vss vss nmos L=2u W=7u AS=49p AD=49p PS=26u PD=26u
M6 vout 4 vdd vdd pmos L=2u W=70u AS=490p AD=490p PS=150u PD=150u
M7 vout vbias vss vss nmos L=2u W=130u AS=930p AD=930p
+ PS=260u PD=260u
M8 vbias vbias vss vss nmos L=2u W=7u AS=49p AD=49p PS=26u PD=26u
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
10-3
Chip Implementation Center
SPICE 10. Application Demo
vin2 2 0 2.5v
vin1 1 0 DC 2.5v AC 1
*.OP
* AC Analysis function
.ac dec 10 10 100MEG
.probe ac vdb(vout)
+ vp(vout) vdb(4) vp(4)
.meas ac Unit_gain
+ when vdb(vout)=0
.meas ac phase_mar
+ FIND vp(vout) when vdb(vout)=0
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
10-4
Chip Implementation Center
SPICE 10. Application Demo
vin2
+ Vout
-
國家科學委員會
CIC 晶片設計製作㆗心
National Science Council
10-5
Chip Implementation Center