EE273 Lecture 14 Synchronizer Design November 11, Today s Assignment

Similar documents
EE273 Lecture 15 Synchronizer Design

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

VLSI Clock Domain Crossing

EE178 Spring 2018 Lecture Module 5. Eric Crabill

EE241 - Spring 2007 Advanced Digital Integrated Circuits. Announcements

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

Lecture 11: Sequential Circuit Design

EITF35: Introduction to Structured VLSI Design

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

2.6 Reset Design Strategy

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

Keeping The Clock Pure. Making The Impurities Digestible

EE241 - Spring 2005 Advanced Digital Integrated Circuits

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

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

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

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

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

Clocking Spring /18/05

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

Universal Asynchronous Receiver- Transmitter (UART)

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

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

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

Synchronization Issues During Encoder / Decoder Tests

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs

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

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

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

Chapter 3 Unit Combinational

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

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

Laboratory 4. Figure 1: Serdes Transceiver

Digital System Design

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

Registers and Counters

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

CS/ECE 250: Computer Architecture. Basics of Logic Design: ALU, Storage, Tristate. Benjamin Lee

FIFO Memories: Solution to Reduce FIFO Metastability

Clock and Asynchronous Signals

Asynchronous (Ripple) Counters

Logic Design. Flip Flops, Registers and Counters

Synchronization in Asynchronously Communicating Digital Systems

ELCT201: DIGITAL LOGIC DESIGN

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

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

Other Flip-Flops. Lecture 27 1

Sequential Logic and Clocked Circuits

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

Clock Domain Crossing. Presented by Abramov B. 1

Counters

DEDICATED TO EMBEDDED SOLUTIONS

Synchronous Sequential Logic

LSN 12 Shift Registers

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

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

11. Sequential Elements

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards

Clock Generator 82C84A

Sequential Circuit Design: Part 1


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

Long and Fast Up/Down Counters Pushpinder Kaur CHOUHAN 6 th Jan, 2003

ECE 263 Digital Systems, Fall 2015

Digital Phase Adjustment Scheme 0 6/3/98, Chaney. A Digital Phase Adjustment Circuit for ATM and ATM- like Data Formats. by Thomas J.

RS flip-flop using NOR gate

Sequential Circuit Design: Part 1

RS flip-flop using NOR gate

Synchronizers and Arbiters

for Television ---- Formatting AES/EBU Audio and Auxiliary Data into Digital Video Ancillary Data Space

Combinational vs Sequential

Lecture 8: Sequential Logic

Lecture 10: Sequential Circuits

Counter dan Register

Logic Design ( Part 3) Sequential Logic (Chapter 3)

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

CS3350B Computer Architecture Winter 2015

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

Course 10 The PDH multiplexing hierarchy.

Chapter 4: One-Shots, Counters, and Clocks

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

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

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

Catch or Die! Julia A. and Andrew C. ECE 150 Cooper Union Spring 2010

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

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

Registers and Counters

Multiplex Serial Interfaces With HOTLink

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

Synchronous Sequential Design

Course Administration

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

VARIABLE FREQUENCY CLOCKING HARDWARE

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

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

ECEN689: Special Topics in High-Speed Links Circuits and Systems Spring 2011

Figure 9.1: A clock signal.

Lecture #4: Clocking in Synchronous Circuits

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

ELCT201: DIGITAL LOGIC DESIGN

Transcription:

273 Lecture 14 Synchronizer esign November 11, 1998 William J. ally Computer Systems Laboratory Stanford University billd@csl.stanford.edu 1 Today s Assignment Term Project design a signaling system entire project due on 11/30 checkpoint 1 (signaling components) due next week (11/18) checkpoint 2 (timing components) due on 11/25 Reading Section 10.4 Complete before class on Monday 11/16 2 Copyright 1998 by W. J. ally, all rights reserved. 1

A uick 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 Copyright 1998 by W. J. ally, all rights reserved. 2

