2. SPICE introduction
• SPICE, a Simulation Program with Integrated Circuit
Emphasis
SPICE card
SPICE deck
• We will use SmartSPICE by SimuCAD (http://www.engin.brown.edu/vpn)
S. Reda EN160 SP’08
3. SPICE Intro
• SPICE is case insensitive
• Cards beginning with a dot (.) are control cards
• Cards beginning with a * are comment cards
• The last card must be .end
• Each card in the netlist must begin with a letter
indicating its type
S. Reda EN160 SP’08
4. SPICE circuit elements
Letter Circuit Element
R Resistor
C Capacitor
L Inductor
K Mutual Inductor
V Independent voltage source
I Independent current source
M MOSFET
D Diode
Q Bipolar transistor
W Lossy transmission line
X Subcircuit
E Voltage-controlled voltage source
G Voltage-controlled current source
H Current-controlled voltage source
F Current-controlled current source
S. Reda EN160 SP’08
5. Units
Letter Unit Magnitude
a atto 10-18
f femto 10-15
p pico 10-12
n nano 10-9
u micro 10-6
m mili 10-3
k kilo 103
x mega 106
g giga 109
S. Reda EN160 SP’08
6. Voltage sources
• DC Source
– Vdd vdd gnd 2.5
(time, voltage) pairs
• Piecewise Linear Source
– Vin in gnd pwl 0ps 0 100ps 0 150ps 1.8 800ps 1.8
• Pulsed Source
– Vck clk gnd PULSE 0 1.8 0ps 100ps 100ps 300ps 800ps
PULSE v1 v2 td tr tf pw per
td tr pw tf
v2
v1 per
S. Reda EN160 SP’08
7. RC response
*rc.sp
.option post
Vin in gnd pwl 0ps 0 100ps 0 150ps 1.8 800ps 1.8
R1 in out 2k
C1 out gnd 100f
.tran 20ps 800ps
.plot v(in) v(out)
.end
Tutorial movie at http://ic.engin.brown.edu/classes/EN160S07/spice.avi
S. Reda EN160 SP’08
8. NMOS I-V characteristics
Mname drain gate source body type W=<width> L=<length>
.option post
.include 'tsmc-180.txt'
.temp 70
.option scale=90n
Vgs g gnd 0
Vds d gnd 0
M1 d g gnd gnd NMOS W=2 L=2
.dc Vds 0 1.8 0.05 sweep vgs 0 1.8 0.3
.plot i(m1)
.end
S. Reda EN160 SP’08
14. Leakage current/threshold voltage
.option post
.include 'tsmc-180.txt'
.temp 70
.option scale=90n
Vgs g gnd 0
Vds d gnd 1.8
M1 d g gnd gnd NMOS W=2 L=2
.dc Vgs 0 1.8 0.05 s
.plot i(m1)
.end
S. Reda EN160 SP’08
16. Integration with L-Edit
Objective: extract the SPICE circuit
description from Tanner L-Edit and then
simulate it in SPICE to verify that the layout
is indeed performing the required
functionality
S. Reda EN160 SP’08
17. Extract your design into SPICE to simulate
and verify it
S. Reda EN160 SP’08
18. Verify your inverter DC characteristics in
SPICE
simulate and plot
Fix your SPICE input file first
S. Reda EN160 SP’08
19. Summary
Ideal transistor characteristics
Non-ideal transistor characteristics
Inverter DC transfer characteristics
Simulation with SPICE and integration with L-Edit
S. Reda EN160 SP’08