EE365 Adv. Digital Circuit Design Clarkson University Lecture #13 Clock Skew & Synchronization.

Slides:



Advertisements
Similar presentations
1 Lecture 16 Timing  Terminology  Timing issues  Asynchronous inputs.
Advertisements

COUNTERS Counters with Inputs Kinds of Counters Asynchronous vs
Analog-to-Digital Converter (ADC) And
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
ELEC 256 / Saif Zahir UBC / 2000 Timing Methodology Overview Set of rules for interconnecting components and clocks When followed, guarantee proper operation.
1 Kuliah Rangkaian Digital Kuliah 8: Rangkaian Logika Sekuensial Teknik Komputer Universitas Gunadarma.
Fall 2004EE 3563 Digital Systems Design EE 3563 Sequential Logic Design Principles  A sequential logic circuit is one whose outputs depend not only on.
1 EE121 John Wakerly Lecture #8 Sequential Circuits Flip-flops Sequential PALs.
Ch 8. Sequential logic design practices 1. Documentation standards ▶ general requirements : signal name, logic symbol, schematic logic - state machine.
1 EE121 John Wakerly Lecture #10 Some shift-register stuff Sequential-circuit analysis.
Digital Digital: Chapter 8. Sequential Logic Design Practices 1 Chapter 8. Sequential Logic Design Practices.
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
Lecture 9: D/A and A/D Converters
Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis EE4800 CMOS Digital IC Design & Analysis Lecture 11 Sequential Circuit Design Zhuo Feng.
Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.
Reconfigurable Computing - Clocks John Morris Chung-Ang University The University of Auckland ‘Iolanthe’ at 13 knots on Cockburn Sound, Western Australia.
1 EE121 John Wakerly Lecture #16 Synchronous Design Methodology Asynchronous Inputs Synchronizers and Metastability.
The clock 10/23/20081ECE Lecture. Clocking Issues Clock Skew Gating the clock Section 8.8 of text 10/23/20082ECE Lecture.
Synchronous Digital Design Methodology and Guidelines
1 Digital Design: State Machines Timing Behavior Credits : Slides adapted from: J.F. Wakerly, Digital Design, 4/e, Prentice Hall, 2006 C.H. Roth, Fundamentals.
Clock Design Adopted from David Harris of Harvey Mudd College.
CMPUT Computer Organization and Architecture II1 CMPUT329 - Fall 2003 TopicE: Clock Skew and Clock Gating José Nelson Amaral.
RTL Hardware Design by P. Chu Chapter 161 Clock and Synchronization.
Assume array size is 256 (mult: 4ns, add: 2ns)
11/19/2004EE 42 fall 2004 lecture 341 Lecture #34: data transfer Last lecture: –Example circuits –shift registers –Adders –Counters This lecture –Communications.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Timing and Metastability.
Embedded Systems Hardware:
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 11 - Data Communications.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Senior Design I Lecture 12 - Metastability.
Asynchronous Input Example Program counter normally increments, jumps to address of interrupt subroutine on asynchronous interrupt How many states can.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Sequential PLD timing Registers Counters Shift registers
Embedded Systems Hardware: Storage Elements; Finite State Machines; Sequential Logic.
Digital Logic Design Lecture 24. Announcements Homework 8 due today Exam 3 on Tuesday, 11/25. – Topics for exam are up on the course webpage.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #10 Latches, Flip Flops & Sequential PALS.
1 EE365 Synchronous Design Methodology Asynchronous Inputs Synchronizers and Metastability.
1 EE365 More on sequential circuits. 2 Serial data systems (e.g., TPC)
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Sequential Circuit Introduction to Counter
111/9/2005EE 108A Lecture 13 (c) 2005 W. J. Dally EE108A Lecture 13: Metastability and Synchronization Failure (or When Good Flip-Flops go Bad)
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
Registers and Counters
Counters Clocked sequential circuit whose state diagram contains a single cycle. Modulus – number of states in the cycle. Counters with non-power of 2.
Flip-Flops.
1 CSE370, Lecture 16 Lecture 19 u Logistics n HW5 is due today (full credit today, 20% off Monday 10:29am, Solutions up Monday 10:30am) n HW6 is due Wednesday.
Digital System Bus A bus in a digital system is a collection of (usually unbroken) signal lines that carry module-to-module communications. The signals.
Counter Application (Part B) By : Pn Siti Nor Diana Ismail CHAPTER 3.
1 COMP541 Combinational Logic - 4 Montek Singh Jan 30, 2012.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
EE365 Adv. Digital Circuit Design Clarkson University Lecture #12 Registers and Counters.
Digital Design Lectures 11 & 12 Shift Registers and Counters.
1 CSE370, Lecture 17 Lecture 17 u Logistics n Lab 7 this week n HW6 is due Friday n Office Hours íMine: Friday 10:00-11:00 as usual íSara: Thursday 2:30-3:20.
Computer Architecture Lecture 4 Sequential Circuits Ralph Grishman September 2015 NYU.
Lecture #26 Page 1 ECE 4110– Sequential Logic Design Lecture #26 Agenda 1.State Encoding 2.Pipelined Outputs 3.Asynchronous Inputs Announcements 1.n/a.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Abdullah Said Alkalbani University of Buraimi
EE121 John Wakerly Lecture #9
Unit 1 Lecture 4.
Clocking System Design
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Chapter #6: Sequential Logic Design
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 19 Logistics Last lecture Today
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Synchronous Digital Design Methodology and Guidelines
Synchronous Digital Design Methodology and Guidelines
Presentation transcript:

