Hspice Tutorial 2008 Professor JinFu Li TAs ARES

  • Slides: 58
Download presentation
Hspice Tutorial 2008 Professor: Jin-Fu Li TAs: 永昇平 & 盧星辰 ARES LAB S. -P.

Hspice Tutorial 2008 Professor: Jin-Fu Li TAs: 永昇平 & 盧星辰 ARES LAB S. -P. Yong

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix S. -P. Yong ARES

Introduction(1/2) IC Design Verilog Cell-Based S. -P. Yong Hspice Full-Custom DSD VLSI Design AIC

Introduction(1/2) IC Design Verilog Cell-Based S. -P. Yong Hspice Full-Custom DSD VLSI Design AIC … … ARES

Basic Flow for SPICE S. -P. Yong ARES

Basic Flow for SPICE S. -P. Yong ARES

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix S. -P. Yong ARES

Instance and Element Names ★ S. -P. Yong C Capacitor I Current L Inductor

Instance and Element Names ★ S. -P. Yong C Capacitor I Current L Inductor M MOSFET R Resistor V Voltage Source X Subcircuit Call ARES

Unit and Scale Factor • Units: R Ohm (e. g. R 1 node 2

Unit and Scale Factor • Units: R Ohm (e. g. R 1 node 2 1 K) L Henry (e. g. L 1 node 2 1 n) C Farad (e. g. C 1 node 2 1 p) • Scale Factors: F 1 e-15 T 1 e 12 P 1 e-12 K 1 e 3 N 1 e-9 Meg 1 e 6 U 1 e-6 G 1 e 9 M 1 e-3 DB 20 log 10 S. -P. Yong ARES

Instance and Element Descriptions Mname D G S B N/PMOS W=? u L=? u

Instance and Element Descriptions Mname D G S B N/PMOS W=? u L=? u Mp out in vdd pch R 1 A W=3 u L=1 u B 1 K C 1 out gnd 1 p S. -P. Yong ARES

Subcircuit. SUBCKT <Subname> <node 1> <node 2>…… 次電路區塊描述. ENDS <Subname>. subckt inv out in

Subcircuit. SUBCKT <Subname> <node 1> <node 2>…… 次電路區塊描述. ENDS <Subname>. subckt inv out in Wn=0. 22 u Wp=0. 22 u Lmin=0. 18 u mp 0 out in vdd pch w=Wp l=Lmin mn 0 out in vss nch w=Wn l=Lmin. ends inv 如果要在SPICE檔案中呼叫次電路時,格式如下: Xname <node 1> <node 2>…… <Subname> xinv dout 0 d 0 inv Wn=0. 22 u Wp=0. 22 u Lmin=0. 18 u S. -P. Yong ARES

Example ***** inv *****. global vdd vss. subckt inv in out MM 0 out

Example ***** inv *****. global vdd vss. subckt inv in out MM 0 out in vdd pch w=3 u l=350 n MM 1 out in vss nch w=1 u l=350 n. ENDS x 1 in net 1 inv x 2 net 1 out inv in x 1 inv x 2 1 out inv in S. -P. Yong 1 net 1 out x 1 in 0 inv x 2 0 out inv out in 0 out ARES

Input Control Statement • GLOBAL – ALL nodes are assumed to be local –

Input Control Statement • GLOBAL – ALL nodes are assumed to be local – Node names can across all subcircuits by. GLOBAL VDD VSS S. -P. Yong ARES

Netlist Structure Title Model Controls Sources Components END file S. -P. Yong . Title

Netlist Structure Title Model Controls Sources Components END file S. -P. Yong . Title inv. GLOBAL gnd! + vdd!. protect. lib ‘C: VLSImm 0355 v. l' TT. unprotect. options post. tran 0. 05 n 25 n. temp 25 v 1 vdd! 0 3. 3 v v 2 gnd! 0 0 v v 3 Vin 0 pulse( 0 v 3. 3 v 0. 1 n 0. 5 n 1. 2 n) MM 1 Vout Vin vdd! Pch W=3 u L=350. 00 n MM 0 Vout Vin gnd! Nch W=1 u L=350. 00 n. end ARES

Example ******inverter*******. GLOBAL gnd! + vdd!. protect. lib 'e: tempmm 0355 v. l' TT.

Example ******inverter*******. GLOBAL gnd! + vdd!. protect. lib 'e: tempmm 0355 v. l' TT. unprotect. options post. tran 0. 05 n 25 n. temp 25 v 1 vdd! 0 3. 3 v v 2 gnd! 0 0 v v 3 Vin 0 pulse( 0 v 3. 3 v 0. 1 n 0. 5 n 1. 2 n) MM 1 Vout Vin vdd! Pch W=3 u L=350. 00 n MM 0 Vout Vin gnd! Nch W=1 u L=350. 00 n. end S. -P. Yong 第一行是註解, 模擬時會忽略 製程資料,需指定好路徑 TT為模擬環境 一定要有. end才會進行模擬 ARES

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix S. -P. Yong ARES

Transient Sources Pulse (PULSE Function) ★ Sinusoidal (SIN Function) Exponential (EXP Function) ★ Piecewise

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) ★ S. -P. Yong ARES

