Clock Domain Crossing. Presented by Abramov B. 1

Similar documents
EITF35: Introduction to Structured VLSI Design

DEDICATED TO EMBEDDED SOLUTIONS


EE178 Spring 2018 Lecture Module 5. Eric Crabill

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

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

Chapter 2. Digital Circuits

11. Sequential Elements

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.

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

Unit 11. Latches and Flip-Flops

Experiment 8 Introduction to Latches and Flip-Flops and registers

Digital Fundamentals: A Systems Approach

Logic Design. Flip Flops, Registers and Counters

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

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

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

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

Lecture 11: Sequential Circuit Design

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Basis of sequential circuits: the R-S 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.

Digital Fundamentals: A Systems Approach

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

Scan. This is a sample of the first 15 pages of the Scan chapter.

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

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

BUSES IN COMPUTER ARCHITECTURE

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

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

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

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

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

! Two inverters form a static memory cell " Will hold value as long as it has power applied

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

Chapter 4: One-Shots, Counters, and Clocks

PGT104 Digital Electronics. PGT104 Digital Electronics

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

Registers and Counters

CHAPTER 1 LATCHES & FLIP-FLOPS

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

Counters

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

Asynchronous (Ripple) Counters

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

Lecture 8: Sequential Logic

LATCHES & FLIP-FLOP. Chapter 7

EECS 373 Design of Microprocessor-Based Systems

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

Sequential Design Basics

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

Registers. Unit 12 Registers and Counters. Registers (D Flip-Flop based) Register Transfers (example not out of text) Accumulator Registers

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

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

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

EET2411 DIGITAL ELECTRONICS

Project 6: Latches and flip-flops

Chapter 11 Latches and Flip-Flops

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

2.6 Reset Design Strategy

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Chapter 3 Unit Combinational

Digital Fundamentals

hochschule fu r angewandte wissenschaften hamburg Prof. Dr. B. Schwarz FB Elektrotechnik/Informatik

6.3 Sequential Circuits (plus a few Combinational)

Combinational vs Sequential

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

Chapter 5 Flip-Flops and Related Devices

VLSI Clock Domain Crossing

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

Universal Asynchronous Receiver- Transmitter (UART)

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

DIGITAL ELECTRONICS MCQs

VARIABLE FREQUENCY CLOCKING HARDWARE

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

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

D Latch (Transparent Latch)

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

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

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

CHAPTER1: Digital Logic Circuits

Chapter 7 Sequential Circuits

Chapter 2 Clocks and Resets

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

Metastability Analysis of Synchronizer

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

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Lecture 21: Sequential Circuits. Review: Timing Definitions

Static Timing Analysis for Nanometer Designs

Digital Circuits and Systems

Counter dan Register

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

Sequential Logic. Introduction to Computer Yung-Yu Chuang

Digital Circuits ECS 371

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

Transcription:

Clock Domain Crossing Presented by Abramov B. 1

Register Transfer Logic Logic R E G I S T E R Transfer Logic R E G I S T E R Presented by Abramov B. 2

RTL (cont) An RTL circuit is a digital circuit composed of: (R) registers of FFs responding to the edge of a clock signal (T) Transfer of wires are the connecting elements (L) Combinatorial Logic gates. Presented by Abramov B. 3

RTL (cont) A logic path in RTL circuit is a set of transfer and logic elements connected to each other. A logic path starts at the registers Q output and ends at the registers D input. Presented by Abramov B. 4

RTL (cont) Clock Domain in a RTL circuit such that: Registers =>R The clock signal is the same clock signal as for all other Registers. Transfers =>T is part of a Logic path that starts and ends at Registers. Logics => L is agate in a Logic path that starts and ends at RRs. Presented by Abramov B. 5

RTL (cont) Clock Speed is limited by the flip-flop delay (clock to output), combinational delay, and setup time. Presented by Abramov B. 6

Bridge path Bridge path : A bridge path in an RTL circuit is a logic path that starts at registers Q outputs of one clock domain and ends at registers D inputs of the second clock domain. Bridge Path rule: Bridge path must be sampled with a register clocked by the target domain s clock. Presented by Abramov B. 7

Clock Skew Clock Skew : is the difference measured in time between the clock edge (rising or falling edge) of two FFs. Data Delay : is a difference measured in time between the beginning and end of a logic path. Clock domain Rule : CLOCK SKEW << DATA DELAY Critical in shift registers, counters and combinatorial systems. Presented by Abramov B. 8

Clock Tree Example H-Tree Most of VLSI circuit signal propagation delay is caused by the wiring Same distance from clock source to all X s CLK Chip X X X X X X X X X X X X X X X X Presented by Abramov B. 9

Meta-Stability What are the cases in which meta-stability occurs? When the input signal is an asynchronous signal. When the clock skew/slew is too much (rise and fall time are more than the tolerable values). When interfacing two domains operating at two different frequencies or at the same frequency but with different phase. When the combinational delay is such that flip-flop data input changes in the critical window (setup + hold window) Digital components recover from meta-stable states quickly but the end value is indeterminate Presented by Abramov B. 10

