Chapter 6 Designing Combinational Logic Circuits November 2002

Chapter 6 Designing Combinational Logic Circuits November 2002. 1 EE 141 Combinational Circu

Combinational vs. Sequential Logic Combinational Output = f(In) Sequential Output = f(In, Previous In) 2 EE 141 Combinational Circu

Static CMOS Circuit At every point in time (except during the switching transients) each gate output is connected to either VDD or Vss via a low-resistive path. The outputs of the gates assume at all times the value of the Boolean function, implemented by the circuit (ignoring, once again, the transient effects during switching periods). This is in contrast to the dynamic circuit class, which relies on temporary storage of signal values on the capacitance of high impedance circuit nodes. 3 EE 141 Combinational Circu

Complementary CMOS Logic Style 4 EE 141 Combinational Circu

Static Complementary CMOS VDD … In 1 In 2 PUN In. N F(In 1, In 2, …In. N) … In 1 In 2 In. N PMOS only PDN NMOS only PUN and PDN are dual logic networks 5 EE 141 Combinational Circu

NMOS Transistors in Series/Parallel Connection Transistors can be thought as a switch controlled by its gate signal NMOS switch closes when switch control input is high 6 EE 141 Combinational Circu

PMOS Transistors in Series/Parallel Connection 7 EE 141 Combinational Circu

Example Gate: NAND 8 EE 141 Combinational Circu

Example Gate: NOR 9 EE 141 Combinational Circu

Complex CMOS Gate B A C D OUT = D + A • (B + C) A D B C 10 EE 141 Combinational Circu

Constructing a Complex Gate 11 EE 141 Combinational Circu

CMOS Properties q Full rail-to-rail swing; high noise margins q Logic levels not dependent upon the relative device sizes; ratioless q Always a path to Vdd or Gnd in steady state; low output impedance q Extremely high input resistance; nearly zero steadystate input current q No direct path steady state between power and ground; no static power dissipation q Propagation delay function of load capacitance and resistance of transistors 12 EE 141 Combinational Circu

Properties of Complementary CMOS Gates Snapshot 1. High noise margins : VOH and VOL are at VDD and GND, respectively. 2. No static power consumption : There never exists a direct path between VDD and VSS (GND) in steady-state mode. 3. Comparable rise and fall times: (under appropriate sizing conditions) 13 EE 141 Combinational Circu

Threshold Drops VDD PUN VDD S D VDD 0 VDD VGS D S CL VDD 0 PDN VDD D S CL 0 VDD - VTn CL VGS VDD |VTp| S CL D 14 EE 141 Combinational Circu

Switch Delay Model Req A A Rp Rp B Rn Rp CL A Cint A NAND 2 Rp A Rn B INV Cint A CL Rn Rn A B CL NOR 2 15 EE 141 Combinational Circu

