Metastability. Introduction. Metastability. in Altera Devices

Similar documents
Sequential Logic Design: Controllers

Sequential vs. Combinational

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

ELCT201: DIGITAL LOGIC DESIGN

Stop Watch (System Controller Approach)

Chapter 3. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 3 <1>

Evaluating Power. Introduction. Power Evaluation. for Altera Devices. Estimating Power Consumption

Synchronous Sequential Circuit Design. Digital Computer Design

Chapter 3. Chapter 3 :: Topics. Introduction. Sequential Circuits

Synchronous 4 Bit Counters; Binary, Direct Reset

CHAPTER 9: SEQUENTIAL CIRCUITS

Chapter 7 Sequential Logic

Digital Electronics Final Examination. Part A

NTE40160B, NTE40161B NTE40162B, NTE40163B Integrated Circuit CMOS, Synchronous Programmable 4 Bit Counters

Sequential Logic Worksheet

EET 310 Flip-Flops 11/17/2011 1

Problem Set 9 Solutions

Sequential Circuits Sequential circuits combinational circuits state gate delay

MM74HC161 MM74HC163 Synchronous Binary Counter with Asynchronous Clear Synchronous Binary Counter with Synchronous Clear

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

DM74ALS109A Dual J-K Positive-Edge-Triggered Flip-Flop with Preset and Clear

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

CPE/EE 422/522. Chapter 1 - Review of Logic Design Fundamentals. Dr. Rhonda Kay Gaede UAH. 1.1 Combinational Logic

MOSIS REPORT. Spring MOSIS Report 1. MOSIS Report 2. MOSIS Report 3

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Topic 8: Sequential Circuits

CHW 261: Logic Design

Digital Fundamentals

ALU, Latches and Flip-Flops

5. Sequential Logic x Computation Structures Part 1 Digital Circuits. Copyright 2015 MIT EECS

Synchronous Sequential Logic

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Boolean Logic Continued Prof. James L. Frankel Harvard University

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

Sequential Circuit Timing. Young Won Lim 11/6/15

Solution (a) We can draw Karnaugh maps for NS1, NS0 and OUT:

DM74LS74A Dual Positive-Edge-Triggered D Flip-Flops with Preset, Clear and Complementary Outputs

UNIVERSITY OF CALIFORNIA

PC100 Memory Driver Competitive Comparisons

Integrated Circuits & Systems

Lab 3 Revisited. Zener diodes IAP 2008 Lecture 4 1

CMPEN 411. Spring Lecture 18: Static Sequential Circuits

University of Minnesota Department of Electrical and Computer Engineering

Digital Electronics. Part A

8-BIT SYNCHRONOUS BINARY UP COUNTER

74ACT825 8-Bit D-Type Flip-Flop

74ACT Bit D-Type Flip-Flop with 3-STATE Outputs


S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

Digital Electronics II Mike Brookes Please pick up: Notes from the front desk

DM74S373 DM74S374 3-STATE Octal D-Type Transparent Latches and Edge-Triggered Flip-Flops

NTE74177 Integrated Circuit TTL 35Mhz Presettable Binary Counter/Latch


DM7490A Decade and Binary Counter

Fundamentals of Computer Systems

74LV393 Dual 4-bit binary ripple counter

DM7473 Dual Master-Slave J-K Flip-Flops with Clear and Complementary Outputs

NTE74176 Integrated Circuit TTL 35Mhz Presettable Decade Counter/Latch

CPE100: Digital Logic Design I

Synchronizers, Arbiters, GALS and Metastability

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package. *MR for LS160A and LS161A *SR for LS162A and LS163A

54LS160A DM74LS160A 54LS162A DM74LS162A Synchronous Presettable BCD Decade Counters

MM74C922 MM74C Key Encoder 20-Key Encoder

DM54LS73A DM74LS73A Dual Negative-Edge-Triggered

74F194 4-Bit Bidirectional Universal Shift Register

