Chapter 9. Timing Design. (Based on Chapter 7 and Chapter 8 of Wakerly)

Similar documents
Chapter 9. Timing Design. (Based on Chapter 7 and Chapter 8 of Wakerly) Data Path Comb. Logic. Reg. Reg. Reg C <= A + B

Clock Generator 82C84A

Digital Fundamentals

Unit 11. Latches and Flip-Flops

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Digital System Design

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Lecture 8: Sequential Logic

Chapter 11 Latches and Flip-Flops

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

Engr354: Digital Logic Circuits

Fundamentals of Computer Systems

CHAPTER 1 LATCHES & FLIP-FLOPS

Fundamentals of Computer Systems

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

UNIT 11 LATCHES AND FLIP-FLOPS

Digital Circuits and Systems

CHAPTER 11 LATCHES AND FLIP-FLOPS

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

RS flip-flop using NOR gate

Chapter 2. Digital Circuits

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

PGT104 Digital Electronics. PGT104 Digital Electronics

Asynchronous (Ripple) Counters

Logic Design. Flip Flops, Registers and Counters

INTRODUCTION TO SEQUENTIAL CIRCUITS

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

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

RS flip-flop using NOR gate

Digital Fundamentals: A Systems Approach

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

The NOR latch is similar to the NAND latch

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Fundamentals of Computer Systems

Lecture 11: Sequential Circuit Design

Digital Fundamentals 11/2/2017. Summary. Summary. Floyd. Chapter 7. Latches

Counters

Basis of sequential circuits: the R-S latch

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

Clock and Asynchronous Signals

ECE321 Electronics I

Switching Circuits & Logic Design

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

IT T35 Digital system desigm y - ii /s - iii

Logic Gates, Timers, Flip-Flops & Counters. Subhasish Chandra Assistant Professor Department of Physics Institute of Forensic Science, Nagpur

CPS311 Lecture: Sequential Circuits

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

LATCHES & FLIP-FLOP. Chapter 7

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Lecture 21: Sequential Circuits. Review: Timing Definitions

Digital Fundamentals: A Systems Approach

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Sequential Circuits: Latches & Flip-Flops

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits

6. Sequential Logic Flip-Flops

Keeping The Clock Pure. Making The Impurities Digestible

Sequential Logic and Clocked Circuits

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

EE178 Spring 2018 Lecture Module 5. Eric Crabill

Slide Set 7. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

Sequential Circuit Design: Part 1

Chapter 5: Synchronous Sequential Logic

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Advanced Digital Logic Design EECS 303

D Latch (Transparent Latch)

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

Sequential Circuit Design: Part 1

Synchronous Sequential Logic

FLIP-FLOPS AND RELATED DEVICES

The University of Texas at Dallas Department of Computer Science CS 4141: Digital Systems Lab

Computer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Sequential Circuits


Asynchronous inputs. 9 - Metastability and Clock Recovery. A simple synchronizer. Only one synchronizer per input

EECS150 - Digital Design Lecture 10 - Interfacing. Recap and Topics

EE178 Lecture Module 4. Eric Crabill SJSU / Xilinx Fall 2005

Counter dan Register

Sequential Design Basics

give sequence to events have memory (short-term) use feedback from output to input to store information

FIFO Memories: Solution to Reduce FIFO Metastability

Introduction to Sequential Circuits

6.S084 Tutorial Problems L05 Sequential Circuits

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

System IC Design: Timing Issues and DFT. Hung-Chih Chiang

Project 6: Latches and flip-flops

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

ASYNCHRONOUS SEQUENTIAL CIRCUIT CONCEPTS

Switching Circuits & Logic Design

11. Sequential Elements

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

ELE2120 Digital Circuits and Systems. Tutorial Note 7

PRE J. Figure 25.1a J-K flip-flop with Asynchronous Preset and Clear inputs

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Transcription:

Chapter 9 Timing esign (Based on Chapter 7 and Chapter 8 of Wakerly) 1 Metastability in bistables, latches, and flip-flops Bistable uestion: How long the set or reset control should be active before becoming passive? Until the friendly echo arrives. S R If this pulse is short, then, may go into a metastable state S = 1=>0=>1 =0=>1 =1=>0 R = 1 -Latch If clock goes inactive immediately after changes, the latch can go into metastable state. See figure 7-12 (page 531) and figure 7-14 (page 531) in Wakerly. 4/12/06 EE201L Class Notes - Chapter #9 Page 1 / 9

-FF (positive edge triggered) If clock goes high immediately after changes, the master latch portion of the -FF can go into metastable state. See figure 7-15 (page 532) and figure 7-17 (page 533) in Wakerly. 2 Why would change around the clock Improper timing design Asynchronous inputs (push-button operation by a human) ue to clock Skew (clock may not reach all parts of the chip at the same exact time) 3 Setup time, Hold time, and Propagation delay of a Flip-Flop Setup time t su : The input shall be valid and stable for t su time before the significant edge of the clock. Hold time t h : The input shall be valid and stable for t h time [7:0] after the significant edge of the clock. Note: There is only one value for t su and t h : the minimum. There is no typical or maximum for these. After the clock edge, the output may change after a little time called propagation delay. t su t h 4/12/06 EE201L Class Notes - Chapter #9 Page 2 / 9

SN5474, SN54LS74A, SN54S74 SN7474. SN74LS74A, SN74S74 UAL -TYPE POSITIVE-EGE-TRIGGERE FLIP-FLOPS WITH PRESET AN CLEAR SLS119 ECEMBER 1983 REVISE MARCH 1988 min. only 4 POST OFFICE BOX 655303 ALLAS, TEXAS 75265 4/12/06 EE201L Class Notes - Chapter #9 Page 3 / 9

4 Timing Check, setup time margin and hold time margin X State machine Next State 0 1 State Memory 0 1 A B EN ata Path Comb. C C <= A + B Counter 0 Incrementer 1 0 1 Please see figure 8-1 (page 682), figure 8-63 (page 760) and figure 8-64 (page 760) in Wakerly Setup time Margin = t clk -t ffp(max) - t comb(max) - t setup(min) Hold time Margin = t ffp(min) + t comb(min) - t hold(min) 4/12/06 EE201L Class Notes - Chapter #9 Page 4 / 9

What is hold time and why do we need it? Consider a shift register. Serial In Serial Out Relation between t ffpd t h How do we fix hold time violation? How do we fix setup time violation? Where would you be concerned about the maximum delay path through the combinational logic? Where would you be concerned about the minimum delay path through the combinational logic? Comb. 4/12/06 EE201L Class Notes - Chapter #9 Page 5 / 9

5 Asynchronous Inputs: Examples of asynchronous inputs: Inputs from human, inputs from other subsystems working on a different independent clock If the asynchronous input changes too late into the clock, the system can go into a wrong state! A 1 0 X = 0 0 0 X = 1 C 1 0 1 B 0 1 0 0 1 1 0 1 1 Wrong state reached due to X changing rather late. X Asynchronous Next State 0 1 State Memory 0 1 Synchronization of asynchronous signals by using a synchronizing FF: XA X_Asynchronous Synchronizing flip-flop Sample-and-hold flip-flop XS X_Synchronized Next State 0 1 State Memory 0 1 Should this sampling edge be the same or opposite of the significant edge of the system? Simple intuitive answer: Well if it is the same edge we create a RACE condition. So it should be opposite edge. That is in fact a naive answer! A more thoughtful answer is that we use the same edge. Because of the finite propagation delay of the synchronizing FF (which is made sure to be greater than the hold time requirements of the receiving system/ffs), the RACE condition is carefully overcome in EVERY digital design. 4/12/06 EE201L Class Notes - Chapter #9 Page 6 / 9