Input Pattern Effects on Delay is dependent on the pattern of inputs q Low to high transition q Rp A Rp B Rn § Both inputs go low CL – Delay is 0. 69 Rp/2 CL § One input goes low B Rn A – Delay is 0. 69 Rp CL Cint q High to low transition? § Both inputs go high – Delay is 0. 69 2 Rn CL 16 EE 141 Combinational Circu
![Delay Dependence on Input Patterns A=B=1 0 Voltage [V] A=1 0, B=1 A=1, B=1 Delay Dependence on Input Patterns A=B=1 0 Voltage [V] A=1 0, B=1 A=1, B=1](http://slidetodoc.com/presentation_image/c5ca0b691e87290f78cc73b4ac0c51ed/image-17.jpg)
Delay Dependence on Input Patterns A=B=1 0 Voltage [V] A=1 0, B=1 A=1, B=1 0 time [ps] EE 141 Input Data Pattern Delay (psec) A=B=0 1 67 A=1, B=0 1 64 A= 0 1, B=1 61 A=B=1 0 45 A=1, B=1 0 80 A= 1 0, B=1 81 NMOS = 0. 5 m/0. 25 m PMOS = 0. 75 m/0. 25 m CL = 100 f. F 17 Combinational Circu

Transistor Sizing Rp 2 A Rp B Rn 2 B 2 Rn A Rp 4 B 2 CL Cint 4 1 Rp Cint A Rn Rn A B CL 1 18 EE 141 Combinational Circu

Transistor Sizing a Complex CMOS Gate A B 8 6 C 8 6 4 3 D 4 6 OUT = D + A • (B + C) A D 2 1 B 2 C 2 19 EE 141 Combinational Circu

Fan-In Considerations A B C D A CL B C 3 C C 2 D C 1 Distributed RC model (Elmore delay) tp. HL = 0. 69 Reqn(C 1+2 C 2+3 C 3+4 CL) Propagation delay deteriorates rapidly as a function of fan-in – quadratically in the worst case. 20 EE 141 Combinational Circu

tp as a Function of Fan-In tp (psec) quadratic tp. HL tp tp. LH Gates with a fan-in greater than 4 should be avoided. linear fan-in 21 EE 141 Combinational Circu

tp as a Function of Fan-Out tp. NOR 2 tp. NAND 2 tp (psec) tp. INV All gates have the same drive current. Slope is a function of “driving strength” eff. fan-out 22 EE 141 Combinational Circu

tp as a Function of Fan-In and Fan-Out q Fan-in: quadratic due to increasing resistance and capacitance q Fan-out: each additional fan-out gate adds two gate capacitances to CL tp = a 1 FI + a 2 FI 2 + a 3 FO 23 EE 141 Combinational Circu

Fast Complex Gates: Design Technique 1 q Transistor sizing § as long as fan-out capacitance dominates q Progressive In. N sizing CL MN In 3 M 3 C 3 In 2 M 2 C 2 In 1 M 1 C 1 Distributed RC line M 1 > M 2 > M 3 > … > MN (the fet closest to the output is the smallest) Can reduce delay by more than 20%; decreasing gains as technology shrinks 24 EE 141 Combinational Circu

Fast Complex Gates: Design Technique 2 q Transistor ordering critical path In 3 1 M 3 charged CL In 2 1 M 2 C 2 charged In 1 M 1 0 1 C 1 charged delay determined by time to discharge CL, C 1 and C 2 critical path 0 1 In 1 M 3 CLcharged In 2 1 M 2 C 2 discharged In 3 1 M 1 C 1 discharged delay determined by time to discharge CL 25 EE 141 Combinational Circu

Fast Complex Gates: Design Technique 3 q Alternative logic structures F = ABCDEFGH 26 EE 141 Combinational Circu

Fast Complex Gates: Design Technique 4 q Isolating fan-in from fan-out using buffer insertion CL CL 27 EE 141 Combinational Circu

Fast Complex Gates: Design Technique 5 q Reducing the voltage swing tp. HL = 0. 69 (3/4 (CL VDD)/ IDSATn ) = 0. 69 (3/4 (CL Vswing)/ IDSATn ) § linear reduction in delay § also reduces power consumption But the following gate is much slower! q Or requires use of “sense amplifiers” on the receiving end to restore the signal level (memory design) q 28 EE 141 Combinational Circu

Sizing Logic Paths for Speed Frequently, input capacitance of a logic path is constrained q Logic also has to drive some capacitance q Example: ALU load in an Intel’s microprocessor is 0. 5 p. F q How do we size the ALU datapath to achieve maximum speed? q We have already solved this for the inverter chain – can we generalize it for any type of logic? q 29 EE 141 Combinational Circu

Buffer Example In Out 1 2 N CL (in units of tinv) For given N: Ci+1/Ci = Ci/Ci-1 To find N: Ci+1/Ci ~ 4 How to generalize this to any logic path? 30 EE 141 Combinational Circu

Logical Effort p – intrinsic delay (3 k. Runit. Cunitg) - gate parameter f(W) g – logical effort (k. Runit. Cunit) – gate parameter f(W) f – effective fanout Normalize everything to an inverter: ginv =1, pinv = 1 Divide everything by tinv (everything is measured in unit delays tinv) Assume g = 1. EE 141 31 Combinational Circu

Delay in a Logic Gate delay: d=h+p effort delay intrinsic delay Effort delay: h=gf logical effort effective fanout = Cout/Cin Logical effort is a function of topology, independent of sizing Effective fanout (electrical effort) is a function of load/gate size 32 EE 141 Combinational Circu

Logical Effort Inverter has the smallest logical effort and intrinsic delay of all static CMOS gates q Logical effort of a gate presents the ratio of its input capacitance to the inverter capacitance when sized to deliver the same current q Logical effort increases with the gate complexity q 33 EE 141 Combinational Circu

Logical Effort Logical effort is the ratio of input capacitance of a gate to the input capacitance of an inverter with the same output current g=1 g = 4/3 g = 5/3 34 EE 141 Combinational Circu

Normalized delay (d) Logical Effort of Gates t p. NAND g= p= d= t p. INV g= p= d= F(Fan-in) 1 2 3 4 5 Fan-out (h) 6 7 35 EE 141 Combinational Circu

Normalized delay (d) Logical Effort of Gates t p. NAND g = 4/3 p=2 d = (4/3)h+2 t p. INV g=1 p=1 d = h+1 F(Fan-in) 1 2 3 4 5 Fan-out (h) 6 7 36 EE 141 Combinational Circu

Logical Effort of Gates 37 EE 141 Combinational Circu

Add Branching Effort Branching effort: 38 EE 141 Combinational Circu

Multistage Networks Stage effort: hi = gifi Path electrical effort: F = Cout/Cin Path logical effort: G = g 1 g 2…g. N Branching effort: B = b 1 b 2…b. N Path effort: H = GFB Path delay D = Sdi = Spi + Shi 39 EE 141 Combinational Circu

Optimum Effort per Stage When each stage bears the same effort: Stage efforts: g 1 f 1 = g 2 f 2 = … = g. Nf. N Effective fanout of each stage: Minimum path delay 40 EE 141 Combinational Circu

Optimal Number of Stages For a given load, and given input capacitance of the first gate Find optimal number of stages and optimal sizing Substitute ‘best stage effort’ 41 EE 141 Combinational Circu

Logical Effort From Sutherland, Sproull 42 EE 141 Combinational Circu

Example: Optimize Path g=1 f=a g = 5/3 f = b/a g = 5/3 f = c/b g=1 f = 5/c Effective fanout, F = G= H= h= a= b= 43 EE 141 Combinational Circu

Example: Optimize Path g=1 f=a g = 5/3 f = b/a Effective fanout, F = 5 G = 25/9 H = 125/9 = 13. 9 h = 1. 93 a = 1. 93 b = ha/g 2 = 2. 23 c = hb/g 3 = 5 g 4/f = 2. 59 EE 141 g = 5/3 f = c/b g=1 f = 5/c 44 Combinational Circu

Example: Optimize Path g 1 = 1 g 2 = 5/3 Effective fanout, H = 5 G = 25/9 F = 125/9 = 13. 9 f = 1. 93 a = 1. 93 b = fa/g 2 = 2. 23 c = fb/g 3 = 5 g 4/f = 2. 59 EE 141 g 3 = 5/3 g 4 = 1 45 Combinational Circu

Example – 8 -input AND 46 EE 141 Combinational Circu

Method of Logical Effort Compute the path effort: F = GBH q Find the best number of stages N ~ log 4 F q Compute the stage effort f = F 1/N q Sketch the path with this number of stages q Work either from either end, find sizes: Cin = Cout*g/f q Reference: Sutherland, Sproull, Harris, “Logical Effort, Morgan-Kaufmann 1999. 47 EE 141 Combinational Circu

Summary Sutherland, Sproull Harris 48 EE 141 Combinational Circu

Pass. Transistor Logic 49 EE 141 Combinational Circu

Pass-Transistor Logic 50 EE 141 Combinational Circu

Example: AND Gate 51 EE 141 Combinational Circu
![NMOS-Only Logic 3. 0 Voltage [V] In Out 2. 0 x 1. 0 0 NMOS-Only Logic 3. 0 Voltage [V] In Out 2. 0 x 1. 0 0](http://slidetodoc.com/presentation_image/c5ca0b691e87290f78cc73b4ac0c51ed/image-52.jpg)
NMOS-Only Logic 3. 0 Voltage [V] In Out 2. 0 x 1. 0 0 0. 5 1 1. 5 2 Time [ns] 52 EE 141 Combinational Circu

NMOS-only Switch C = 2. 5 V C = 2. 5 V A = 2. 5 V B B M 2 Mn CL M 1 VB does not pull up to 2. 5 V, but 2. 5 V - VTN Threshold voltage loss causes static power consumption NMOS has higher threshold than PMOS (body effect) 53 EE 141 Combinational Circu

NMOS Only Logic: Level Restoring Transistor VDD Level Restorer VDD Mr B A Mn M 2 X Out M 1 • Advantage: Full Swing • Restorer adds capacitance, takes away pull down current at X • Ratio problem 54 EE 141 Combinational Circu
![Restorer Sizing Voltage [V] 3. 0 2. 0 W/Lr =1. 75/0. 25 W/L r Restorer Sizing Voltage [V] 3. 0 2. 0 W/Lr =1. 75/0. 25 W/L r](http://slidetodoc.com/presentation_image/c5ca0b691e87290f78cc73b4ac0c51ed/image-55.jpg)
Restorer Sizing Voltage [V] 3. 0 2. 0 W/Lr =1. 75/0. 25 W/L r =1. 50/0. 25 • Upper limit on restorer size • Pass-transistor pull-down can have several transistors in stack 1. 0 W/Lr =1. 0/0. 25 0. 0 0 100 200 W/L r =1. 25/0. 25 300 Time [ps] 400 55 EE 141 Combinational Circu

Solution 2: Single Transistor Pass Gate with VT=0 VDD 0 V 2. 5 V VDD 0 V VDD Out 2. 5 V WATCH OUT FOR LEAKAGE CURRENTS 56 EE 141 Combinational Circu

Complementary Pass Transistor Logic 57 EE 141 Combinational Circu

Solution 3: Transmission Gate C A B B C C C = 2. 5 V A = 2. 5 V B CL C=0 V 58 EE 141 Combinational Circu

Resistance of Transmission Gate 59 EE 141 Combinational Circu

Pass-Transistor Based Multiplexer S S VDD GND In 1 In 2 60 EE 141 Combinational Circu

Transmission Gate XOR B B M 2 A A F M 1 B M 3/M 4 B 61 EE 141 Combinational Circu

Delay in Transmission Gate Networks 2. 5 V 1 In 2. 5 Vi Vi-1 C 0 2. 5 C 0 Vn-1 Vi+1 C 0 Vn C C 0 (a) Req In Req V 1 Req Vi C Vn-1 Vi+1 C C Req Vn C C (b) m Req Req Req In C CC C (c) 62 EE 141 Combinational Circu

Delay Optimization 63 EE 141 Combinational Circu

Transmission Gate Full Adder Similar delays for sum and carry 64 EE 141 Combinational Circu

Dynamic Logic 65 EE 141 Combinational Circu

Dynamic CMOS q In static circuits at every point in time (except when switching), the output is connected to either GND or VDD via a low resistance path. § Fan-in of n requires 2 n (n N-type + n P-type) devices q Dynamic circuits rely on the temporary storage of signal values on the capacitance of high impedance nodes. § Requires on n + 2 (n+1 N-type + 1 P-type) transistors 66 EE 141 Combinational Circu

Dynamic Gate Clk Mp off Mp on Out In 1 In 2 In 3 Clk CL PDN 1 Out ((AB)+C) A C B Me Clk off Me on Two phase operation Precharge (Clk = 0) Evaluate (Clk = 1) 68 EE 141 Combinational Circu

Conditions on Output Once the output of a dynamic gate is discharged, it cannot be charged again until the next precharge operation. q Inputs to the gate can make at most one transition during evaluation. q q Output can be in the high impedance state during and after evaluation (PDN off), state is stored on CL 69 EE 141 Combinational Circu

Properties of Dynamic Gates q Logic function is implemented by the PDN only § number of transistors is N + 2 (versus 2 N for static complementary CMOS) Full swing outputs (VOL = GND and VOH = VDD) q Non-ratioed - sizing of the devices does not affect the logic levels q Faster switching speeds q § reduced load capacitance due to lower input capacitance (Cin) § reduced load capacitance due to smaller output loading (Cout) § no Isc, so all the current provided by PDN goes into discharging CL 70 EE 141 Combinational Circu

Properties of Dynamic Gates q Overall power dissipation usually higher than static CMOS § no static current path ever exists between VDD and GND (including Psc) § no glitching § Higher transition probabilities § Extra load on Clk q PDN starts to work as soon as the input signals exceed VTn, so VM, VIH and VIL equal to VTn § Low noise margin (NML) q Needs a precharge/evaluate clock 71 EE 141 Combinational Circu

Issues in Dynamic Design 1: Charge Leakage CLK Clk Mp Out CL A Clk Me Evaluate VOut Precharge Leakage sources Dominant component is subthreshold current 72 EE 141 Combinational Circu

Solution to Charge Leakage Keeper Clk Mp A Mkp CL Out B Clk Me Same approach as level restorer for pass-transistor logic 73 EE 141 Combinational Circu

Issues in Dynamic Design 2: Charge Sharing Clk Mp Out A CL B=0 Clk Charge stored originally on CL is redistributed (shared) over CL and CA leading to reduced robustness CA Me CB 74 EE 141 Combinational Circu

Charge Sharing Example Clk A A B B B Cc=15 f. F C C Ca=15 f. F Out CL=50 f. F !B Cb=15 f. F Cd=10 f. F Clk 75 EE 141 Combinational Circu

Charge Sharing VDD Clk Mp Out CL A Ma X B=0 Clk Mb Me Ca Cb 76 EE 141 Combinational Circu

Solution to Charge Redistribution Clk Mp Mkp Clk Out A B Clk Me Precharge internal nodes using a clock-driven transistor (at the cost of increased area and power) 77 EE 141 Combinational Circu

Issues in Dynamic Design 3: Backgate Coupling Clk Mp A=0 Out 1 =1 CL 1 Out 2 =0 CL 2 In B=0 Clk Me Dynamic NAND Static NAND 78 EE 141 Combinational Circu

Voltage Backgate Coupling Effect Out 1 Clk In Out 2 Time, ns 79 EE 141 Combinational Circu

Issues in Dynamic Design 4: Clock Feedthrough §Coupling between Out and Clk input of the precharge device Clk Mp A CL due to the gate to drain capacitance. §The voltage of Out can rise B Clk Out Me above VDD. §The fast rising (and falling edges) of the clock couple to Out. 80 EE 141 Combinational Circu

Clock Feedthrough Clock feedthrough Clk Out In 1 In 3 In 4 Voltage In 2 In & Clk Out Clk Time, ns Clock feedthrough 81 EE 141 Combinational Circu

Other Effects q Capacitive coupling q Substrate coupling q Minority charge injection q Supply noise (ground bounce) 82 EE 141 Combinational Circu

Cascading Dynamic Gates V Clk Mp Out 1 Me Clk Out 2 In In Clk Me Out 1 VTn V Out 2 t Only 0 1 transitions allowed at inputs! 83 EE 141 Combinational Circu

Domino Logic Clk In 1 In 2 In 3 Clk Mp 1 1 1 0 PDN Me Out 1 Clk 0 0 0 1 In 4 In 5 Clk Mp Mkp Out 2 PDN Me 84 EE 141 Combinational Circu

Why Domino? Clk Ini Inj Clk PDN Ini Inj PDN Like falling dominos! 85 EE 141 Combinational Circu

Properties of Domino Logic Only non-inverting logic can be implemented q Very high speed q § static inverter can be skewed, only L-H transition § Input capacitance reduced – smaller logical effort 86 EE 141 Combinational Circu

Designing with Domino Logic VDD VDD Clk Mp Clk Out 1 Mp Mr Out 2 In 1 In 2 In 3 PDN In 4 Can be eliminated! Clk Me Inputs = 0 during precharge 87 EE 141 Combinational Circu

Footless Domino The first gate in the chain needs a foot switch Precharge is rippling – short-circuit current A solution is to delay the clock for each stage 88 EE 141 Combinational Circu

Differential (Dual Rail) Domino off Mp Mkp Clk Out = AB 1 on Mkp 0 Clk Mp 1 A !A 0 Out = AB !B B Clk Me Solves the problem of non-inverting logic 89 EE 141 Combinational Circu

np-CMOS Clk In 1 In 2 In 3 Clk Mp 1 1 1 0 PDN Me Out 1 Clk Me In 4 In 5 PUN 0 0 0 1 Clk Mp Out 2 (to PDN) Only 0 1 transitions allowed at inputs of PDN Only 1 0 transitions allowed at inputs of PUN 90 EE 141 Combinational Circu

NORA Logic Clk In 1 In 2 In 3 Clk Mp 1 1 1 0 Out 1 PDN Clk Me In 4 In 5 PUN 0 0 0 1 Clk Me to other PDN’s Mp Out 2 (to PDN) to other PUN’s WARNING: Very Sensitive to Noise! 91 EE 141 Combinational Circu
- Slides: 90