Counters. We ll look at different kinds of counters and discuss how to build them

MM54HC73 MM74HC73 Dual J-K Flip-Flops with Clear

74F379 Quad Parallel Register with Enable

04. What is the Mod number of the counter circuit shown below? Assume initially reset.

UNISONIC TECHNOLOGIES CO., LTD U74HC164

NTE74HC299 Integrated Circuit TTL High Speed CMOS, 8 Bit Universal Shift Register with 3 State Output

54173 DM54173 DM74173 TRI-STATE Quad D Registers

6. Finite State Machines

Sequential Logic. Road Traveled So Far

Features. Y Wide supply voltage range 3 0V to 15V. Y High noise immunity 0 45 VDD (typ ) Y Low power TTL fan out of 2 driving 74L

Homework Assignment #1 Solutions EE 477 Spring 2017 Professor Parker

74F175 Quad D-Type Flip-Flop

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill

DM74LS90/DM74LS93 Decade and Binary Counters

Digital Circuits ECS 371

P2 (10 points): Given the circuit below, answer the following questions:

EECS150 - Digital Design Lecture 23 - FSMs & Counters

ΗΜΥ 307 ΨΗΦΙΑΚΑ ΟΛΟΚΛΗΡΩΜΕΝΑ ΚΥΚΛΩΜΑΤΑ Εαρινό Εξάμηνο 2018

Adders allow computers to add numbers 2-bit ripple-carry adder

8-bit binary counter with output register; 3-state

74LVC574A Octal D-type flip-flop with 5-volt tolerant inputs/outputs; positive edge-trigger (3-State)

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

Designing Sequential Logic Circuits

Digital Logic Design - Chapter 4

MARKING DIAGRAMS DIP PIN ASSIGNMENT ORDERING INFORMATION FUNCTION TABLE CDIP 16 L SUFFIX CASE 620 MC10136L AWLYYWW

54LS109 DM54LS109A DM74LS109A Dual Positive-Edge-Triggered J-K Flip-Flops

Exercise booklet - Logic

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

DATA SHEET. HEF40163B MSI 4-bit synchronous binary counter with synchronous reset. For a complete data sheet, please also download:

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

DM74LS373 DM74LS374 3-STATE Octal D-Type Transparent Latches and Edge-Triggered Flip-Flops

Chapter 5. Digital Design and Computer Architecture, 2 nd Edition. David Money Harris and Sarah L. Harris. Chapter 5 <1>

14:332:231 DIGITAL LOGIC DESIGN. Organizational Matters (1)

74LVC823A 9-bit D-type flip-flop with 5-volt tolerant inputs/outputs; positive-edge trigger (3-State)

Transcription:

in Altera Devices May 1999, ver. 4 Application Note 42 Introduction The output of an edge-triggered flipflop has two valid states: high and low. To ensure reliable operation, designs must meet the flipflop s timing requirements. The input to the flipflop must be stable for a minimum time before the clock edge (register setup time or t SU ) and a minimum time after the clock edge (register hold time or t H ). Specific values for t SU and t H are provided in each device family data sheet in this data book, or they can be determined using the MAX+PLUS II Timing Analyzer. In non-synchronous systems, if the asynchronous input signals violate a flipflop s timing requirements, the output of the flipflop can become metastable. Metastable outputs oscillate or hover between high and low states for a brief period of time, which can cause system failure. Therefore, you must analyze the metastability characteristics of a device to determine the reliability of a non-synchronous design. In synchronous systems, the input signals always meet the flipflop s timing requirements; therefore, metastability does not occur. This application note describes metastability, how it is quantified, and how to minimize its effect. It also includes metastability data for the Altera FLEX 10K, FLEX 8000, FLEX 6000, MAX 9000, and MAX 7000 devices that can be used to estimate a system s mean time between failures (MTBF) when using these devices to synchronize asynchronous data. Violating a flipflop s setup or hold time can cause its output to become metastable. When a flipflop is in a metastable ( in between ) state, the output hovers at a voltage level between high and low, causing the output transition to be delayed beyond the specified clock-to-output delay (t CO ). The additional time beyond t CO that a metastable output takes to resolve to a stable state is called the settling time (t MET ). Not every transition that violates the setup or hold times results in a metastable output. The likelihood that a flipflop enters a metastable state and the time required to return to a stable state varies depending on the process technology used to manufacture the device and on the ambient conditions. Generally, flipflops will quickly return to a stable state (see Figure 1). Altera Corporation 1 A-AN-042-04

