NanoelectronicCircuit...
Transcript of NanoelectronicCircuit...
Nanoelectronic Circuit DesignDesign, simulation and analysis in SPICE
1
Ramon Canal
Dept. Arquitectura de Computadors (DAC)
UPC-Barcelona Tech
Based on the slides made by Prof. Enric Pastor (DAC, UPC)
The Design Problem
2
A growing gap between design complexity and design productivity
Design Methodology
3
• Design process traverses iteratively between three abstractions:behavior, structure, and geometry
• More and more automation for each of these steps
Tools across Design Space
4
Design Level Tools Simultation Type
CPU/SoC Custom built in HLL (Simplescalar, Gem5, Marssx86, Multi2Sim, GPGPU, ...)
Input: Block timing, benchmarks[extra power/temperaturemodels (i.e. Wattch, McPAT, CACTI, or self‐made)
Functional simulation
Output: performance characterization
Circuit Level(functional [+ timing])
Bigger blocks, wholeCPU
VHDL, verilog
Input: circuit [+ circuit timing]
Logic
Output: Behavior, Results [timing].
Tools across Design Space (cont.)
5
Design Level Tools Simultation Type
Circuit Level (analog)
Usually small blocks
SPICE
Input: Compact Model
Electrical simulation
Output: characterization(delay, power, etc.)
Device (i.e. Transistor) TCAD, atomisticsimulators or similar
Input: physicaldescription of materials
Particle Physics
Output: Compact Model
Content
6
• Overview of SPICE• SPICE Description:
– Nodes– Basic components– Transistors: dimensions and capacity– Modular Design– Definition of inputs– Power measurement– Buses
• Technology: BSIM 28nm• Example: an inverter, Brent-Kung 32 bit adder
Content
7
• Simulation Program with Integrated Circuit Emphasis• General purpose analog circuit simulator
• Used in IC and board-level design for check of integrity of circuit designs and prediction of circuit behavior
• Developed at Electronics Research Laboratory of the University of California, Berkeley (1973)
• SPICE simulation is industry-standard for verification of circuit operation at transistor level before manufacturing
8
Modeling Technologies
SPICE: electrical simulator
9
• SPICE supports several types of components:– Resistance, capacitors, voltage sources...– Transistors NMOS, PMOS– Buses– Modular description
• Behavior is simulated as nonlinear differential equations:– Simple models for resistances and capacitances– Several different models for transistors
• SPICE simulates by discretizing time– Solving by implicit integration methods, Newton's method and
sparse matrix techniques– May not converge or reduce simulation intervals– No convergence may mean a wrong design
SPICE description: Nodes• SPICE analyzes networks of nodes:
– Each node can be connected to other ones through components– Each node has a unique name or number– Nodes do not have a special direction (current)– Special nodes are 1 (Vdd) and 0 (Gnd)
RC
In1
Out n2
In2 In3
n3
10
1
00
SPICE description: Components• The first character of the description defines the component type• Most common components are:
Rid
n1
n2
n1
n2
Cid
n1
n2
Vid+
n1
n2
Iid
11
– Resistance Rid node1 node2 value(ohms)– Capacitance Cid node1 node2 value (farads)– Voltage source Vid node1 node2 value (volts)– Current source Iid node1 node2 value (ampers)
SPICE description: Components• Other components:
12
– Diode Did – Bipolar Transistor Qid– Linear Inductor Lid – Transmission Line Tid, Uid, Wid– JFET or MESFET Jid
– Subcircuit Xid <subcircuit parameters>
SPICE description: Transistors• We can model a plethora of devices• We will concentrate on MOS type transistors:
Mid• Description:
nodeD nodeG nodeS nodeB type
D
13
S
G B
D
S
G B
– nodeD: drain nodeG: gate– nodeS: source nodeB: bulk– type:NMOS / PMOS
SPICE description: Transistors• Additional parameters:
– W: channel width L: channel length– PD / PS: perimeter of the Drain/Source– AD / AS: Area of the Drain/Source
Mid nD nG nS nB type W= L= PD= AD= PS= AS=
D
14
S
G B
D
S
G B
SPICE description: Transistors• How do we compute the perimeters and areas in a transistor?
Area = W x N
Perimeter= 2W + 2N
15
SPICE description: Transistors
5 λ5 λ2λ 6 λ
– 2 difussion w/o contact– 6 difussion w contact
– 5 difussion w contact atthe end of the structure
16
SPICE description: Transistors• L and W determine the performance of the transistor:
– Resistance L/W– L: higher resistance– W: smaller resistance
• PMOS transistor:– Smaller current than NMOS– 2-3 times slower
I
17
SPICE description:
18
Modules• Subcircuit definition:.SUBCKT Name NodeList
*Definition of content
.ENDS Name
• Highly recommended:NodeList: InputList OutputList 1 (Vdd) 0 (Gnd)
• Subcircuit instantiation:Xid NodeList Name
SPICE description:
19
Multiple Modules• The M (multiply) parameter:
* Definition Val copies of SubcircuitName connectedin parallel
Xid NodeList SubcircuitName M=Val
• Useful for large parallel structures, such as:• Memories (register file, caches, etc.)
X0
n1
n2
X1 XM-1X2 ................................
SPICE description: Inputs
20
• Definition of inputs:– Signal wave (chronogram)– List of points in the wave (time-value pairs)– Lineal interpolation between consecutive points
Vnode Node 0 pwl (Time1 Value1 Time2 Value2 ...)
• Intricacies:– Define the value for initial (0) time– Timex < Timex+1 (no 0-delay transitions allowed!)– Each edge needs 2 points to define the transition slope
SPICE description: Inputs• Example:
t
V
5
00
21
3 7 7.5 11 11.5 14.5 15
Vnode Node 0 pwl ( 0ns 5 3ns 0
+ 7ns 5 7.5ns 0
+ 11ns 0 11.5ns 5
+ 14.5ns 5 15ns 0)
SPICE description:
22
Pulses• Description of periodic signals:
– V1– V2– TD– TR– TF– PW– PER
Initial valueValue during the pulseInitial delay of the pulseRaise timeFall timePulse widthPulse period
Vnode Node 0 PULSE (V1 V2 TD TR TF PW PER)
SPICE description: Pulses• Example:Vnode Node 0 PULSE ( 0
+ 3ns
+ 12ns)
5
1ns 1ns 4ns
t
V
0
5
0 3 4 8 9 15 16 20 21
12
23
SPICE description Power Delivery• Voltage source:
– Defines the electrical values for Vdd and Gnd– Same common values for all the system.
* 5v between vdd (node 1) and gnd (node 0)VCC 1 0 DC 5VXSUM A15 A14 ... A2 A1 A0 B15 B14 ... B2 B1 B0+ S15 S14 ... S2 S1 S0 1 0 sum16
A BSUM16
S
24
SPICE description: Power Delivery• Voltage source:
– Current sensor: current + total accumulated power
XPS Vsupp Vpw 1 0 Pmeter
Cy+
+
Vpw
-
Ryisis
25
XSUM A15 A14 ... A2 A1 A0 B15 B14 ... B2 B1 B0+ S15 S14 ... S2 S1 S0 Vsupp 0 sum16
SPICE description: Interconnects
Source Load
• Data transmission:– A conductor over a substrate
• Communication models:– Transmission line analysis– Lumped-element analysis
D
26
SPICE description: Transmission line
• Segment analysis:– Resistance (Rdz), capacity (Cdz), inductance (Ldz) and
leakage (Gdz) per unit of length (i.e. nanometer) in theconnection.
dz
z
RdzLdz
CdzGdzV(z) V(z+dz)I(z)
27
I(z+dz)
SPICE description: Transmission line
• Channel with losses:– Resistance (Rdz) and leakage (Gdz) cause a reduction of
current and a drop of voltage.
dz
z
RdzLdz
CdzGdzV(z) V(z+dz)I(z)
28
I(z+dz)
SPICE description: Transmission line
• Channel without losses:– We need to model just capacity (Cdz) and inductance (Ldz).
This affects only delay.
Ldz
I(z) I(z+dz)
29
dz
z
CdzV(z) V(z+dz)
SPICE description: Lumped-Element
• Simulation of a channel with losses:– Use multiple transmission elements
z
RdzLdz
CdzGdz
RdzLdz
CdzGdz
RdzLdz
CdzGdz
30
SPICE description: Lumped-Element
• Simulation of a channel without losses :– Use multiple transmission elements
z
Ldz
Cdz
Ldz
Cdz
Ldz
Cdz
31
SPICE description:
Poly M4M3M2M1 M5
0.35 0.60.60.60. 5 0.6
2500 7300 7300800011000 7300
Poly M3M2M1
0.6 0.80.70. 6
3500 6900 84006900
0.35
32
0.5
0.35.5 Technology
SPICE description:
33
0.35 Technology
• Resistance parameters:Poly Sheet R N+ Sheet R P+ Sheet RM1-M5 Sheet R High poly Sheet R Contact RVia R
10 - 30 /•10 - 30 /•10 - 30 /•35 - 55 - 75 m/•800 - 1000 - 1200 m/•2 - 15 /cnt1 - 3 /cnt
SPICE description:
34
• Capacity parameters:M1 to DIFF M1 to POLY M1 to SUB M2 to SUB M3 to SUB M4 to SUB M5 to SUB POLY to SUB POLY
0.036 fF/ m2
0.047 fF/ m2
0.033 fF/ m2
0.012 fF/ m2
0.008 fF/ m2
0.005 fF/ m2
0.004 fF/ m2
0.126 fF/ m2
4.93 fF/ m2
0.35 Technology
SPICE description:
35
• Resistance parameters:Poly Sheet R 10 /• 30 /•N+ Sheet R 10 /• 90 /•P+ Sheet R 10 /• 115 /•M1-M5 Sheet R 55 m/• 85 - 55 m/•High poly Sheet R 1000 m/• - - - -Contact R 2 - 15 /cnt 40 - 80 /cntVia R 1 - 3 /cnt 1 - 3 /cnt
0.35.5 Technology
SPICE description:
36
• Capacity parameters:M1 to DIFF 0.036 fF/ m2 0.031 fF/ m2
M1 to POLY 0.047 fF/ m2 0.049 fF/ m2
M1 to SUB 0.033 fF/ m2 0.031 fF/ m2
M2 to SUB 0.012 fF/ m2 0.011 fF/ m2
M3 to SUB 0.008 fF/ m2 0.007 fF/ m2
M4 to SUB 0.005 fF/ m2 - - - -M5 to SUB 0.004 fF/ m2 - - - -POLY to SUB 0.126 fF/ m2 0.12 fF/ m2
POLY 4.93 fF/ m2 2.56 fF/ m2
0.35.5 Technology
Numbers
37
• Numbers can be • Integer• Floating point• Floating point with integer
exponent • Integer or floating point with one
scale factor• Numbers can use
• Exponential format• Engineering key letter format• Not both (1e-12 or 1p, but not 1e-6u)
Prefix Scale Factor
Multiplying Factor
Tera T 1e+12
Giga G 1e+9
Mega MEG or X 1e+6
Kilo K 1e+3
Milli M 1e-3
Micro u 1e-6
Nano n 1e-9
Pico p 1e-12
Femto f 1e-15
Atto a 1e-18
Comments
38
* **** Parameters *****
Comments:• First letter of line is asterisk (*) → whole line is comment• Dollar sign ($) anywhere on the line → text after is commentFor example:* <comment_on_a_line_by_itself>
-or-<HSPICE_statement> $ <comment_following_HSPICE_input>
Comment statements can be placed anywhere in circuit description
Parameters and Expressions
39
.param Wn=2u L=0.6u
.param Wp=‘2*Wn’
• Definition of netlist parameters • Parameter can be defined with expressions• Definition can occur after use in elements• Parameter names must begin with alphabetic character • At redefinition last parameter’s definition is used• Expressions cannot exceed 1024 characters
Transient analysis with “Sweeps”
40
• Transient analysis simulates circuit in a specific time• Simple syntax:
.TRAN <Tstep> <Tstop><Tstep>: time step<Tstop>: End time (duration) of simulation
• Also more complex commands possible
.TRAN 200P 20N SWEEP TEMP -55 75 10
• Time step: 200 ps, Duration: 20 ns• Multipoint simulation: temperature is swept from -55 to 70°C
by 10°C steps
PLOT statement
41
.plot ov1 [ov2 ... ovN]
• Generate a plot for including all variables ov1…ovN• oVx can be:
• V(n): voltage at node n.• V(n1<,n2>): voltage between the n1 and n2 nodes.• Vn(d1): voltage at nth terminal of the d1 device.• In(d1): current into nth terminal of the d1 device.• ‘expression’: expression, involving the plot variables above
Measure statement
42
.MEASURE <ana_type> <param_name> <meas_mode><param_name>: Parameter name<Meas_mode> Measurement mode, e.g.:
• Rise, fall, and delay• Find-when• Average, RMS, min, max, and peak-to-peak• Integral evaluation• Derivative evaluation
.MEASURE tran vin AVG V(nt1) from=0 to=1n• Parameter name: vin• Measurement type: Average• Value: Voltage of net n1
Example: inverter• Schematic and gate:
D
S
GB
D
S
GB
In Out
Out
43
In
Example: inverter (@28nm) Layout• L/W values:
– Lp = 56n (2λ) Wp = 448n (16λ)
– Ln = 56n (2λ) Wn = 224n (8λ)
• Areas: (N=6λ)
– ADp = ASp = 448n * 6(28n) = 75.3f
– ADn = ASn = 224n * 6(28n) = 37.6f
• Perimeters:
– PDp = PSp = 2(448n + 168n) = 1.23u
– PDn = PSn = 2(224n + 168n) = 784n
Vdd
44Gnd
PMOS
OutIn
NMOS
Example: inverter
OutIn
D
S
GB
D
S
GB
In
45
Out
• Schematic and gate:
Example: inverter
46
SPICE Model*Definition of the inverter subcircuit In Out
.SUBCKT inv In Out 1 0
*Pull-up
M1 1 In Out 1 tp L=56n W=448n AS=75.3f AD=75.3f PS=1.23u PD=1.23u
*Pull-down
M2 Out In 0 0 tn L=56n W=224n AS=37.6f AD=37.6f PS= 784n PD=784n
*Optional: metal input/output capacitances
.ENDS inv
C1 In 0 24PC2 Out 0 10P
Example: inverter LayoutVdd
PMOS
OutIn
NMOS
• Input metal capacitance:
– Area: ? Need layout
–• Input poly capacitance:
– Area: ? Need layout
–• Output metal capacitance:
– Area: ? Need layout
–
Gnd47
Example: inverter Layout
• Gate capacitance:
– Area: automaticDifussion capacitance:
– Area: automatic
• SPICE takes these capacitancesalready into account.
Vdd
PMOS
OutIn
NMOS
Gnd48
Example: inverter chain
35
Simulation*Load the modules.INCLUDE model28nm.spi.INCLUDE inv.spi
*Instantiation of the gate simulated
X1 In Out 1 0 inv
*1.0v between Vdd and Vss
VCC 1 0 DC 1.0V
*Simulation input
Vin In 0 pwl(0ns 0 3ns 0 15ns 1.0 20ns 1.0 35ns 0)
*Duration of simulation (step time and total time)
.TRAN 1ns 35ns
.END
Example: inverter
35
Simulation*Load the modules.INCLUDE model28nm.spi.INCLUDE inv.spi
*Instantiation of the gate simulated
X1 In InOut 1 0 invX2 InOut Out 1 0 inv
*1.0v between Vdd and VssVCC 1 0 DC 1.0V
*Simulation input
Vin In 0 pwl(0ns 0 3ns 0 15ns 1.0 20ns 1.0 35ns 0)
*Duration of simulation (step time and total time)
.TRAN 1ns 35ns
.END
Example: inverter
35
Simulation
36
Example: complex gate Layout• Function:
F
• Inputs:A, B, C, D
• Objective:Extract function
Parasitic capacitances
37
Example: Brent-Kung Adder• 32-bit Brent-Kung Adder:
– Static CMOS– SPICE model (without connections)
Conclusions
54
• Electric simulation of digital circuits.• Much more detailed than logic simulators:
– Capacitances, resistances, transistors.
– Can model interconnections (i.e. buses).
• Large simulation times.• No (built-in) modelling of effects such as:
– Cross-talk
– Power consumption / energy