Download presentation
Presentation is loading. Please wait.
Published byBridget Ferguson Modified over 8 years ago
1
ARES LAB S.-P. Yong Hspice Tutorial 2008 Professor: Jin-Fu Li TAs: 永昇平 & 盧星辰
2
ARESARES S.-P. Yong Contents IntroductionIntroduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix
3
ARESARES S.-P. YongIntroduction(1/2) IC Design Cell-BasedFull-Custom HspiceVerilog DSD VLSI Design … VLSI Design AIC …
4
ARESARES S.-P. YongIntroduction(2/2) SPICE : Simulation Program with Integrated Circuit Emphasis Hspice 是一個電路模擬軟體,用來模擬所設計電路的行 為及功能特性。 Hspice 係以電晶體、二極體、電阻及電容等各種元件模 型為基礎,透過數值方法來計算電路各節點的 電壓、電 流變化。 對於非線性的電路系統, Hspice 是在計算近似解, 所得 結果的正確性和元件模型、演算法則有密切關係。 Hspice 主要提供穩態、暫態及小信號頻率響應模擬 ,使 用者需依所設計的電路種類自行規劃分析的指令及相關的 輸入。
5
ARESARES S.-P. Yong Basic Flow for SPICE
6
ARESARES S.-P. Yong Contents Introduction Simulation Input and ControlsSimulation Input and Controls Waveform Instructions Simulation Output Appendix
7
ARESARES S.-P. Yong Instance and Element Names CCapacitor ICurrent LInductor MMOSFET RResistor VVoltage Source XSubcircuit Call ★
8
ARESARES S.-P. Yong Unit and Scale Factor Units: 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 20log 10
9
ARESARES S.-P. Yong 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 R1 A B 1K C1 out gnd 1p
10
ARESARES S.-P. YongSubcircuit.SUBCKT …… 次電路區塊描述.ENDS 如果要在 SPICE 檔案中呼叫次電路時,格式如下: Xname …….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 in vss vss nch w=Wn l=Lmin.ends inv xinv dout0 d0 inv Wn=0.22u Wp=0.22u Lmin=0.18u
11
ARESARES S.-P. Yong Example ***** inv *****.global vdd vss.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 x1 in 0 inv x2 0 out inv x1 in 1 inv x2 1 out inv innet1out in out 10
12
ARESARES S.-P. Yong Input Control Statement GLOBAL –ALL nodes are assumed to be local –Node names can across all subcircuits by.GLOBAL.GLOBAL VDD VSS
13
ARESARES S.-P. Yong Netlist Structure.Title inv.GLOBAL gnd! + vdd!.protect.lib ‘C:\VLSI\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.end Title Model Controls Sources Components END file
14
ARESARES S.-P. Yong 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.end 第一行是註解, 模擬時會忽略 製程資料,需指定好路徑 TT 為模擬環境 一定要有.end 才會進行模擬
15
ARESARES S.-P. Yong Control Statements.AC 電路之交流分析 ( 頻率響應 ).DC 電路之直流分析.OP 靜態點分析.NOISE 雜訊分析.TRAN 暫態分析.SUBCKT 定義次電路.ENDS 次電路之結束.OPTIONS 可設定參數及其他功能.PRINT 指定輸出的內容.PLOT 圖形式輸出.TEMP 指定模擬環境的溫度.END 檔案結束 ★
16
ARESARES S.-P. Yong Contents Introduction Simulation Input and Controls Waveform InstructionsWaveform Instructions Simulation Output Appendix
17
ARESARES S.-P. Yong Transient Sources Pulse (PULSE Function) Sinusoidal (SIN Function) Exponential (EXP Function) Piecewise Linear (PWL Function) Single-Frequency FM (SFFM Function) Single-Frequency AM (AM Function) ★ ★ ★
18
ARESARES S.-P. YongPULSE PULSE (Periodic Waveform) PULSE ( V1 V2 td tr tf pw per) PULSE ( 0V 5V 10ns 10ns10ns 40ns 100ns )
19
ARESARES S.-P. YongPWL PWL (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)
20
ARESARES S.-P. YongSIN SIN (Sinusoidal Waveform) SIN ( Voffset Vacmag ) Vin 3 0 SIN ( 0V 1V 100Meg 2ns 5e7 )
21
ARESARES S.-P. Yong Contents Introduction Simulation Input and Controls Waveform Instructions Simulation OutputSimulation Output Appendix
22
ARESARES S.-P. Yong 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 rise=2rise=1fall=4 val=‘”3.3*0.9” val=‘”3.3*0.1”
23
ARESARES S.-P. YongExample SP 檔 mt0 檔 Tr=6.738e-11 s Simulate
24
ARESARES S.-P. YongPower Command :.meas tran pwr avg power – 在暫態分析中,量測整個電路的平均功率消耗 – 結果顯示在 *.mt0 檔
25
ARESARES S.-P. Yong Contents Introduction Simulation Input and Controls Waveform Instructions Simulation Output AppendixAppendix
26
ARESARES S.-P. Yong Login Step 1 Step 2 Step 3
27
ARESARES S.-P. Yong Step 1 Step 2 提醒 : 密碼不會顯示在螢幕上
28
ARESARES S.-P. Yong Unix
29
ARESARES S.-P. Yong
30
ARESARES 提醒 : 滑鼠右鍵開啟 Menu 左鍵點選工具
31
ARESARES S.-P. Yong
32
ARESARES Vim Under unix shell –vim – start an empty file –vim filename – open a file to edit Save or quit file –:w xxx.x – save as xxx.x –:w – save the current file –:q – quit current file, discard any change –:q! – quit the current file, discard any change –:wq! – save and exit the current file
33
ARESARES S.-P. Yong Editing Under insert mode –a – append text after the cursor –A – append text at the end of the line –i – append text before the cursor –I – append text before the first non-blank in the line –o – open a new line below the current line –O – open a new line above the current line Esc – end insert mode, back to normal mode
34
ARESARES S.-P. Yong Deleting Text When you typed something wrong –Under normal mode –x – delete one character under the cursor (or Delete) –nx – delete n characters under the cursor –X – delete one character before the cursor –D – delete from the current cursor to the end of line –dd – delete one line –s – delete one character and enter insert mode –S – delete one line and move the cursor to the beginning of the line –cw – change a word
35
ARESARES S.-P. Yong Example
36
ARESARES S.-P. Yong Vim 按 i 開始編輯 如果打錯字,按 Esc 跳出編輯模式 再利用 x 鍵將錯字刪除
37
ARESARES S.-P. Yong Save 先按 Esc 跳出編輯模式 再利用 :w 指令儲存 離開 Vim 之指令為 :q
38
ARESARES S.-P. Yong Edit Spice File Set library path:.lib ‘/home/ms/spyong/sp_file/mm018.l’ TT 0.18u 製程 Lmin=0.18u Wmin=0.22u
39
ARESARES S.-P. Yong Example Replaces with:.lib ‘/home/ms/spyong/sp_file/mm018.l’ TT (ARES_SERVER)
40
ARESARES S.-P. Yong Compile
41
ARESARES S.-P. Yong Job Aborted
42
ARESARES S.-P. Yong Job Conculded
43
ARESARES S.-P. Yong verdi
44
ARESARES S.-P. Yong New Waveform
45
ARESARES S.-P. Yong Open File
46
ARESARES S.-P. Yong
47
ARESARES Waveform File(.tr0) Step 1 Step 2 Step 3
48
ARESARES S.-P. Yong Get Signals
49
ARESARES S.-P. Yong
50
ARESARES
51
ARESARES PC_Hspice 介面
52
ARESARES S.-P. Yong 建立一個新的 sp 檔案
53
ARESARES S.-P. Yong 英文路徑 英文檔名
54
ARESARES S.-P. Yong
55
ARESARES
56
ARESARES
57
ARESARES 以後直接複製 sp 檔,重新命名 為想要的檔名, open 後即可利 用 edit NL 去更改 sp 檔內容
58
ARESARES S.-P. YongEditing
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.