EE365 Adv. Digital Circuit Design Clarkson University Lecture #13 Clock Skew & Synchronization

Topics Rissacher EE365Lect #13 More Serial Clock Skew Synchronization

Serial data systems (e.g., TPC) Rissacher EE365Lect #13

Serial data in the phone system (E-1) Mb/s links between phone switches and subscribers –partitioned into Kb/s channels Each channel gets a timeslot in a “frame” where it can send 8 bits every 125  sec. –8000 frames/sec Rissacher EE365Lect #13

Timeslot details count = 255 Rissacher EE365Lect #13

Parallel-to-serial conversion  256 LSBs are bit number Assert shift-register LOAD input during bit 7 Timeslot number can be decoded and used to select source of parallel data Serial data to destination count = 255 Rissacher EE365Lect #13

Serial-to- parallel conversion Synchronize destination’s counter to source’s Shift in serial data Detect that a complete byte has been received Holding register for complete byte Note: loads 0…0 Rissacher EE365Lect #13

Destination timing Serial-in, parallel-out shift register outputs Holding-register outputs Grab complete byte when available Rissacher EE365Lect #13

Serial communication on ONE wire Serial communication requires three signals: CLOCK, SYNC, and DATA. Yet only one “wire” is used. How? One solution: Manchester code. Or use a phase-locked loop (analog circuit) to extract clock from the data: Rissacher EE365Lect #13

Still a couple of problems Framing -- SYNC signal –Solution: Use a unique data pattern for SYNC PLL clock recovery -- what if too many zeroes are transmitted? PLL can’t stay in sync. –Solution: Use a code that guarantees a minimum number of ones –Phone system: Map > (creating slight voice distortion) Gigabit Ethernet: Uses 8B10B code, solving both problems –Map each byte into 8 bits –Use only a “good” subset of 2 10 code words –Use another code word for synchronization Rissacher EE365Lect #13

Synchronous System Structure Everything is clocked by the same, common clock Rissacher EE365Lect #13

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. Rissacher EE365Lect #13

Clock Skew –Clock signal may not reach all flip-flops simultaneously. –Output changes of flip-flops receiving “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 Rissacher EE365Lect #13

Clock-skew calculation t ffpd(min) + t comb(min)  t hold  t skew(max) > 0 First two terms are minimum time after clock edge that a D input changes Hold time is earliest time that the input may change Clock skew subtracts from the available hold-time margin Compensating for clock skew: –Longer flip-flop propagation delay –Explicit combinational delays –Shorter (even negative) flip-flop hold times Rissacher EE365Lect #13

In-Class Practice Problem Rissacher EE365Lect #13 t ffpd(min) = 5 ns t comb(min) = 20 ns t hold = 20 ns t skew(max) = 10 ns Comb Logic (Excitation Eqns) CLK Delay Calculate whether clock-skew is an issue for the indicated Flip-Flop

In-Class Practice Problem Rissacher EE365Lect #13 t ffpd(min) = 5 ns t comb(min) = 20 ns t hold = 20 ns t skew(max) = 10 ns t ffpd(min) + t comb(min)  t hold  t skew(max) = -5 ns Calculate whether clock-skew is an issue for the indicated Flip-Flop

In-Class Practice Problem Rissacher EE365Lect #13 t ffpd(min) = 5 ns t comb(min) = 20 ns t hold = 20 ns t skew(max) = 10 ns Comb Logic (Excitation Eqns) CLK Delay Now add a delay to the circuit to fix the issue.

In-Class Practice Problem Rissacher EE365Lect #13 t ffpd(min) = 5 ns t comb(min) = 20 ns t hold = 20 ns t skew(max) = 10 ns Comb Logic (Excitation Eqns) CLK Delay > 5 ns

Example of bad clock distribution Rissacher EE365Lect #13

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

“Clock-tree” solution Often laid out by hand Wide,fast metal (low R ==> fast RC time constant) Rissacher EE365Lect #13

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. Rissacher EE365Lect #13

If you really must gate the clock... Rissacher EE365Lect #13

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. Rissacher EE365Lect #13

A simple synchronizer Rissacher EE365Lect #13

Only one synchronizer per input Rissacher EE365Lect #13

Even worse Combinational delays to the two synchronizers are likely to be different. Rissacher EE365Lect #13

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. Rissacher EE365Lect #13

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 the probability of “synchronizer failure” (FF1 still metastable when META sampled) Rissacher EE365Lect #13

Metastability decision window Rissacher EE365Lect #13

Metastability resolution time Rissacher EE365Lect #13

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”). Stated another way, MTBF(t r ) = exp(t r /  ) / [T 0 f a], 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 Rissacher EE365Lect #13

Typical flip-flop metastability parameters exp(t r /  ) ________ [T 0 f a] MTBF = MTBF = 1000 yrs. F = 25 MHz a = 100 KHz t r = ? Rissacher EE365Lect #13

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 “round-trip” handshake. Rissacher EE365Lect #13

Multiple-cycle synchronizer Clock-skew problem Rissacher EE365Lect #13

De-skewed multiple-cycle synchronizer Necessary in really high-speed systems DSYNCIN is valid for almost an entire clock period. Rissacher EE365Lect #13

Next time CPLDs FPGAs Rissacher EE365Lect #13