simulation program with integrated circuit emphasismdker/courses/dic2005/spice.pdf · –simulation...

Post on 26-Feb-2020

7 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1Nanoelectronics and Gigascale Systems Laboratory, NCTU

SPICESimulation Program with Integrated Circuit Emphasis

Sep. 25, 2004

References: [1] CIC SPICE training manual[3] SPICE manual[2] DIC textbook

2Nanoelectronics and Gigascale Systems Laboratory, NCTU

Introduction

• SPICE: – 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

3Nanoelectronics and Gigascale Systems Laboratory, NCTU

HSPICE Simulation Flow

Reference: CIC SPICE training manual

4Nanoelectronics and Gigascale Systems Laboratory, NCTU

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

5Nanoelectronics and Gigascale Systems Laboratory, NCTU

MOS SPICE Model (cont.)• BSIM3V3:

– Berkeley Short-Channel IGFET Model– LEVEL 49– Over 200 parameters to model the 2nd-order

effect

6Nanoelectronics and Gigascale Systems Laboratory, NCTU

Netlist Structure

Depend on spice model

Circuit structure

7Nanoelectronics and Gigascale Systems Laboratory, NCTU

Instance and Element NamesCDE, F, G, HIJKLMQRO, T, UVX

CapacitorDiodeDependent Current and Voltage control sourceCurrent SourceJFET or MESFETMutual InductorInductorMOSFETBJTResistorTransmission LineVoltage SourceSubcircuit Call

Scale Factors

f 1e-15 k 1e3

p 1e-12 meg 1e6

n 1e-9 g 1e9

u 1e-6 T 1e12

m 1e-3

8Nanoelectronics and Gigascale Systems Laboratory, NCTU

Device DescriptionR1 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

9Nanoelectronics and Gigascale Systems Laboratory, NCTU

Subcircuit Description and Recall

• Description (Ex: a inverter).subckt inv in outmp1 out in vdd vdd pch l=1u w=3umn1 out in 0 0 nch l=1u w=1u.ends inv

• Recallx1 a b invx2 c d inv

10Nanoelectronics and Gigascale Systems Laboratory, NCTU

DC Analysis TypeDC 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

11Nanoelectronics and Gigascale Systems Laboratory, NCTU

AC Analysis TypeAC sweep & small signal analysis.ac calculate frequency-domain response.noise noise analysis

Example:.ac dec 10 1k 100meg sweep Rl dec 2 5k 15k

12Nanoelectronics and Gigascale Systems Laboratory, NCTU

Transient Analysis Type

.tran calculate time-domain response

.four fourier analysis

.fft fast fourier transform

Example:. tran 1n 100n

13Nanoelectronics and Gigascale Systems Laboratory, NCTU

Voltage and Current Source

• PulseVin in 0 pulse (0V 5V 10ns 10ns 10ns 40ns 100ns)

• SinusoidalVin in 0 sin (0V 1V 100Meg 2ns 5e7)

• Piecewise Linear SourceVin in 0 pwl (60n 0V, 120n 0V, 130n 5V, 170n 5V +180n 0V, R 0)

14Nanoelectronics and Gigascale Systems Laboratory, NCTU

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

15Nanoelectronics and Gigascale Systems Laboratory, NCTU

Output Format.option list 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.

16Nanoelectronics and Gigascale Systems Laboratory, NCTU

Output Statement.print print numeric analysis results.probe allows save output variables only into

the graph data files.meas print numeric results of measured

specificationsExample:.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#

17Nanoelectronics and Gigascale Systems Laboratory, NCTU

Simulation step

18Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (1)

19Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (2)

20Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (3)

21Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (4)

22Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (5)

23Nanoelectronics and Gigascale Systems Laboratory, NCTU

AvanWaves (6)

24Nanoelectronics and Gigascale Systems Laboratory, NCTU

Output buffer (inverter)

Supply voltage 2.5 V

Output load 10 pF

Operation frequency 500 MHz

Rise time and fall time < 0.2 nsec

Used the 1.2 µm CMOS process

Design Example

Vin Vout

VDD

CL

25Nanoelectronics and Gigascale Systems Laboratory, NCTU

Design Example (cont.)

72

02

0

1.75 10

0.74

656 sec1 2 sec

500

2.2 0.1 0.1 sec2

0.04545 sec

OX

th

f

on L

FC cmV V

cmV

T nMHz

Tt n

R C n

µ

τ

τ

−= ×

=

= −

= =

= = × =

= =

NMOS

34.54454

412.6

2320.5556

27851.2

onDsat

Dsat

nmos

nmos

VDDRI

I mAWLWL

µµ

= ≈

=

⎛ ⎞ =⎜ ⎟⎝ ⎠

⎛ ⎞ =⎜ ⎟⎝ ⎠

26Nanoelectronics and Gigascale Systems Laboratory, NCTU

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

27Nanoelectronics and Gigascale Systems Laboratory, NCTU

Design Example (cont.).temp 25M0 Vout Vin VDD VDD pmos w=94u L=1.2u m=90M1 Vout Vin 0 0 nmos W=94u L=1.2u m=30Cl vout 0 10pF

VDD VDD 0 2.5VVin 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

28Nanoelectronics and Gigascale Systems Laboratory, NCTU

Design Example (cont.)

Clock feedthrough

top related