SPICE Simulation Program with Integrated Circuit Emphasis References: [1] CIC SPICE training manual [3] SPICE manual [2] DIC textbook Sep. 25, 2004 1
SPICE: Introduction Simulation Program with Integrated Circuit Emphasis Developed by University of California at Berkeley A CAD tools to simulate circuits in steady-state, transient, and frequency domains. SBTSPICE, HSPICE, TSPICE, PSIPCE 2
HSPICE Simulation Flow Reference: CIC SPICE training manual 3
MOS SPICE Model LEVEL 1: Based on square law Long-Channel devices LEVEL 2: Velocity saturation Mobility degradation Drain-induced barrier lowering (DIBL) LEVEL 3: Semi-empirical model 4
MOS SPICE Model (cont.) BSIM3V3: Berkeley Short-Channel IGFET Model LEVEL 49 Over 200 parameters to model the 2nd-order effect 5
Netlist Structure Depend on spice model Circuit structure 6
Instance and Element Names C D E, F, G, H I J K L M Q R O, T, U V X Capacitor Diode Dependent Current and Voltage control source Current Source JFET or MESFET Mutual Inductor Scale Factors Inductor MOSFET f 1e-15 k 1e3 BJT p 1e-12 meg 1e6 Resistor n 1e-9 g 1e9 Transmission Line Voltage Source u 1e-6 T 1e12 Subcircuit Call m 1e-3 7
Device Description R1 A B 1k C1 C D 1p M1 D G S B nch l=1u w=3u +AD=3p PD=5u AS=3p PS=5u + NRS=1 NRD=1 8
Subcircuit Description and Recall Description (Ex: a inverter).subckt inv in out mp1 out in vdd vdd pch l=1u w=3u mn1 out in 0 0 nch l=1u w=1u.ends inv Recall x1 a b inv x2 c d inv 9
DC Analysis Type DC sweep & DC small signal anysis.dc sweep for power supply, temp., param...op specify time (s) at which operating point is to be calculated..tf calculate DC small-signal transfer function..pz performs pole/zero analysis Example:.dc vin 0 5 0.25 10
AC Analysis Type AC sweep & small signal analysis.ac calculate frequency-domain response.noise noise analysis Example:.ac dec 10 1k 100meg sweep Rl dec 2 5k 15k 11
Transient Analysis Type.tran calculate time-domain response.four fourier analysis.fft fast fourier transform Example:. tran 1n 100n 12
Pulse Voltage and Current Source Vin in 0 pulse (0V 5V 10ns 10ns 10ns 40ns 100ns) Sinusoidal Vin in 0 sin (0V 1V 100Meg 2ns 5e7) Piecewise Linear Source Vin in 0 pwl (60n 0V, 120n 0V, 130n 5V, 170n 5V +180n 0V, R 0) 13
Input control Statements.data.tran 1 n 100n sweep data=d1.data D1 width Length VDD Cap 10u 100u 2V 5p 50u 600u 10V 10p 50u 600u 10V 10p...enddata.alter.del lib XXX.lib TT.lib XXX.lib FF.alter.temp -50 0 50 Rl 1 2 1k.param Wval=100u.end 14
.option list Output Format produces an element summary listing of the data to be printed..option node prints a node connection table..option acct reports job accounting and run-time statistics at the end of output listing..option opts prints the current settings of all control options..option nomod suppress the printout of model parameters. 15
Output Statement.print print numeric analysis results.probe allows save output variables only into the graph data files.meas print numeric results of measured specifications Example:.print Vdb(vout) V(node) par( V(out)/V(in) ).meas tran tprop trig V(in) val=2.5 rise=1 targ V(out) val=2.5 fall=1 xxx.ms# xxx.ma# xxx.mt# 16
Simulation step 17
AvanWaves (1) 18
AvanWaves (2) 19
AvanWaves (3) 20
AvanWaves (4) 21
AvanWaves (5) 22
AvanWaves (6) 23
Design Example Output buffer (inverter) Supply voltage 2.5 V VDD Output load 10 pf Operation frequency 500 MHz Rise time and fall time < 0.2 nsec Used the 1.2 µm CMOS process Vin Vout C L 24
Design Example (cont.) NMOS C V OX th0 = 1.75 10 = 0.74 V 7 2 cm V µ 0 = 656 sec 1 T = = 2 nsec 500 MHz T tf = 2.2τ = 0.1 = 0.1 nsec 2 τ = R C = 0.04545 nsec on L F cm 2 R I on Dsat W L W L 3 VDD = 4.5445 4 IDsat = 412.6 ma nmos nmos = = 2320.5556 2785 µ 1.2 µ 25
Design Example (cont.) ***** IO *****.MODEL NMOS NMOS LEVEL=2 LD=0.15U TOX=200.0E-10 VTO=0.74 KP=8.0E-05 + NSUB=5.37E+15 GAMMA=0.54 PHI=0.6 U0=656 UEXP=0.157 UCRIT=31444 + DELTA=2.34 VMAX=55261 XJ=0.25U LAMBDA=0.037 NFS=1E+12 NEFF=1.001 + NSS=1E+11 TPG=1.0 RSH=70.00 PB=0.58 + CGDO=3.4E-10 CGSO=4.3E-10 CJ=0.0003 MJ=0.66 CJSW=8.0E-10 MJSW=0.24.MODEL PMOS PMOS LEVEL=2 LD=0.15U TOX=200.0E-10 VTO=-0.74 KP=2.70E-05 + NSUB=4.33E+15 GAMMA=0.58 PHI=0.6 U0=262 UEXP=0.324 UCRIT=65720 + DELTA=1.79 VMAX=25694 XJ=0.25U LAMBDA=0.061 NFS=1E+12 NEFF=1.001 + NSS=1E+11 TPG=-1.0 RSH=121 PB=0.64 + CGDO=4.3E-10 CGSO=4.3E-10 CJ=0.0005 MJ=0.51 CJSW=1.35E-10 MJSW=0.24 26
Design Example (cont.).temp 25 M0 Vout Vin VDD VDD pmos w=94u L=1.2u m=90 M1 Vout Vin 0 0 nmos W=94u L=1.2u m=30 Cl vout 0 10pF VDD VDD 0 2.5V Vin Vin 0 pulse(0 2.5 1n 0.1n 0.1n 0.9n 2n).op.option post.tran 1n 30n.probe V(vout).meas tran tr trig V(vout) val=0.25 rise=2 targ V(vout) val=2.25 rise=2.meas tran tf trig V(vout) val=2.25 fall=2 targ V(vout) val=0.25 fall=2.meas tran rms_power RMS power.end 27
Design Example (cont.) Clock feedthrough 28