The clock for synchronization shall be the (sending/receiving) system's clock. Example from EE201L homework #9: System-33 System-44 System-33 System-44 System-33 System-44 System based on 33 MHZ Clock O-IT ONE System based on 44 MHZ Clock System based on 33 MHZ Clock O_IT 33 MHZ S_ONE S_O_IT ONE 44 MHZ System based on 44 MHZ Clock System based on 33 MHZ Clock O_IT S_O_IT 44 MHZ S_ONE ONE 33 MHZ System based on 44 MHZ Clock esign # 1 esign # 2 esign # 3 esign # 1 experiences synchronization problems as the O-IT signal is asynchronous to the (System-33/ System-44) and also the ONE signal is asynchronous to the (System-33/ System-44). Between esign #2 and # 3, is right and is wrong. 6 What is meant by flip-flops hardened against metastability? It should be noted that even if a flip-flop goes into a metastable state, it is generally difficult for it to remain in such a state. It is like... even if you manage to make a knife stand on its edge for a second, it is likely to fall one way or other very soon. By making the edge of the knife sharper, you reduce the probability of its standing on its edge for notable length of time. Similarly, by increasing the loop gain of the cross connected pair of NAN gates/nor gates making a bistable, any small disturbance (disturbance to the precarious metastable state) will get amplified and push the system to go into one of the two stable states of the bistable. Such flip-flops, which are made to very quickly come out of the metastable state even if they very rarely went in are called flip-flops hardened against metastability. 7 ouble-synchronization helps to reduce the probability of failure due to metastability: XA Increases MTBF (Mean Time Between failures) XS XSS Next State 0 1 State Memory Here we employ two Synchronizing flip-flops. Even if the first one goes into a metastable state, it is expected that it would come out of the metastable state by the time the second flip-slop tries to sample the output of the first flip-flop. More in EE552/EE560: What do we do if we received a multi-bit asynchronous data? No, we do not use multiple synch. FFS. 0 1 4/12/06 EE201L Class Notes - Chapter #9 Page 7 / 9

8. Setup and hold time window shifts because of path delay in "" or "" The setup and hold time of a flip-flop are 0.3ns and 0.1ns, respectively; but because of the routing issues, some delay may occur on one or both input signals ( and ). The amount of this delay which can be modeled by a buffer is 0.04ns. In the presence of this delay, the setup and hold time of the whole circuit may change. t setup = 0.3ns t hold = 0.1ns A 0.04ns 0.04ns B delay=0.04ns C 0.04ns 0.04ns The setup and hold time of circuit A are t setup = ; t hold = The setup and hold time of circuit B are t setup = ; t hold = The setup and hold time of circuit C are t setup = ; t hold = 9 Result of severe clock-skew problem Figures 8-65 (page 762) and 8-66 (page 763) from Wakerly. 4/12/06 EE201L Class Notes - Chapter #9 Page 8 / 9

10 Why does RES (asynchronous RESET) need to be synchronized to produce synchronous RESET? Isn t it true that if we are resetting the system anyway, we are aborting whatever we are doing and going into the INITIAL state. If so, does it matter if we abort synchronously or asynchronously? It is not about when you go into reset. It is about when you come out of reset. The RESET signal is usually generated using an R-C network. Hence it is an asynchronous signal. After the R-C time constant, if the reset signal becomes inactive just before (or at) the significant edge of the clock, then some flip-slops in the state memory may be able to come out of the reset state and start honoring the next-state bits standing at their -inputs, while some other flip-flops may still be in the reset state. This causes the system to go into wrong/illegal states. Let us first explain the problem using the 5-state dish-washer state-machine of EE201L. Let us assume that the ~RESET is asynchronous and becomes inactive just before (or at) the significant edge of the clock (positive edge in this problem). Also assume that the START happens to be true at that time. It is possible for the one-hot flip-flop ONE to continue to remain in the reset state ( ONE = 1), while at the same time the A_WATER flip-flop may come out of reset and go to 1 ( A_WATER = 1). So we have two FFs hot in the one-hot system! Solution: synchronize the asynchronous ~RESET to produce a synchronous reset signal ~SYNC_RESET CS= ~RESET S= START = 0 A WATER CS= S= RINSE RAIN RY ONE Too close to clock edge START = 1 RESET ONE A_WATER RAIN CS START NSL A_WATER RINSE S CS NSL S START NSL ONE RAIN RY ONE VCC Reset PB RESET RESET RESET SYNC_RESET Better to replace this with this. 4/12/06 EE201L Class Notes - Chapter #9 Page 9 / 9