Synchronization Hierarchy Summary Type Frequency Phase Synchronous Same Same Mesochronous Same Constant Plesiochronous Small ifference Slowly Varying Periodic ifferent 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 dc ) f f =t a f e f cy exp(-t w /τ s ) Can we do better? A Clk FF1 AW FF2 AS 6 Copyright 1998 by W. J. ally, all rights reserved. 3

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 Copyright 1998 by W. J. ally, all rights reserved. 4

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! uring 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 elay-line Synchronizer For mesochronous and plesiochronous signals elay signal as needed to keep transitions out of the keep-out region of the synchronizer clock How do we set the delay line? What is the delay of this synchronizer? o we need the flip-flop? Clk x xd xs 10 Copyright 1998 by W. J. ally, all rights reserved. 5

etecting 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 unsafe Clk t h t cy -t s ClkL Clk sample Clk donewaiting 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 0 t ko 1 unsafe xs 12 Copyright 1998 by W. J. ally, all rights reserved. 6

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? How do we initialize the pointers? xclk x xp0 xp1 xp2 ring counter xp 3 rp 3 rclk ring counter xs 13 Plesiochronous Timing With plesiochronous timing, one clock is running slightly faster than the other e.g., system with independent crystal oscillators with same nominal frequency (±200ppm) The same basic synchronizer types apply delay line two-register FIFO But... we need to resynchronize periodically e.g., once every 1,000 clocks we need flow control have to match data rate of tx and rx even if clock rate is different eventually the phase wraps and we either get 2 or 0 data elements during a particular clock unless we make sure we are not sending data when the phase wraps 14 Copyright 1998 by W. J. ally, all rights reserved. 7

A Plesiochronous FIFO Synchronizer Insert data with transmit clock (xclk) Remove data with receive clock (rclk) Periodically update the receive pointer (rp) by synchronizing the transmit pointer (xp) to the receive clock how do we know when to do this? what do we do if rp increments by 2 or 0 when we update it? xclk x ring counter xp0 xp1 xp2 xp 3 rclk sync ring counter rp 3 xs 15 Phase-Slip etection Pointers on a Clock Think of xp and rp as hands on a clock When xp reaches 12:00, 4:00, and 8:00 data is clocked into,, and respectively When rp is between 12:00 and 4:00 is selected, from 4:00 to 8:00 is selected, and from 8:00 to 12:00 is selected What relative angles between rp and xp are legal? xp rp 16 Copyright 1998 by W. J. ally, all rights reserved. 8

Phase Slip etection The Keepout Region When xp is straight up (sampling into ), rp must be in the green region otherwise data will change while its selected φ m1 includes phase drift between updates and t dc less t cmux φ m2 includes phase drift less t cc To detect phase, sample xp with appropriate phase of rclk φ m1 rp xp advanced by φ m1 to detect fast receiver φ m2 retarded by φ m2 to detect fast transmitter or just update to fastest legal time 17 Phase Slip etection A Simple Approach If we make both margins 60, we can just sample xp with rclk. At any point we want sampled xp to be one step ahead of rp so we can update rp to be sampled xp on positive edge of rclk after waiting a multiple of 3 rclks for synchronization this approach may dither when right on the boundary rp xp 18 Copyright 1998 by W. J. ally, all rights reserved. 9

ata-rate Mismatch Whichever approach we use, an update of RP may skip a count 0,1,2,1,2,0,1,2,0,1,2 double a count 0,1,2,0,0,1,2,0,1,2,0 If we aren t careful we can drop or duplicate a symbol One approach is to only update rp when the data contains a null symbol OK to drop or duplicate Alternatively we can design the receiver to accept 0,1, or 2 symbols per clock rp xp 19 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 Copyright 1998 by W. J. ally, all rights reserved. 10

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 This is just a phase shift of t xcy -t rcy It is easy to generate this phase shift using a simple timing loop Note that we could just as easily predict xclk several rclk cycles in the future So how do we build a synchronizer using this? xclk t rcy φc pxclk 22 Copyright 1998 by W. J. ally, all rights reserved. 11

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 Next Time Asynchronous esign 24 Copyright 1998 by W. J. ally, all rights reserved. 12