111/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally EE108A Lecture 13: Metastability and Synchronization Failure (or When Good Flip-Flops go Bad)

Slides:



Advertisements
Similar presentations
D-Type Flip Flops Benchmark Companies Inc PO Box
Advertisements

D Flip-Flop.
1 Lecture 16 Timing  Terminology  Timing issues  Asynchronous inputs.
Aug Data/Clock Synchronization Fourteen ways to fool your synchronizer Ginosar, R.; Asynchronous Circuits and Systems, Proceedings. Ninth International.
11/12/2004EE 42 fall 2004 lecture 311 Lecture #31 Flip-Flops, Clocks, Timing Last lecture: –Finite State Machines This lecture: –Digital circuits with.
EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
Give qualifications of instructors: DAP
ELEC 256 / Saif Zahir UBC / 2000 Timing Methodology Overview Set of rules for interconnecting components and clocks When followed, guarantee proper operation.
CS 151 Digital Systems Design Lecture 19 Sequential Circuits: Latches.
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.
Synchronous Digital Design Methodology and Guidelines
1 Digital Design: State Machines Timing Behavior Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth, Fundamentals.
Assume array size is 256 (mult: 4ns, add: 2ns)
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 6 –Selected Design Topics Part 3 – Asynchronous.
11/19/2004EE 42 fall 2004 lecture 341 Lecture #34: data transfer Last lecture: –Example circuits –shift registers –Adders –Counters This lecture –Communications.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Timing and Metastability.
Embedded Systems Hardware:
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 12 - Metastability.
Asynchronous Input Example Program counter normally increments, jumps to address of interrupt subroutine on asynchronous interrupt How many states can.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
11/10/2004EE 42 fall 2004 lecture 301 Lecture #30 Finite State Machines Last lecture: –CMOS fabrication –Clocked and latched circuits This lecture: –Finite.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 15 - Handshaking.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
CSE 140L Lecture 6 Interface and State Assignment Professor CK Cheng CSE Dept. UC San Diego 1.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
EE 4271 VLSI Design, Fall 2010 Sequential Circuits.
Embedded Systems Hardware: Storage Elements; Finite State Machines; Sequential Logic.
Fall 2007 L16: Memory Elements LECTURE 16: Clocks Sequential circuit design The basic memory element: a latch Flip Flops.
CS 140L Lecture 4 Professor CK Cheng 10/22/02. 1)F-F 2)Shift register 3)Counter (Asynchronous) 4)Counter (Synchronous)
Digital Logic Design CHAPTER 5 Sequential Logic. 2 Sequential Circuits Combinational circuits – The outputs are entirely dependent on the current inputs.
1 CSE370, Lecture 14 Lecture 14 u Logistics n Midterm 1: Average 90/100. Well done! n Midterm solutions online n HW5 due date delayed until this Friday.
1 CSE370, Lecture 16 Lecture 19 u Logistics n HW5 is due today (full credit today, 20% off Monday 10:29am, Solutions up Monday 10:30am) n HW6 is due Wednesday.
© 2010 Blended Integrated Circuit Systems, LLC Tom Chaney, Dave Zar, Metastability (What?) TexPoint fonts used in.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Design a clock synchronous sequential circuit with two inputs A, B and a single.
COE 202: Digital Logic Design Sequential Circuits Part 1
Finite State Machines. Binary encoded state machines –The number of flip-flops is the smallest number m such that 2 m  n, where n is the number of states.
Lecture 5. Sequential Logic 3 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Copyright © 1997 Altera Corporation 9/12/97 Asynchronous vs Synchronous Circuit Design Danny Mok Altera HK FAE
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
1 CSE370, Lecture 17 Lecture 17 u Logistics n Lab 7 this week n HW6 is due Friday n Office Hours íMine: Friday 10:00-11:00 as usual íSara: Thursday 2:30-3:20.
Lecture #26 Page 1 ECE 4110– Sequential Logic Design Lecture #26 Agenda 1.State Encoding 2.Pipelined Outputs 3.Asynchronous Inputs Announcements 1.n/a.
IT253: Computer Organization Lecture 9: Making a Processor: Single-Cycle Processor Design Tonga Institute of Higher Education.
MicroComputer Engineering DigitalCircuits slide 1 Combinational circuits Changes at inputs propagate at logic speed to outputs Not clocked No internal.
SoC Clock Synchronizers Project Elihai Maicas Harel Mechlovitz Characterization Presentation.
Sequential Networks: Timing and Retiming
Copyright © 2007 Elsevier3- Sequential Logic Circuits Design.
Lecture 5. Sequential Logic 1 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
EE141 Timing Issues 1 Chapter 10 Timing Issues Rev /11/2003.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
2018/5/2 EE 4271 VLSI Design, Fall 2016 Sequential Circuits.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
LATCHED, FLIP-FLOPS,AND TIMERS
Chapter #6: Sequential Logic Design
Sequential Logic Combinational logic:
2018/8/29 EE 4271 VLSI Design, Fall 2013 Sequential Circuits.
D Flip-Flop.
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
CSE 370 – Winter Sequential Logic-2 - 1
Metastability - When Good Flip-Flop Goes Bad: Causes and Cure
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Lecture 19 Logistics Last lecture Today
Registers and Counters
2019/9/26 EE 4271 VLSI Design, Fall 2012 Sequential Circuits.
Presentation transcript:

