EE241 - Spring 2007 Advanced Digital Integrated Circuits Lecture 23: Latches and Flip-Flops Announcements Final exam on May 8 in class Project presentations on May 3, 1-5pm 2 1 Class Material Last lecture SRAM Today’s lecture Latches and flip-flops 3 Latches: Reading Rabaey et al, Chapters 7 and 10 Chapter 10 in Chandrakasan et al, by Partovi Stojanovic, Oklobdzija, JSSC 4/99 4 2 Latch vs. Flip-Flop z Flip-Flop (register) stores data when clock rises Latch stores data when clock is low D Q D Q Clk Clk Clk Clk D D Q Q 5 Latch vs. Flip-Flop Courtesy of IEEE Press, New York. © 2000 6 3 Latch Pair vs. Flip-Flop Performance metrics Delay metrics Delay penalty Clock skew penalty Inclusion of logic Inherent race immunity Power/Energy Metrics Power/energy PDP, EDP Design robustness 7 Latches Negative latch (transparent when CLK= 0) Positive latch (transparent when CLK= 1) 8 4 Latches Transmission-Gate Latch C2MOS Latch Clk Clk D Q Q D Clk Clk 9 Latches 10 Courtesy of IEEE Press, New York. © 2000 5 TSPC - True Single Phase Clock Logic VDD VDD φ φ M1 VDD VDD M1 In M1 M1 Out Out In M2 φ φ M2 M2 M2 Out Out In In φ φ M3 M3 Precharged P Precharged N M3 M3 Non-precharged N Non-precharged P 11 TSPC - True Single Phase Clock Logic VD D VDD VDD VDD PUN In φ φ Static Logic φ φ Out PDN Including logic into the latch Inserting logic between latches 12 6 Doubled TSPC Latches VDD VDD VDD VDD Out In φ φ Doubled n-TSPC latch φ φ Out Doubled p-TSPC latch 13 DEC Alpha 21064 Dobberpuhl, JSSC 11/92 14 7 DEC Alpha 21064 L1: L2: 15 DEC Alpha 21064 Integrating logic into latches • Reducing effective overhead 16 8 DEC Alpha 21164 L2 Latch L1 Latch L1 Latch with logic 17 Latch Pair as a Flip-Flop 18 9 Requirements for the Flip-Flop Design • High speed of operation: • Small Clk-Output delay • Small setup time • Small hold time→Inherent race immunity • • • • • • • Low power Small clock load High driving capability Integration of logic into flip-flop Multiplexed or clock scan Robustness Crosstalk insensitivity - dynamic/high impedance nodes are affected 19 Sources of Noise Courtesy of IEEE Press, New York. © 2000 20 10 Gate Isolation Courtesy of IEEE Press, New York. © 2000 21 Flip-Flop Robustness Robustness of the storage node Input isolation Data stored statically, max resistance limit Min capacitance limit Preventing storage node exposure 22 11 Types of Flip-Flops Latch Pair (Master-Slave) Pulse-Triggered Latch L1 Data L2 D Q D Q Clk Clk L Data Clk D Q Clk Clk 23 Flip-Flop Delay z z Sum of setup time and Clk-output delay is the true measure of the performance with respect to the system speed T = TClk-Q + TLogic + Tsetup+ Tskew D Q Logic D Q N Clk TClk-Q Clk TLogic TSetup 24 12 Delay vs. Setup/Hold Times 350 300 Minimum Data-Output Clk-Output [ps] 250 200 150 Setup Hold 100 50 0 -200 -150 -100 -50 0 50 100 150 200 Data-Clk [ps] 25 Master-Slave Latch Pairs Positive setup times z Two clock phases: z » distributed globally » generated locally Small penalty in delay for incorporating MUX z Some circuit tricks needed to reduce the overall delay z 26 13 Master-Slave Latch Pairs Case 1: PowerPC 603 (Gerosa, JSSC 12/94) Vdd Clk Vdd Clkb Q D Clkb Clk 27 T-G Master-Slave Latch •Feedback added for static operation •Unbuffered input àinput capacitance depends on the phase of the clock àover-shoot and under-shoot with long routes àwirelength must be restricted at the input •Clock load is high •Low power •Small clk-output delay, but positive setup 28 14 Master-Slave Latches Vdd Case 2: C2MOS Vdd Ck Ckb Ckb Ck D Vdd Q Vdd Clk Vdd Vdd Ck Feedback added for static operation Locally generated clock Poor driving capability Vdd Vdd Ckb Ck Ck Ckb 29 Master-Slave TSPC Flip-flops VDD VDD φ D φ D φ (a) Positive edge-triggered D flip-flop D φ VDD φ VD D D φ φ D φ φ VDD VDD φ Y X VDD VDD (b) Negative edge-triggered D flip-flop VDD D (c) Positive edge-triggered D flip-flop using split-output latches 30 15 Pulse-Triggered Latches •First stage is a pulse generator àgenerates a pulse (glitch) on a rising edge of the clock •Second stage is a latch àcaptures the pulse generated in the first stage •Pulse generation results in a negative setup time •Frequently exhibit a soft edge property •Note: power is always consumed in the pulse generator 31 Pulsed Latch Simple pulsed latch Kozu, ISSCC’96 32 16 Intel/HP Itanium 2 Naffziger, ISSCC’02 33 Pulse-Triggered Latches Hybrid Latch Flip-Flop, AMD K-6 Partovi, ISSCC’96 Vdd Q Q D Clk 34 17 HLFF Operation 1-0 and 0-1 transitions at the input with 0ps setup time 35 Hybrid Latch Flip-Flop Skew absorption Partovi et al, ISSCC’96 36 18 Pulse-Triggered Latches AMD K-7 37 Courtesy of IEEE Press, New York. © 2000 Pulse-Triggered Latches Semi-Dynamic Flip-Flop (SDFF), Sun UltraSparc III, Klass, VLSI Circuits’98 Vdd Vdd Q Q D Clk Pulse generator is dynamic, cross-coupled latch is added for robustness. Loses soft edge on rising transition Latch has one transistor less in stack - faster than HLFF, but 1-1 glitch exists Small penalty for adding logic 38 19 Pulse-Triggered Latches 7474, from early 1960’s S Q Clk Q R D 39 Pulse-Triggered Latches Case 4: Sense-amplifier-based flip-flop, Matsui 1992. DEC Alpha 21264, StrongARM 110 First stage is a sense amplifier, precharged to high, when Clk = 0 After rising edge of the clock sense amplifier generates the pulse on S or R The pulse is captured in S-R latch Cross-coupled NAND has different propagation delays of rising and falling edges 40 20 Sense Amplifier-Based Flip-Flop 41 Courtesy of IEEE Press, New York. © 2000 Flip-Flop Performance Comparison Test bench Data Total power consumed internal power Clock data power clock power Measured for four cases no activity (0000… and 1111…) maximum activity (0101010..) average activity (random sequence) D Q Clk Q 200fF 200fF 50fF Delay is (minimum D-Q) Clk-Q + setup time Stojanovic, Oklobdzija JSSC 4/99 42 21 Flip-Flop Performance Comparison 70 Total power [uW] 60 TG M-S 50 Original SAFF HLFF 40 30 2 mSAFF 20 C MOS SDFF 10 0 100 150 200 250 300 350 400 450 500 Delay [ps] 43 Sampling Window Comparison Naffziger, JSSC 11/02 44 22 Local Clock Gating 2 Q CKI 0.85 D 1.2 0.85 DI 0.5 0.85 0.5 0.5 CKIB CKIB 0.5 0.5 Data-Transition Look-Ahead Pulse Generator 0.85 0.5 0.85 0.5 XNOR CKIB 0.85 ‘Clock on demand’ Flip-flop CKI CP 0.5 45 Next Lecture Timing 46 23