Clock and Asynchronous Signals

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

Digital System Design


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

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Clock - key to synchronous systems. Topic 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Clock - key to synchronous systems. Lecture 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

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

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

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

EECS 373 Design of Microprocessor-Based Systems

FIFO Memories: Solution to Reduce FIFO Metastability

Counters

INTEGRATED CIRCUITS. AN219 A metastability primer Nov 15

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

EITF35: Introduction to Structured VLSI Design

First Name Last Name November 10, 2009 CS-343 Exam 2

Lecture 8: Sequential Logic

Clock Domain Crossing. Presented by Abramov B. 1

Synchronous Sequential Design

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

Universal Asynchronous Receiver- Transmitter (UART)

EL302 DIGITAL INTEGRATED CIRCUITS LAB #3 CMOS EDGE TRIGGERED D FLIP-FLOP. Due İLKER KALYONCU, 10043

Keeping The Clock Pure. Making The Impurities Digestible

ELE2120 Digital Circuits and Systems. Tutorial Note 7

DO NOT COPY DO NOT COPY

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

Lecture 10: Sequential Circuits

FPGA TechNote: Asynchronous signals and Metastability

Asynchronous (Ripple) Counters

11. Sequential Elements

1. What does the signal for a static-zero hazard look like?

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

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

Last time, we saw how latches can be used as memory in a circuit

Metastability Analysis of Synchronizer

Digital Circuits and Systems

6.S084 Tutorial Problems L05 Sequential Circuits

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

Introduction to Sequential Circuits

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Advanced Devices. Registers Counters Multiplexers Decoders Adders. CSC258 Lecture Slides Steve Engels, 2006 Slide 1 of 20

CS 110 Computer Architecture. Finite State Machines, Functional Units. Instructor: Sören Schwertfeger.

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.

Basis of sequential circuits: the R-S latch

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

VLSI Clock Domain Crossing

CS 61C: Great Ideas in Computer Architecture

Lecture 11: Sequential Circuit Design

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

EE178 Spring 2018 Lecture Module 5. Eric Crabill

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

Logic Design. Flip Flops, Registers and Counters

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Section I: Digital System Analysis and Review

Chapter 2. Digital Circuits

CS/EE 6710 Digital VLSI Design CAD Assignment #3 Due Thursday September 21 st, 5:00pm

Read-only memory (ROM) Digital logic: ALUs Sequential logic circuits. Don't cares. Bus

EECS150 - Digital Design Lecture 3 - Timing

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

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

Exercises. 162 CHAPTER THREE Sequential Logic Design

ECE 250 / CPS 250 Computer Architecture. Basics of Logic Design ALU and Storage Elements

CSE 352 Laboratory Assignment 3

BUSES IN COMPUTER ARCHITECTURE

ECE 263 Digital Systems, Fall 2015

EE273 Lecture 15 Synchronizer Design

6. Sequential Logic Flip-Flops

Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science Introductory Digital Systems Laboratory

COMP sequential logic 1 Jan. 25, 2016

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

Review of digital electronics. Storage units Sequential circuits Counters Shifters

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Sequential Circuit Design: Part 1

Slide Set 6. for ENCM 369 Winter 2018 Section 01. Steve Norman, PhD, PEng

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

DEDICATED TO EMBEDDED SOLUTIONS

Lecture 13: Clock and Synchronization. TIE Logic Synthesis Arto Perttula Tampere University of Technology Spring 2017

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

Digital Fundamentals: A Systems Approach

EE273 Lecture 14 Synchronizer Design November 11, Today s Assignment

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

CS3350B Computer Architecture Winter 2015

Figure 9.1: A clock signal.

Sequential Circuit Design: Part 1

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

D Latch (Transparent Latch)

Counter dan Register

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

EE241 - Spring 2005 Advanced Digital Integrated Circuits

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

Contents Slide Set 6. Introduction to Chapter 7 of the textbook. Outline of Slide Set 6. An outline of the first part of Chapter 7

Synchronous Sequential Logic

Chapter 3 Unit Combinational

EECS 373 Design of Microprocessor-Based Systems

Modeling Digital Systems with Verilog

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

Transcription:

Clock and Asynchronous Signals Z. Jerry Shi Computer Science and Engineering University of Connecticut Thank John Wakerly for providing his slides and figures.

Functional timing

Delays in state machines Setup-time margin = t_clk t_ffpd_max t_comb_max t_setup > 0 Hold-time margin = t_ffpd_min + t_comb_min t_hold > 0

Clock Skew Clock signal may not reach all flip-flops simultaneously Output changes of flip-flops with early clock may reach D inputs of flip-flops with late clock too soon Reasons for slowness: (a) () wiring delays (b) capacitance (c) incorrect design

Clock-skew calculation t ffpd(min) + t comb(min) t hold > t skew(max) t ffpd(min) + t comb(min) > t skew(max) + t hold Clock skew should be smaller than the hold-time margin Compensating for clock skew: Longer flip-flop propagation delay Explicit combinational delays Shorter (even negative) flip-flop hold times Long delay inside flip-flop flop

Example of bad clock distribution

Clock distribution in ASICs This is what a typical ASIC router will do if you don t lay out This is what a typical ASIC router will do if you don t lay out the clock by hand.

Clock-tree solution Often laid out by hand (H-tree) Wide,fast metal (low R ==> fast RC time constant)

Gating the clock Definitely a no-no Glitches possible if control signal (CLKEN) is generated by the same clock Excessive clock skew in any case

If you really must gate the clock...

Control unit and data unit Divide large state machines into smaller machines Data unit Data processing Storing, moving, combing, etc. Registers, specialized functions (adder, shifter), memory Control unit Starting, stopping actions in data units Testing conditions Deciding what to do next

Synchronous System Structure Everything is clocked by the same, common clock

Typical synchronous-system timing Outputs have one complete clock period to propagate to inputs Must take into account flip-flop setup times at next clock period

Simplified PowerPC core block diagram Instruction Unit MMU Load/Store Unit LSU GPR File ALU

Abstract view of instruction execution unit for MIPS

Datapath n Register n File ALU Shifter Mul n

Asynchronous inputs Not all inputs are synchronized with the clock Examples: Keystrokes Sensor inputs Data received from a network (transmitter has its own clock) Inputs must be synchronized with the system clock before being applied to a synchronous system

A simple synchronizer

Only one synchronizer per input

Even worse Combinational delays to the two synchronizers are likely to be different

The way to do it One synchronizer per input Carefully locate the synchronization points in a system But still a problem -- the synchronizer output may become metastable when setup and hold time are not met

Synchronizer failure Synchronizer failure: a system uses a synchronizer output while the output is still in the metsastable state Use input signals that meet the published specification Wait long enough so FF comes out of metastability on its own Metastability resolution time The maximum time that the output can remain metastable without causing synchronizer failure, e.g., t r = t clk t comb t setup

Recommended synchronizer design Hope that FF1 settles down before META is sampled In this case, SYNCIN is valid for almost a full clock period Can calculate l the probability bilit of synchronizer failure (FF1 still metastable when META sampled)

Metastability decision window

Metastability resolution time

Flip-flop metastable behavior Probability of flip-flop output being in the metastable state is an exponentially decreasing function of t r (time since clock edge, a.k.a. resolution time ) Mean time between synchronization failures (MTBF): MTBF ( t r ) where τ and T 0 are parameters for a particular flip-flop f is the clock frequency, and a is the number of asynchronous transitions / sec = e T 0 t r / τ f a

Typical flip-flop metastability parameters MTBF( t r ) = t e r / τ T f a 0 MTBF = 1000 yrs. f = 25 MHz a = 100 KHz t r =?

Is 1000 years enough? If MTBF = 1000 years and you ship 52,000 copies of the product, then some system experiences a mysterious failure every week Real-world MTBFs must be much higher How to get better MTBFs? Use faster flip-flops But clock speeds keep getting faster, thwarting this approach Wait for multiple clock ticks to get a longer metastabilty resolution time Waiting longer usually doesn t hurt performance unless there is a critical i l round-trip i handshake dhk

Multiple-cycle synchronizer Clock-skew problem

Deskewed multiple-cycle synchronizer Necessary in really high-speed systems DSYNCIN is valid for almost an entire clock period