111/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally EE108A Lecture 13: Metastability and Synchronization Failure (or When Good Flip-Flops go Bad)

211/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally What happens when we violate setup and hold time constraints?

311/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Look at structure of CMOS latch Storage loop gets initialized with an ‘analog’ value

411/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Storage loop has a metastable state between 0 and 1

511/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Dynamics of  V

611/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Dynamics of  V

Metastability Demonstration Circuit

811/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Metastability Demonstration Circuit - Implementation

911/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Metastable state of FF1 – 4007 Nand RS Latch

1011/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Over time the waveform fills in

1111/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally A Brute-Force Synchronizer

1211/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally What if AW is still in a metastable state when FF2 is clocked?

1311/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Calculating Synchronization Failure (The Big Picture) P(failure) = P(enter metastable state) x P(still in state after t w )

1411/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Probability of Entering a Metastable State FF1 may enter the metastable state if the input signal transitions during the setup+hold window of the flip flop Probability of a given transition being in the setup+hold window is the fraction of time that is setup+hold window

1511/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Probability of Staying in the Metastable State Still in metastable state if initial voltage difference was too small to be exponentially amplified during wait time Probability of starting with this voltage is proportion of total voltage range that is ‘too small’

1611/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Failure Probability and Error Rate Each event can potentially fail. Failure rate = event rate x failure probability

1711/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Example t s = t h = t dCQ =  =100ps t cy = 2ns must sample a f E = 1MHz asynchronous signal P E = (.1+.1)/2 = 0.1 P S = exp(-1.8/.1) = exp(-18) = 1.5 x P F = P S P E = 1.5 x f F = f E P F = 1.5 x failure every 656 seconds ~ every 11 minutes This is not adequate. How do we improve it? How do we get failure rate to one every 10 years ~ 3 x 10 8 s (f F < 3 x )

1811/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally How much difference does one FF make? Previous example: 2 FF brute-force synchronizer –1 failure every 11 minutes (f E = 1.5 x ) Add a third FF: –t s = t h = t dCQ =  =100ps (same) –t cy = 2ns (same) –must sample a f E = 1MHz asynchronous signal (same) –P E = (.1+.1)/2 = 0.1 (same) –P S = exp(-3.6/.1) = exp(-36) = 2.3 x –P F = P S P E = 2.3 x –f F = f E P F = 2.3 x (much) less than one failure every 10 years! Exponentials grow quickly. Adding one flip flop took us from 11 minutes to 1,300 years.

1911/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Synchronizing multi-bit signals Consider a 4-bit counter running on clk1 you need the value of this counter sampled by clk2. Will the following circuit work? (assume t w >>  ) This happens, for example, in a FIFO where the head and tail pointers are in different clock domains.

2011/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally When synchronizing a multi-bit signal, each changing bit is independently synchronized Consider what happens on the 0111 to 1000 transition. All bits are changing. Each can independently fall either way. How do you fix this? Multi-bit signals (2)

2111/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Each bit can fail either way!

2211/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Warning: The Surgeon General has determined that passing binary-coded and one-hot signals through a brute- force synchronizer can be hazardous to your circuits.

2311/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally # xxxx # 0000 # 0001 # 0011 # 0010 # 0110 # 0111 # 0101 # 0100 # 1100 # 1101 # 1111 # 1110 # 1010 # 1011 # 1001 # 1000 # 0000 # 0001 # 0011 # 0010 Gray code: only one bit changes each time How does this help? Remember each bit can fail either way. If we only change 1 bit each time, then what’s the worst that can happen? –0111 => cycle 1: 0101, cycle 2: 0101 (no failure) –0111 => cycle 1: 0111, cycle 2: 0101 (failure) On the second cycle we will have had even more time for our input to stabilize so we should be fine. By using Gray code the worst that happens is we see the transistion 1 cycle later.

2411/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Why do we care? Most designs have multiple clock domains –I.e., your PCI bus interface runs at 66MHz, but your image compression engine might run at 200MHz –You need to get data from the PCI bus to the image compression engine Example: DVD driver System-on-chip (SoC): Tsai, C., et. al., “A CMOS SoC for 56/32/56/16 Combo Driver Applications”, ISSC 2004

2511/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally Metastability and Synchronization Failure Summary Clocking a flip-flop during the “keepout” interval may leave the storage node in an “illegal state” Some “illegal states” are Metastable Time to decay to a legal state depends on log of initial voltage Probability of entering metastable state is probability of hitting “keepout” interval. Probability of staying in metastable state after time T is probability that initial voltage was too small to decay in time T Brute-force synchronizer – sample signal and wait for metastable states to decay. Don’t use on multi-bit signals unless they are Gray coded

2611/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally The end of ee108a… Any questions?