Figure 1. Timing Parameters DATA CLK t SU t H Q t CO t MET The operation of a register is analogous to a ball rolling over a frictionless hill, as shown in Figure 2. Each side of the hill represents a stable (i.e., high or low) state, and the top of the hill represents the metastable state. When a flipflop s data input complies with minimum setup (t SU ) and hold (t H ) times, the output passes from one stable state to another (i.e., from high to low or low to high) without an additional delay. Analogously, the ball travels over the hill within a specified time if given enough of a push. However, when a flipflop s data input violates the setup or hold time, the flipflop is marginally triggered, and the output may not immediately resolve to either of the two stable states within the specified time. This marginal triggering can cause the output to glitch or to remain temporarily at a metastable state between the high and low logic levels, taking longer to return to a stable state. Either condition increases the delay from the clock transition to a stable output. Figure 2. Effects of Violating t SU & t H Requirements Metastable State Metastable State Stable 0 Stable 1 Stable 0 Stable 1 Output glitches. Output temporarily remains at a metastable state and may return to either stable state, incurring additional delays. 2 Altera Corporation

does not necessarily cause unpredictable system performance. If the wait time is sufficient to allow the flipflop to settle to a stable state, metastability does not affect the system; the output of the flipflop can temporarily have an undefined value, provided that it returns to a known value before the signal is evaluated. Therefore, allowing additional time (t MET ) for the signal to settle to a known state prevents the propagation of an undefined value to the rest of the system. Analyzing The MTBF value quantitatively shows how metastability affects your design. The MTBF provides an estimate of the mean time between the probable occurrence of two successive metastable events. The MTBF of a synchronizing flipflop can be estimated with the following formula: MTBF ( e C 2 t MET ) = ------------------------------------------------------- C 1 f CLOCK f DATA The f CLOCK parameter refers to the system clock frequency while the f DATA parameter refers to the data transfer frequency. The t MET parameter is the additional time allowed by the system for the flipflop to settle to a stable state. The constants C 1 and C 2 vary according to the process technology used to manufacture the device. Therefore, different devices manufactured with the same process have similar values for C 1 and C 2. The constants C 1 and C 2 are determined by plotting the natural log of MTBF versus t MET and performing a linear regression analysis on the data. The y- intercept and slope of the resulting line determine the values of C 1 and C 2. The formulas for the constants C 1 and C 2 are shown below: C 2 = ln( MTBF) ------------------------------ t MET ( ) e C 2 t MET C 1 = ------------------------------------------------------------------ MTBF f CLOCK f DATA Figure 3 shows the relationship between the MTBF and t MET and shows how changing C 1, C 2, and the system frequency affects this relationship. Altera Corporation 3

Figure 3. MTBF vs. t MET 10 9 10 Years Increasing Clock 10 8 Frequency 1 Year 10 7 1 Month 1 Week 10 6 C 1 MTBF (Seconds) 1 Day 1 Hour 10 5 10 4 10 3 C 2 10 2 1 Minute 10 1 10 0 1 2 3 4 5 6 t MET (ns) The constant C 1 scales the MTBF equation linearly, shifting the entire curve up or down. The constant C 2 affects the slope of the MTBF vs. t MET curve. Increasing the clock frequency shifts the entire curve to the right, lowering the MTBF value for a given settling time. Once the values for C 1 and C 2 are determined for a particular device, you can use the MTBF equation shown on page 3 to calculate the MTBF of a system with a given settling time (t MET ). The t MET delay is the additional time required for the flipflop to resolve to a legal state, i.e. the difference between the minimum system clock period and the actual clock period. You can also use the metastability equation to determine the t MET delay required for a given MTBF value, as shown below: ln( MTBF f t CLOCK f DATA C 1 ) MET = ----------------------------------------------------------------------------------------- C 2 4 Altera Corporation