PULSE • PULSE (Periodic Waveform) PULSE ( V 1 V 2 td tr tf

PULSE • PULSE (Periodic Waveform) PULSE ( V 1 V 2 td tr tf pw per) PULSE ( 0 V 5 V 10 ns 40 ns 100 ns ) S. -P. Yong ARES

PWL • PWL (Piece Wise Linear Waveform) PWL ( t 1 V 1 t

PWL • PWL (Piece Wise Linear Waveform) PWL ( t 1 V 1 t 2 V 2 t 3 V 3 … R) PWL (1 n 0 v 2 n 0 v 3 n 3. 3 v 8 n 3. 3 v 9 n 0 v R 0) S. -P. Yong ARES

SIN • SIN (Sinusoidal Waveform) SIN ( Voffset Vacmag < Freq Tdelay Dfactor >

SIN • SIN (Sinusoidal Waveform) SIN ( Voffset Vacmag < Freq Tdelay Dfactor > ) Vin 3 0 SIN ( 0 V 1 V 100 Meg 2 ns 5 e 7 ) S. -P. Yong ARES

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix S. -P. Yong ARES

Timing Measurement. meas tran Tr trig v(out) val=“ 3. 3*0. 1” rise=2 targ v(out)

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” S. -P. Yong rise=1 rise=2 fall=4 ARES

Example SP檔 mt 0檔 Simulate Tr=6. 738 e-11 s S. -P. Yong ARES

Example SP檔 mt 0檔 Simulate Tr=6. 738 e-11 s S. -P. Yong ARES

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix

Contents • • • Introduction Simulation Input and Controls Waveform Instructions Simulation Output Appendix S. -P. Yong ARES

Login Step 2 Step 3 Step 1 S. -P. Yong ARES

Login Step 2 Step 3 Step 1 S. -P. Yong ARES

Unix S. -P. Yong ARES

Unix S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

Vim • Under unix shell – vim – start an empty file – vim

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 S. -P. Yong ARES

Editing • Under insert mode – append text after the cursor – A –

Editing • Under insert mode – 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 – 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 S. -P. Yong ARES

Deleting Text • When you typed something wrong – Under normal mode – x

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 S. -P. Yong ARES

Example S. -P. Yong ARES

Example S. -P. Yong ARES

Edit Spice File • Set library path: • . lib ‘/home/ms/spyong/sp_file/mm 018. l’ TT

Edit Spice File • Set library path: • . lib ‘/home/ms/spyong/sp_file/mm 018. l’ TT • 0. 18 u製程 • Lmin=0. 18 u • Wmin=0. 22 u S. -P. Yong ARES

Example Replaces with: . lib ‘/home/ms/spyong/sp_file/mm 018. l’ TT (ARES_SERVER) S. -P. Yong ARES

Example Replaces with: . lib ‘/home/ms/spyong/sp_file/mm 018. l’ TT (ARES_SERVER) S. -P. Yong ARES

Compile S. -P. Yong ARES

Compile S. -P. Yong ARES

Job Aborted S. -P. Yong ARES

Job Aborted S. -P. Yong ARES

Job Conculded S. -P. Yong ARES

Job Conculded S. -P. Yong ARES

verdi S. -P. Yong ARES

verdi S. -P. Yong ARES

New Waveform S. -P. Yong ARES

New Waveform S. -P. Yong ARES

Open File S. -P. Yong ARES

Open File S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

Waveform File(. tr 0) Step 2 Step 1 Step 3 S. -P. Yong ARES

Waveform File(. tr 0) Step 2 Step 1 Step 3 S. -P. Yong ARES

Get Signals S. -P. Yong ARES

Get Signals S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

PC_Hspice 介面 S. -P. Yong ARES

PC_Hspice 介面 S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

S. -P. Yong ARES

Editing S. -P. Yong ARES

Editing S. -P. Yong ARES