EE273 Lecture 15 Synchronizer Design

Similar documents
EE273 Lecture 14 Synchronizer Design November 11, Today s Assignment

EE178 Spring 2018 Lecture Module 5. Eric Crabill

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

VLSI Clock Domain Crossing

EE273 Lecture 11 Pipelined Timing Closed-Loop Timing November 2, Today s Assignment

EITF35: Introduction to Structured VLSI Design

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

EE241 - Spring 2007 Advanced Digital Integrated Circuits. Announcements

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

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

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

Universal Asynchronous Receiver- Transmitter (UART)

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

Course Administration

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

Registers and Counters

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

EE241 - Spring 2005 Advanced Digital Integrated Circuits

Asynchronous (Ripple) Counters

Other Flip-Flops. Lecture 27 1

Sequential Logic and Clocked Circuits

Synchronous Sequential Logic

Digital System Design

EECS 270 Midterm 1 Exam Closed book portion Winter 2017

LSN 12 Shift Registers

CMSC 313 Preview Slides

2.6 Reset Design Strategy

ELCT201: DIGITAL LOGIC DESIGN

ECE 263 Digital Systems, Fall 2015

Lecture 8: Sequential Logic

Combinational vs Sequential

RS flip-flop using NOR gate

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

Counter dan Register

Synchronizers and Arbiters

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

Logic Design. Flip Flops, Registers and Counters

FIFO Memories: Solution to Reduce FIFO Metastability

Clock and Asynchronous Signals

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

Registers and Counters

Lecture #4: Clocking in Synchronous Circuits

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB


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

Synchronization in Asynchronously Communicating Digital Systems

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

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

Chapter 3 Unit Combinational

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

Synchronous Sequential Design

Administrative issues. Sequential logic

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15

Clock Domain Crossing. Presented by Abramov B. 1

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

CS3350B Computer Architecture Winter 2015

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

RS flip-flop using NOR gate

Metastability Analysis of Synchronizer

Keeping The Clock Pure. Making The Impurities Digestible

Sequential Circuits: Latches & Flip-Flops

11. Sequential Elements

Experiment 8 Introduction to Latches and Flip-Flops and registers

Clocking Spring /18/05

Lecture 11: Sequential Circuit Design

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

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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).

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

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.

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

Counters

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

VARIABLE FREQUENCY CLOCKING HARDWARE

DEDICATED TO EMBEDDED SOLUTIONS

Synchronization Issues During Encoder / Decoder Tests

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

ELCT201: DIGITAL LOGIC DESIGN

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

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Synchronous Sequential Logic

EE141-Fall 2010 Digital Integrated Circuits. Announcements. Homework #8 due next Tuesday. Project Phase 3 plan due this Sat.

EET2411 DIGITAL ELECTRONICS

CSE 352 Laboratory Assignment 3

Chapter 4: One-Shots, Counters, and Clocks

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

Chapter 11 Latches and Flip-Flops

Clock Generator 82C84A

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

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

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

Logic Design II (17.342) Spring Lecture Outline

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

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

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

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Transcription:

EE273 Lecture 15 Synchronizer Design March 5, 2003 Sarah L. Harris Computer Systems Laboratory Stanford University slharris@cva.stanford.edu 1

Logistics Final Exam Wednesday 3/19, 9:30AM to 11:30AM Upcoming Lecture Schedule 3/10 Guest Lecture Ed Lee - Velio 3/12 Wrapup 2

A Quick Overview Synchronization Hierarchy Mesochronous Synchronizers delay-line synchronizer two-register synchronizer FIFO synchronizer Plesiochronous Synchronizers phase slip and flow control Periodic Synchronizers clock prediction - looking into the future 3

Synchronization Hierarchy The difficulty of synchronization depends on the relationship between events on the signal and events on the clock Synchronous signal events always happen outside of the clock s keep-out region same clock Mesochronous signal events happen with a fixed but unknown phase relative to the clock same frequency clock Plesiochronous phase of signal events changes slowly with time slightly different frequency clock Periodic signal events are periodic includes meso- and pleisochronous signal is synchronized to some periodic clock Asynchronous signal events may occur at any time 4

