Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania 18042 ECE 491 - Senior Design I Lecture 12 - Metastability.

Slides:



Advertisements
Similar presentations
1 Lecture 16 Timing  Terminology  Timing issues  Asynchronous inputs.
Advertisements

Aug Data/Clock Synchronization Fourteen ways to fool your synchronizer Ginosar, R.; Asynchronous Circuits and Systems, Proceedings. Ninth International.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 10 - Communicating.
Designing Sequential Logic Circuits
ELEC 256 / Saif Zahir UBC / 2000 Timing Methodology Overview Set of rules for interconnecting components and clocks When followed, guarantee proper operation.
Lecture 11: Sequential Circuit Design. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 11: Sequential Circuits2 Outline  Sequencing  Sequencing Element Design.
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 24: November 4, 2011 Synchronous Circuits.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI Circuit Design Lecture 16 - Sequential.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #13 Clock Skew & Synchronization.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI Circuit Design Lecture 17 - Sequential.
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.
1 EE121 John Wakerly Lecture #16 Synchronous Design Methodology Asynchronous Inputs Synchronizers and Metastability.
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)
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 7 - Synchronizers.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI Circuit Design Lecture 24 - Subsystem.
ENGIN112 L28: Timing Analysis November 7, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 28 Timing Analysis.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 6 –Selected Design Topics Part 3 – Asynchronous.
EE141 © Digital Integrated Circuits 2nd Timing Issues 1 Latch-based Design.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 23 - Course.
Sequential Logic 1  Combinational logic:  Compute a function all at one time  Fast/expensive  e.g. combinational multiplier  Sequential logic:  Compute.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Timing and Metastability.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 12 - Timing, Project.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania Computer Organization Pipelined Processor Design 1.
Embedded Systems Hardware:
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Data Communications.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 14 - Reading Technical.
S. Reda EN160 SP’08 Design and Implementation of VLSI Systems (EN1600) Lecture 22: Sequential Circuit Design (1/2) Prof. Sherief Reda Division of Engineering,
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 15 - Handshaking.
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:
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 4 - Verilog 2 (Sequential.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE VLSI System Design Lecture 4 - Advanced Verilog.
Introduction to CMOS VLSI Design Lecture 10: Sequential Circuits
1 EE365 Synchronous Design Methodology Asynchronous Inputs Synchronizers and Metastability.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 17 - Pipelined.
CS 151 Digital Systems Design Lecture 28 Timing Analysis.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 10 - Data Communications.
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)
Flip-Flops.
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.
Lecture 5. Sequential Logic 3 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
© 2003 Xilinx, Inc. All Rights Reserved FPGA Design Techniques.
Rabie A. Ramadan Lecture 3
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
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.
Computer Architecture Lecture 4 Sequential Circuits Ralph Grishman September 2015 NYU.
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.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
How Computers Work Lecture 8 Page 1 How Computers Work Lecture 8 Asynchronous State Machines and Metastability.
Introduction to Sequential Logic Design Bistable elements.
BR 8/991 DFFs are most common Most programmable logic families only have DFFs DFF is fastest, simplest (fewest transistors) of FFs Other FF types (T, JK)
Lecture 11: FPGA-Based System Design October 18, 2004 ECE 697F Reconfigurable Computing Lecture 11 FPGA-Based System Design.
Sp09 CMPEN 411 L18 S.1 CMPEN 411 VLSI Digital Circuits Spring 2009 Lecture 16: Static Sequential Circuits [Adapted from Rabaey’s Digital Integrated Circuits,
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Sequential Networks: Timing and Retiming
1 COMP541 Sequential Logic Timing Montek Singh Sep 30, 2015.
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 24: November 5, 2012 Synchronous Circuits.
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 20: October 25, 2010 Pass Transistors.
ECE 331 – Digital System Design Introduction to Sequential Circuits and Latches (Lecture #16)
Lecture 4. Sequential Logic #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
Sequential circuit design with metastability
ECE434a Advanced Digital Systems L06
Metastability - When Good Flip-Flop Goes Bad: Causes and Cure
Lecture 19 Logistics Last lecture Today
Presentation transcript:

Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 12 - Metastability Fall 2007 Homework due Friday 10/3: Metastability problem, p. 18

ECE 491 Fall 2006Lecture 12 - Metastability2 Where we are  Last Time:  Data Communications 2 Asynchronous Serial Receiver Transmission codes for Clock Recovery (Manchester Codes)  Today:  Synchronizers & Metastability

ECE 491 Fall 2006Lecture 12 - Metastability3 Review - Synchronizers  Key idea: make sure inputs don’t change at a “bad time” in sequential circuits in1 in2 in in1’ in clk in1 NS 11 transient

ECE 491 Fall 2006Lecture 12 - Metastability4 Review - Synchronizers  Add a D Flip-Flop on each asynchronous input  Synchronize each input only once  Q: What happens when set up & hold time violated? DQ clk in2_a in2_s DQ in1_a in1_s in1_a CLK in1_s in2_a in1_s

ECE 491 Fall 2006Lecture 12 - Metastability5 Review - Flip-Flop Timing Window  Input must be stable:  Setup time t setup before edge  Hold time t h after edge  Asynchronous inputs can violate this! D Q clk t setup thth CLK t CQ What happens here? in1_s in1_a

ECE 491 Fall 2006Lecture 12 - Metastability6 Metastability When bad things happen to good synchronizers Q: What happens when t su / t h constraints violated? A: It depends, but there are three scenarios 1.Circuit correctly records new D value 1.Circuit retains old D value for an extra cycle 3.Metastability - “stuck” between legal 0 and 1 until it “resolves” CLK D Q1 Q2 Q3 t su thth t clk-q Resolution Time t r

ECE 491 Fall 2006Lecture 12 - Metastability7 What Metastability Looks Like Image Source:

ECE 491 Fall 2006Lecture 12 - Metastability8 Metastability  Two stable states  V o1 =L, V o2 =H  V o1 =H, V o2 =L  One metastable state  V o1 = V o2  Ugly characteristic: unbounded recovery time t r Graphic source: J. Rabaey, Digital Integrated Circuits, © Prentice-Hall, 1996 Metastable point

ECE 491 Fall 2006Lecture 12 - Metastability9 Metastability - “Ball on the Hill” Analogy  Sides of hill = stable states  Top of hill = metastable state  Gravity = gain of inverters  Any small “push” (e.g., noise) will move the ball off the hill and into a stable state

ECE 491 Fall 2006Lecture 12 - Metastability10 Metastability - Bad News / Good News  Bad news  Metastability is unavoidable  Recovery time is theoretically unbounded  Good news  Can empirically measure recovery times  Can use statistics from recovery times to make failure probability arbitrarily small  Most FPGAs are highly resistant to metastability

ECE 491 Fall 2006Lecture 12 - Metastability11 Measuring Metastability Characteristics  Intentionally cause metastability many times  Measure recovery for each occurrence  Fit recovery times to exponential function t clk-q Number Of Occurrences Recovery Time

ECE 491 Fall 2006Lecture 12 - Metastability12 Designing with Metastability  A synchronizer design at a given clock period provides a fixed amount of resolution time tr  Definition: a synchronization failure occurs when actual recovery time t r-actual > t r-available  For a given flip-flop, the mean time between failure (MTBF) is given by the formula f clk - System clock freq. a - asynchronous input rate of change.  - empirically derived constant T o - empirically derived constant t r - time available for resolution

ECE 491 Fall 2006Lecture 12 - Metastability13 Determining Resolution Time t r  Time available for metastability resolution t r = t clk - t setup - t prop Comb. Logic D Q D Q clk t prop t su

ECE 491 Fall 2006Lecture 12 - Metastability14 Resolution Time Example  Suppose that  f clk = 100MHz (t clk = 10ns)  a = 1MHz  t prop = 6.7ns  t setup = 1ns  Calculate t r :  t r = t clk - t setup - t prop  t r = 10ns - 6.7ns -1ns = 2.3ns Comb. Logic D Q D Q clk t prop =6.7ns t su =1ns

ECE 491 Fall 2006Lecture 12 - Metastability15 MTBF Calculation Example  “Typical” values for a 0.25µm ASIC library flip-flop   = 0.31ns  T o = 9.6as “as” = s  t r = 2.3ns  MTBF = 20.1 days - unacceptable!

ECE 491 Fall 2006Lecture 12 - Metastability16 What happens if we halve f clk ?  Suppose that  f clk = 50MHz (t clk = 20ns)  a = 1MHz  t prop = 6.7ns  t setup = 1ns  Calculate t r and MTBF:  t r = t clk - t setup - t prop  t r = 20ns - 6.7ns -1ns = 12.3ns  MTBF = 5.7 X seconds = 1.8 X years

ECE 491 Fall 2006Lecture 12 - Metastability17 Alternative: Dual-Stage Synchronizer  Increased value for t r : t r = t clk - t su - t pr t r = 10ns - 1ns = 9ns Comb. Logic D Q D Q clk t prop t su D Q

ECE 491 Fall 2006Lecture 12 - Metastability18 Dual-Stage MTBF Calculation  “Typical” values for a 0.25µm ASIC library flip-flop   = 0.31ns  T o = 9.6as “as” = s  t r = 9ns  Other timing information:  f = 100 MHz  a = 1 MHz  Homework:  MTBF = ?  How much better is this than the single-stage synchronizer? Answer: 4.23 X s = 8.05 X 10 9 years

ECE 491 Fall 2006Lecture 12 - Metastability19 Other Synchronizer Alternatives  Metastability-hardened SYNC flip-flops  Multiple-Stage Synchronizers  Reduced-Clock Synchronizers

ECE 491 Fall 2006Lecture 12 - Metastability20 Reality Check: What about FPGAs?  Metastability info in FPGAs is scarce  One refrerence: Peter Alfke, “Metastability Delay and Mean Time Between Failures in Virtex-II Pro FFs”, October  Some statistical measurements for Virtex-II Pro FPGAs  Major conclusion: Metastability issues are not much of a problem

ECE 491 Fall 2006Lecture 12 - Metastability21 MTBF Calculation Example - Virtex II Pro  Values from a Xilinx Technical note:   = 0.02ns ps (assume 0.05ps)  T o = not given, but assume = 9.6as “as” = s  t r = 2.3ns  MTBF = 9.89 X seconds = 7,53 X years - not to worry!

ECE 491 Fall 2006Lecture 12 - Metastability22 What to Do About Metastability  Start with simple synchronizer (single flip-flop)  Calculate MTBF for your system  Decide if it's acceptable  If not, use a different design  OR different design:  Two-stage flip-flop  Reduced-clock synchronizers

ECE 491 Fall 2006Lecture 12 - Metastability23 Coming Up  Detailed Design  Handshaking  Manchester Transmitter / Receiver  Ethernet