Test Circuitry Figure 4 shows the test circuit used to determine the metastability characteristics of Altera devices. In this figure, one flipflop has asynchronous clock and data inputs. The logic that generates the metastable event and the logic that detects it are both located in the device under test (DUT). The output of the synchronizing flipflop is fed directly to one of the resolving flipflops and through an inverter to the other resolving flipflop. The outputs of the resolving flipflops feed an XNOR gate that is at a high logic level when the values of the outputs (the signal and its complement) are the same. If the resolving flipflops detect that the signal and its complement have the same logical value, a metastable event has occurred and the counter is incremented. Figure 4. Test Circuit clr All logic is part of the device under test. data clk Resolving Flipflops 16-Bit Counter Synchronizing Flipflop ENA TO LED Display Because the resolving flipflops are clocked by the falling clock edge, the required settling time can be controlled by changing the clock high time ( t). The settling time t MET can be determined with the equation below. The t ACNT delay is the minimum clock period, which is equal to the minimum delay from the clock edge to the output of the synchronizing flipflop, plus the delay from the output of the synchronizing flipflop to the input of the resolving flipflops, plus the setup time of the resolving flipflop. The t MET parameter is the minimum time allowed under normal operation of the circuit: t MET = t t ACNT Altera Corporation 5

Characteristics of Altera Devices Figure 5 shows the metastability characteristics of FLEX 10K, FLEX 8000, FLEX 6000, MAX 9000, and MAX 7000 devices. For all devices, f DATA is 1 MHz and f CLOCK is 10 MHz. Figure 5. Characteristics of Altera Devices 10 11 10 10 FLEX 10K, FLEX 8000 & FLEX 6000 MTBF (Seconds) 10 Years 1 Year 1 Month 1 Week 1 Day 1 Hour 10 9 10 8 10 7 10 6 10 5 10 4 10 3 MAX 9000 & MAX 7000 10 2 1 Minute 10 1 10 0 1 2 3 4 5 6 t MET (ns) Table 1 summarizes the values of C 1 and C 2 for Altera s FLEX 10K, FLEX 8000, FLEX 6000, MAX 9000, and MAX 7000 devices. 6 Altera Corporation

Table 1. Equation Constants Device C 1 C 2 FLEX 10K 1.01 10 13 1.268 10 10 FLEX 8000 1.01 10 13 1.268 10 10 FLEX 6000 1.01 10 13 1.268 10 10 MAX 9000 2.98 10 17 5.023 10 9 MAX 7000 2.98 10 17 5.023 10 9 Applying the Equation You can use the C 1 and C 2 values listed in Table 1 to calculate the MTBF for a specific settling time, or you can calculate the minimum settling time for a specific MTBF. For example, the equation below calculates the t MET needed to ensure a MTBF of one year (approximately 3 10 7 seconds) for an EPF8452A device with a data frequency of 2 MHz and a clock frequency of 10 MHz. ln ( 3 10 7 ) + ln [( 10 10 6 )2 ( 10 6 )1.01 ( 10 13 ) ] t MET = -------------------------------------------------------------------------------------------------------------------------------- ns 1.268 10 10 = 1.41 When a MTBF of one year is required, 1.41 ns should be added to the clock-to-output delay (t CO ) of the synchronizing flipflop when performing timing analysis. Due to the logarithmic relationship between the MTBF and t MET, small changes in t MET dramatically affect the MTBF. If the required MTBF increases from one year to 10 years in the example shown above, the t MET delay increases to only 1.59 ns. Figures 6 and 7 show the t MET delay required for FLEX 10K, FLEX 8000, FLEX 6000, MAX 9000, and MAX 7000 devices when f DATA is one half of f CLOCK. Because the MTBF is inversely proportional to the value (f CLOCK f DATA ), these figures can be used to find the MTBF for many designs. is probabilistic, and MTBF values are mean values calculated for a limited sample of devices and should only be used to estimate t MET delays. Altera Corporation 7