Meta-Stability Presented by Abramov B. 11

Meta-Stability No other connection to these points Asynchronous Input D SET Q D SET Q Clock CLR Q CLR Q Edge detection can be placed at this point Reset from clock tree Presented by Abramov B. 12

Meta-Stability Presented by Abramov B. 13

Meta-Stability MTBF Mean Time Between Failures MTBF = clk e ct 2 MET f f C dat 1 f clk = Clock frequency f dat =The average frequency of asynchronous data changes t MET = Time allowed for the FF to settle in a stable state C 1 C 2 = probability of meta-stability catching setup/hold time window =Technology dependent. Describes the speed with which the meta-stable condition is being resolved Presented by Abramov B. 14

CDC failure Difficulties causes when interfacing two or more asynchronous clock domains Synchronization failure Un-reliable data transfers Transaction never happen Transaction Happen too many times Transaction delivered wrong data Presented by Abramov B. 15

CDC Feedback Although synchronizing a feedback signal is a very safe technique to acknowledge that the first control signal was recognized and sampled into the new clock domain, there is considerable delay associated with synchronizing control signals in both directions before releasing the control signal. Presented by Abramov B. 16

CDC -Edge detection Clk Sig_in Sig_in events changes for a long time period. Our aim is to detect moment of change (either rise-detect or fail-detect) and to create one-clock length signal that will advice about sig_in changes. Use this one-cycle edge detection output to control data capture and other necessary functions avoids multiple samples or counts per clock/data input pair Presented by Abramov B. 17

CDC -Edge detection (cont) Edge detect only performed after 2 nd Meta DFF 0 1 2 Signal from other clock domain D SET Q D SET Q D SET Q CLR Q CLR Q CLR Q Reset from clock tree Clock Presented by Abramov B. 18

CDC -Edge detection (cont) Presented by Abramov B. 19

Synchronizing Fast Signals Into Slow Clock Domains (Fast 2 Slow) Presented by Abramov B. 20

Fast 2 Slow One potential solution to this problem is to assert control signals for a period of time that exceeds the cycle time of the sampling clock. The assumption is that the control signal will be sampled at least once and possibly twice by the receiver clock. Presented by Abramov B. 21

Fast 2 Slow Comb Logic D en srst D D Fast clock side ==N srst Counter en Slow clock side N > Tslow Tfast Presented by Abramov B. 22

Fast 2 Slow A second possible solution to this problem is pulse extracting (stretch) Presented by Abramov B. 23

Fast 2 Slow Lengthened pulse to guarantee that the control signal will be sampled Presented by Abramov B. 24

Using acknowledge feedback flag Fast 2 Slow Clock A - fast 1 SET Q Q SET 1 req Clock domain A Clock domain B Parallel data bus Flag D en CLR Q Q CLR D en Clock B - slow ack Disadvantages: Global reset is not used Asynchronous solution Uncertainty in timing constrain boundaries Presented by Abramov B. 25

Fast 2 Slow Better than previous solution, but still asynchronous Presented by Abramov B. 26

Fast 2 Slow The synchronous decision of a transfers of single pulses between two clock domains problem applicable as well as in FPGA and in ASIC is below resulted completely : Clock A domain - fast One-shot pulse Clock B domain - slow Comb logic T D D D Presented by Abramov B. 27

Two simultaneously required control signals A register in the new clock domain requires both a load signal and an enable signal in order to load a data value into the register. If both the load and enable signals are being sent from one clock domain, there is a chance that a small skew between the control signals could cause the two signals to be synchronized into different clock cycles within the new clock domain. Presented by Abramov B. 28

Two simultaneously required control signals Presented by Abramov B. 29

Two simultaneously required control signals Solution - Consolidating control signals before passing them between clock domains Presented by Abramov B. 30

Two simultaneously required control signals Presented by Abramov B. 31

Two phase-shifted sequencing control signals Presented by Abramov B. 32

Two phase-shifted sequencing control signals Presented by Abramov B. 33

Two phase-shifted sequencing control signals The solution to the problem is to send only one control signal into the new clock domain and generate the second phaseshifted sequential control signal within the new clock domain. Presented by Abramov B. 34

Control Buses synchronizing between clock domains Presented by Abramov B. 35

One-Hot Checker Q: How to check the one-hot code? A: Use dual-rail code! The dual-rail code for 4 bit example: Y1, Y2, Y3, Y4-the outputs from second register of receive clock domain, in which coded by one-hot code. = 0 y1 + y2 y3 y4 r 1 = y3 + y4 + y1 y 2 r + The result of checking XOR between outputs of these symmetric functions. The dual-rail checker should be simply cascaded for any width of checked word. Presented by Abramov B. 36

One-Hot Checker 8 bitone-hot code checker architecture Presented by Abramov B. 37

Control Buses synchronizing between clock domains Clock domain crossing with data XOR de-correlator/correlator ACLOCK Domain BCLOCK Domain n EC 2 n n 2 n DC XOR XOR REG REG REG 2 n REG REG Presented by Abramov B. 38