EEC 116 Lecture #5: CMOS Logic Rajeevan mirtharajah Bevan Baas University of California, Davis Jeff Parkhurst Intel Corporation
nnouncements Quiz 1 today! Lab 2 reports due this week Lab 3 this week HW 2 due this Wednesday at 4 PM in box, Kemper 2131 mirtharajah, EEC 116 Fall 2011 2
Outline Review: CMOS Inverter Transient Characteristics Review: Inverter Power Consumption Combinational MOS Logic Circuits: Rabaey 6.1-6.2 (Kang & Leblebici, 7.1-7.4) Combinational MOS Logic Transient Response C Characteristics, Switch Model mirtharajah, EEC 116 Fall 2011 3
Review: CMOS Inverter VTC P linear N cutoff P cutoff N linear P linear N sat P sat N sat P sat N linear mirtharajah, EEC 116 Fall 2011 4
Review: Logic Circuit Delay For CMOS (or almost all logic circuit families), only one fundamental equation necessary to determine delay: I = C Consider the discretized version: Rewrite to solve for delay: dv Only three ways to make faster logic: C, ΔV, I dt Δt = I C = C ΔV I ΔV Δt mirtharajah, EEC 116 Fall 2011 5
t t PHL PLH Review: Inverter Delays High-to-low and low-to-high transitions (exact): = C 2V T 0, n 4( VOH V ) L T 0, n + ln k ( ) + 1 n VOH VT 0, n VOH VT 0, n VOH VOL = C 2V T 0, p 4( VOH VOL V ) L T 0, p + ln k ( ) + 1 p VOH VOL VT 0, p VOH VOL VT 0, p VOH VOL Similar exact method to find rise and fall times Note: to balance rise and fall delays (assuming V OH = V DD, V OL = 0V, and V T0,n =V T0,p ) requires k k p n =1 W L W L 2.5 mirtharajah, EEC 116 Fall 2011 6 p n = μ μ n p
Review: Inverter Power Consumption Static power consumption (ideal) = 0 ctually DIBL (Drain-Induced Barrier Lowering), gate leakage, junction leakage are still present Dynamic power consumption P P avg avg / 1 T 2 dv T = out Vout Cload dt + DD out load T dt dt 0 T / 2 T / 2 2 T 1 V = out 1 2 Cload + VDDVoutCload CloadVout T 2 2 0 T 2 2 Pavg = CloadVDD = CloadVDD f 1 T P avg = 1 T T 0 ()() t i t dv out ( V V ) C dt mirtharajah, EEC 116 Fall 2011 7 v dt / 2
Static CMOS Complementary pullup network (PUN) and pulldown network (PDN) Only one network is on at a time B C PUN PUN: PMOS devices Why? PDN: NMOS devices B C PDN F Why? PUN and PDN are dual networks mirtharajah, EEC 116 Fall 2011 8
Dual Networks Dual networks: parallel connection in PDN = series connection in PUN, viceversa If CMOS gate implements logic function F: PUN implements function F B Example: NND gate parallel F series PDN implements function G = F mirtharajah, EEC 116 Fall 2011 9
NND function: F = B NND Gate PUN function: F = B = + B Or function (+) parallel connection Inverted inputs, B PMOS transistors PDN function: G = F = B nd function ( ) series connection Non-inverted inputs NMOS transistors mirtharajah, EEC 116 Fall 2011 10
NOR Gate NOR gate operation: F = +B PUN: F = +B = B B PDN: G = F = +B B mirtharajah, EEC 116 Fall 2011 11
nalysis of CMOS Gates Represent on transistors as resistors 1 1 W R 1 W W R R Transistors in series resistances in series Effective resistance = 2R Effective length = 2L mirtharajah, EEC 116 Fall 2011 12
nalysis of CMOS Gates (cont.) Represent on transistors as resistors W W R R W R 0 0 0 Transistors in parallel resistances in parallel Effective resistance = ½ R Effective width = 2W mirtharajah, EEC 116 Fall 2011 13
CMOS Gates: Equivalent Inverter Represent complex gate as inverter for delay estimation Typically use worst-case delays Example: NND gate Worst-case (slowest) pull-up: only 1 PMOS on Pull-down: both NMOS on W P W P W P W N ½W N W N mirtharajah, EEC 116 Fall 2011 14
Example: Complex Gate Design CMOS gate for this truth table: B C F 0 0 0 1 0 0 1 1 0 1 0 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 0 F = (B+C) mirtharajah, EEC 116 Fall 2011 15
Example: Complex Gate Design CMOS gate for this logic function: F = (B+C) = + B C 1. Find NMOS pulldown network diagram: G = F = (B+C) B C Not a unique solution: can exchange order of series connection mirtharajah, EEC 116 Fall 2011 16
Example: Complex Gate 2. Find PMOS pullup network diagram: F = +(B C) B C F Not a unique solution: can exchange order of series connection (B and C inputs) mirtharajah, EEC 116 Fall 2011 17
Example: Complex Gate Completed gate: B W P W P C W N W P F What is worse-case pullup delay? What is worse-case pulldown delay? Effective inverter for delay calculation: B C W N ½W P W N ½W N mirtharajah, EEC 116 Fall 2011 18
CMOS Gate Design Designing a CMOS gate: Find pulldown NMOS network from logic function or by inspection Find pullup PMOS network By inspection Using logic function Using dual network approach Size transistors using equivalent inverter Find worst-case pullup and pulldown paths Size to meet rise/fall or threshold requirements mirtharajah, EEC 116 Fall 2011 19
nalysis of CMOS gates Represent on transistors as resistors 1 1 W R 1 W W R R Transistors in series resistances in series Effective resistance = 2R Effective width = ½ W (equivalent to 2L) Typically use minimum length devices (L = L min ) mirtharajah, EEC 116 Fall 2011 20
nalysis of CMOS Gates (cont.) Represent on transistors as resistors W W R R W R 0 0 0 Transistors in parallel resistances in parallel Effective resistance = ½ R Effective width = 2W Typically use minimum length devices (L = Lmin) mirtharajah, EEC 116 Fall 2011 21
Equivalent Inverter CMOS gates: many paths to Vdd and Gnd Multiple values for V M, V IL, V IH, etc Different delays for each input combination Equivalent inverter Represent each gate as an inverter with appropriate device width Include only transistors which are on or switching Calculate V M, delays, etc using inverter equations mirtharajah, EEC 116 Fall 2011 22
Static CMOS Logic Characteristics For V M, the V M of the equivalent inverter is used (assumes all inputs are tied together) For specific input patterns, V M will be different For V IL and V IH, only the worst case is interesting since circuits must be designed for worst-case noise margin For delays, both the maximum and minimum must be accounted for in race analysis mirtharajah, EEC 116 Fall 2011 23
Equivalent Inverter: V M Example: NND gate threshold V M Three possibilities: & B switch together switches alone B switches alone What is equivalent inverter for each case? mirtharajah, EEC 116 Fall 2011 24
Equivalent Inverter: Delay Represent complex gate as inverter for delay estimation Use worse-case delays Example: NND gate Worse-case (slowest) pull-up: only 1 PMOS on Pull-down: both NMOS on W P W P W P W N ½W N W N mirtharajah, EEC 116 Fall 2011 25
Example: NOR gate Find threshold voltage V M when both inputs switch simultaneously B W P W P F Two methods: Transistor equations (complex) Equivalent inverter B W N Should get same answer W N mirtharajah, EEC 116 Fall 2011 26
Example: Complex Gate Completed gate: B W P W P C W N W P F What is worse-case pullup delay? What is worse-case pulldown delay? Effective inverter for delay calculation: B W N C W N ½W P ½W N mirtharajah, EEC 116 Fall 2011 27
Transistor Sizing Sizing for switching threshold ll inputs switch together Sizing for delay Find worst-case input combination Find equivalent inverter, use inverter analysis to set device sizes mirtharajah, EEC 116 Fall 2011 28
Common CMOS Gate Topologies nd-or-invert (OI) Sum of products boolean function Parallel branches of series connected NMOS Or-nd-Invert (OI) Product of sums boolean function Series connection of sets of parallel NMOS mirtharajah, EEC 116 Fall 2011 29
Stick Diagrams Dimensionless layout sketches Only topology is important Two primary uses Useful intermediate step Transistor schematic is the first step Layout is the last step Final layout generated automatically by compaction program Not widely used; a topic of research Use colored pencils or pens whose colors match Cadence layer colors mirtharajah, EEC 116 Fall 2011 30
Inverter Stick Diagram Diagram here uses magic standard color scheme Label all nodes Vdd Transistor widths (W) often shown with varying units Often in λ in this class in W=9λ out lso nm or µm Sometimes as a unit-less ratio this stick diagram could also say the PMOS is 1.5x wider than the NMOS (saying 1 and 1.5 instead of 6λ and 9λ mirtharajah, EEC 116 Fall 2011 31 Gnd W=6λ
Stick Diagrams Can also draw contacts with an X Do not confuse this X with the chip I/O and power pads on the edge of chip (shown with a box with an X ) or any other markers in Vdd W=9λ out chip core Gnd W=6λ mirtharajah, EEC 116 Fall 2011 32
Layout for the Inverter in the Stick Diagram Source: Omar Sattari mirtharajah, EEC 116 Fall 2011 33
Graph-Based Dual Network Use graph theory to help design gates Mostly implemented in CD tools Draw network for PUN or PDN Circuit nodes are vertices Transistors are edges F F B B gnd mirtharajah, EEC 116 Fall 2011 34
Graph-Based Dual Network (2) To derive dual network: Create new node in each enclosed region of graph Draw new edge intersecting each original edge Edge is controlled by inverted input F n1 B vdd F n1 B B F gnd Convert to layout using consistent Euler paths mirtharajah, EEC 116 Fall 2011 35
Propagation Delay nalysis - The Switch Model = R ON V DD V V DD DD R R p R p R p p B B F F R n C L R n B C L R n R n R n B R p F C L (a) Inverter (b) 2-input NND (c) 2-input NOR t p = 0.69 R on C L (assuming that C L dominates!) mirtharajah, EEC 116 Fall 2011 36
Switch Level Model Model transistors as switches with series resistance Resistance R on = average resistance for a transition Capacitance C L = average load capacitance for a transition (same as we analyzed for transient inverter delays) R N R P C L mirtharajah, EEC 116 Fall 2011 37
What is the Value of R on? mirtharajah, EEC 116 Fall 2011 38
Switch Level Model Delays R N C L I I t t 1 p Delay estimation using switch-level model (for general RC circuit): = = t = C V R 0 dv dt = RC t p = V 1 V 0 dt RC dv V = dt RC V V [ ] 1 ln( V = 1) ln( V0 ) RC ln V0 = C I dv dv mirtharajah, EEC 116 Fall 2011 39
Switch Level Model RC Delays For fall delay t phl, V 0 =V DD, V 1 =V DD /2 t t t t p p phl plh = = = = V V RC ln 1 = RC ln 2 V V 0 RC ln(0.5) 0.69R C 0.69R n p C L L 1 DD DD Standard RC-delay equations from literature mirtharajah, EEC 116 Fall 2011 40
Numerical Examples Example resistances for 1.2 μm CMOS mirtharajah, EEC 116 Fall 2011 41
nalysis of Propagation Delay V DD R p B R p F 1. ssume R n =R p = resistance of minimum sized NMOS inverter 2. Determine Worst Case Input transition (Delay depends on input values) R n B R n C L 3. Example: t plh for 2input NND - Worst case when only ONE PMOS Pulls up the output node - For 2 PMOS devices in parallel, the resistance is lower t plh = 0.69R p C L 2-input NND 4. Example: t phl for 2input NND - Worst case : TWO NMOS in series t phl = 0.69(2R n )C L mirtharajah, EEC 116 Fall 2011 42
Design for Worst Case V DD V DD B 2 1 1 2 B F C L D B 2 C D 2 1 B 2 4 4 2 C 2 F NND Gate Complex Gate Here it is assumed that R p = R n mirtharajah, EEC 116 Fall 2011 43
Fan-In and Fan-Out B V DD C D Fan-Out Number of logic gates connected to output (2 FET gate capacitances per fan-out) B C D Fan-In Number of logical inputs Quadratic delay term due to: 1.Resistance increasing 2.Capacitance increasing for t phl (series NMOS) t p proportional to a 1 FI + a 2 FI 2 + a 3 FO mirtharajah, EEC 116 Fall 2011 44
Fast Complex Gates - Design Techniques Increase Transistor Sizing: Works as long as Fan-out capacitance dominates self capacitance (S/D cap increases with increased width) Progressive Sizing: In N MN Out C L M 1 > M 2 > M 3 > MN In 3 M3 C 3 In 2 In 1 M2 M1 C 2 C 1 Distributed RC-line Can Reduce Delay by more than 30%! mirtharajah, EEC 116 Fall 2011 45
Fast Complex Gates - Design Techniques (2) Transistor Ordering Place last arriving input closest to output node critical path critical path In 3 M3 C L In 1 M1 C L In 2 M2 C 2 In 2 M2 C 2 In 1 M1 C 1 In 3 M3 C 3 (a) mirtharajah, EEC 116 Fall 2011 46 (b)
Fast Complex Gates - Design Techniques (3) Improved Logic Design Note Fan-Out capacitance is the same, but Fan-In resistance lower for input gates (fewer series FETs) mirtharajah, EEC 116 Fall 2011 47
Fast Complex Gates - Design Techniques (4) Buffering: Isolate Fan-in from Fan-out C L C L Keeps high fan-in resistance isolated from large capacitive load C L mirtharajah, EEC 116 Fall 2011 48
4 Input NND Gate VDD V DD In 1 In 2 In 3 In 4 In 1 Out Out In 2 In 3 In 4 GND In1 In2 In3 In4 mirtharajah, EEC 116 Fall 2011 49
Capacitances in a 4 input NND Gate VDD Cgs Cgs 5 Csb 6 Csb 5 6 Cgs 7 Csb Cgs In In 7 8 Csb 8 1 2 In 3 In 4 Cgd Cgd 5 Cdb 6 Cdb 5 6 Cgd 7 Cdb Cgd 7 8 Cdb 8 In 1 In 2 In 3 In 4 Cgd 1 Cgs 1 Cgd 2 Cgs 2 Cgd 3 Cgs 3 Cgd 4 Cgs 4 2 3 4 Cdb 1 Csb 1 Cdb 2 Csb 2 Cdb 3 Csb 3 Cdb 4 Csb 4 Vout Note that the value of Cload for calculating propagation delay depends on which capacitances need to be discharged or charged when the critical signal arrives. Example: In 1 = In 3 = In 4 = 1. In 2 = 0. In 2 switches from low to high. Hence, Nodes 3 and 4 are already discharged to ground. In order for Vout to go from high to low Vout node and node 2 must be discharged. CL = Cgd5+Cgd7+Cgd8+2Cgd6(Miller)+Cdb5+Cdb6+Cdb7+Cd b8 +Cgd1+ Cdb1+ Cgs1+ Csb1+ 2Cgd2+ Cdb2+ Cw mirtharajah, EEC 116 Fall 2011 50
Next Topic: rithmetic Computing arithmetic functions with CMOS logic Half adder and full adder circuits Circuit architectures for addition rray multipliers mirtharajah, EEC 116 Fall 2011 51