Figure 6. FLEX 10K, FLEX 8000 & FLEX 6000 MTBF Values 1,000 Years 10 11 10 10 100 Years 10 9 10 Years 10 8 1 Year 10 7 MTBF (Seconds) 1 Month 1 Week 1 Day 1 Hour 10 6 10 5 10 4 10 3 f CLK = 10 MHz f CLK = 20 MHz f CLK = 40 MHz f CLK = 80 MHz 1 Minute 10 2 10 1 10 0 0 1 2 3 4 5 t MET (ns) 8 Altera Corporation

Figure 7. MAX 9000 & MAX 7000 MTBF Values 1,000 Years 10 11 10 10 100 Years 10 9 10 Years 10 8 1 Year 10 7 MTBF (Seconds) 1 Month 1 Week 1 Day 1 Hour 10 6 10 5 10 4 f CLK = 10 MHz f CLK = 20 MHz f CLK = 40 MHz f CLK = 80 MHz 10 3 10 2 1 Minute 10 1 10 0 0 1 2 3 4 5 t MET (ns) Avoiding Several techniques can be used to reduce metastability in a system. If an asynchronous signal is fed to several flipflops, the probability that a metastable event will occur greatly increases because there are more flipflops that could become metastable. In this case, you can avoid metastability by using the output of the synchronizing flipflop throughout the system rather than the asynchronous signal. You can also avoid the negative effects of metastability by adding the t MET calculated for a specific MTBF to the worst-case timing delay calculations, giving the output of the synchronizing flipflops time to settle. Faster devices provide faster t CO and t SU times, which provide additional time for the t MET delay without sacrificing overall system speed. Altera Corporation 9

To reduce the effects of metastability, designers most commonly use a multiple-stage synchronizer in which two or more flipflops are cascaded to form a synchronization circuit (see Figure 8). If the synchronizing flipflop produces a metastable output, the metastable signal may resolve before it is clocked by the second flipflop. This method does not guarantee that the second flipflop will not clock an undefined value, but it dramatically increases the probability that the data will go to a valid state before it reaches the rest of the circuit. Figure 8. Multiple-Stage Synchronizer asynch clk One drawback of the multiple-stage synchronizer is that it takes longer for the system to respond to an asynchronous input. A solution to this problem is to use the output of a ClockBoost clock doubler to clock the two synchronizing flipflops. See Figure 9. This approach allows the system to respond to an asynchronous input within one system clock cycle, while still improving MTBF. Although the ClockBoost clock could decrease the MTBF, this effect is more than offset by the two synchronizing flipflops. Figure 9. Multiple-Stage Synchronizer with ClockBoost Circuitry Synchronizing Registers asynch To Rest of Circuit clkx2 (From ClockBoost Circuit) clk To Rest of Circuit Conclusion is a phenomenon that only affects flipflops used to synchronize data from asynchronous systems. The metastability characteristics for a particular device depend on the process technology used to manufacture the device and on ambient conditions. Altera devices have very good metastability characteristics; you only need to add a small t MET delay to the t CO delay to achieve a high MTBF value. 10 Altera Corporation

Copyright 1995, 1996, 1997, 1998, 1999 Altera Corporation, 101 Innovation Drive, San Jose, CA 95134, USA, all rights reserved. By accessing this information, you agree to be bound by the terms of Altera s Legal Notice.