Synchronization Hierarchy Summary Type Frequency Phase Synchronous Same Same Mesochronous Same Constant Plesiochronous Small Difference Slowly Varying Periodic Different Periodic Variation Asynchronous N/A Arbitrary 5

The Brute-Force Synchronizer How do we compare synchronizers? synchronizer delay (in addition to the required t cy /2) failure rate For the brute-force synchronizer t d =t w +2(t s +t dcq ) f f =t a f e f cy exp(-t w /τ s ) Can we do better? A Clk FF1 AW FF2 AS D Q D Q 6

Periodic Synchronizers The Big Picture If an input signal is synchronized to some periodic clock, we can predict when its events are allowed to happen arbitrarily far into the future Thus, we can determine well in advance if the signal is safe to sample on a given clock cycle if it is, we just sample it if it isn t, we delay the signal (or the clock) to make it safe This allows us to move the waiting time, t W, out of the critical path. we can make it very long without adding latency 7

Periodic Synchronizers The Illustration Clk1 Clk2 8

Mesochronous Synchronization The phase difference between the signal and the clock is constant typical of systems where we distribute a master clock with no deskew Thus, we only need to synchronize once for all time! During reset check the phase if its OK, sample the signal directly for ever if its not, sample the signal after delay for ever this phase check is the only asynchronous event we ever sample - and we can afford to wait a long time 9

Delay-Line Synchronizer For mesochronous and plesiochronous signals Delay signal as needed to keep transitions out of the keep-out region of the synchronizer clock How do we set the delay line? Do we need the flip-flop? What is the delay of this synchronizer? Clk x xd xs D Q 10

Detecting an Unsafe Signal To see if a signal is unsafe, see if it changes in the forbidden region sample just before and after the forbidden region and see if result is different These samples may hang the flip-flop in a metastable state need to wait for this state to decay if mesochronous we can wait a very long time since we only have to do this once x D Q D Q unsafe t h E E Clk t cy -t s ClkL D Q E ClkE Clk donewaiting sample 11

Two-Register Synchronizer The delay-line synchronizer has two problems 1. Its expensive, we need a delay line for each input 2. We can t use it with clocked receivers Both problems are solved by the two-register synchronizer We delay the clock rather than the data sample the data with normal and delayed clock pick the safe output Can we just mux the clock? Clk x D Q 0 t ko D Q 1 unsafe xs 12

FIFO Synchronizer A first-in-first-out (FIFO) buffer can be used to move the synchronization out of the data path Clock the data into the FIFO in one clock domain (xclk) Mux the data out of the FIFO in a second clock domain (clk) Where did the synchronization move to? xclk x xp0 xp1 xp2 ring counter D E D E D E Q Q Q xp 3 rp 3 rclk x0 x1 x2 ring counter xs How do we initialize the pointers? 13

Open-Loop and Closed-Loop Flow Control We need to keep a fast transmitter from overrunning a receiver (or a slow transmitter from underrunning the receiver) Open-loop approach insert lots of nulls into the data stream at the transmitter enough so that rate of nonnulls is less than the rate of the slowest possible receiver when the receiver underruns it inserts another null Closed-loop approach receiver applies back pressure when it is about to be overrun still has to insert nulls when it is underrun 20

Periodic Timing Transmit and receive clocks are periodic but at unrelated frequencies e.g., modules in a system operate off of separate oscillators with independent frequencies case where one is rationally derived from the other is an interesting special case In this situation, a single synchronization won t last forever (like mesochronous) or even for a long time (like plesiochronous) However, we can still look into the future and predict clock conflicts far enough ahead to reduce synchronizer delay 21

Clock-Predictor Circuit Suppose we want to know the value of xclk, one rclk cycle (t rcy ) in the future pxclk This is just a phase shift of t xcy -t rcy It is easy to generate this phase shift using a simple timing loop xclk t rcy φc Note that we could just as easily predict xclk several rclk cycles in the future So how do we build a synchronizer using this? 22

Asynchronous Timing Sometimes we need to sample a signal that is truly asynchronous We can still move the synchronization out of the datapath by using an asynchronous FIFO synchronizer However this still incurs a high latency on the full and empty signals as we have to wait for a brute force synchronizer to make its decision We can still avoid delay in this case if we don t really need to synchronize often synchronization is just an expensive convenience 23