Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.

Slides:



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

1 COMP541 Flip-Flop Timing Montek Singh Oct 6, 2014.
Modern VLSI Design 4e: Chapter 5 Copyright  2008 Wayne Wolf Topics n Performance analysis of sequential machines.
11/12/2004EE 42 fall 2004 lecture 311 Lecture #31 Flip-Flops, Clocks, Timing Last lecture: –Finite State Machines This lecture: –Digital circuits with.
1 Introduction Sequential circuit –Output depends not just on present inputs (as in combinational circuit), but on past sequence of inputs Stores bits,
Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Introduction to CMOS VLSI Design Sequential Circuits
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.
Lecture 11: Sequential Circuit Design. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 11: Sequential Circuits2 Outline  Sequencing  Sequencing Element Design.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
1 Kuliah Rangkaian Digital Kuliah 8: Rangkaian Logika Sekuensial Teknik Komputer Universitas Gunadarma.
Announcements Assignment 7 posted, due Friday 18 th All project components ordered Dates –Thursday 12/1 review lecture –Tuesday 12/6 project demonstrations.
Introduction to Sequential Logic Design Bistable elements Latches.
Chapter #6: Sequential Logic Design
1 Sequential Systems A combinational system is a system whose outputs depend only upon its current inputs. A sequential system is a system whose outputs.
Sequential Circuits : Part I Read Sections 5-1, 5-2, 5-3.
Page 1 Sequential Logic Basic Binary Memory Elements.
EET 1131 Unit 10 Flip-Flops and Registers
EKT 124 / 3 DIGITAL ELEKTRONIC 1
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
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.
Assume array size is 256 (mult: 4ns, add: 2ns)
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
ENGIN112 L28: Timing Analysis November 7, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 28 Timing Analysis.
Lecture 9 Memory Elements and Clocking
11/19/2004EE 42 fall 2004 lecture 341 Lecture #34: data transfer Last lecture: –Example circuits –shift registers –Adders –Counters This lecture –Communications.
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
Sequential Logic 1  Combinational logic:  Compute a function all at one time  Fast/expensive  e.g. combinational multiplier  Sequential logic:  Compute.
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 12 - Metastability.
CS 151 Digital Systems Design Lecture 20 Sequential Circuits: Flip flops.
11/15/2004EE 42 fall 2004 lecture 321 Lecture #32 Registers, counters etc. Last lecture: –Digital circuits with feedback –Clocks –Flip-Flops This Lecture:
Flip-Flops and Related Devices
Embedded Systems Hardware: Storage Elements; Finite State Machines; Sequential Logic.
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
1 EE365 Synchronous Design Methodology Asynchronous Inputs Synchronizers and Metastability.
CS 151 Digital Systems Design Lecture 28 Timing Analysis.
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)
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.
COE 202: Digital Logic Design Sequential Circuits Part 1
Lecture 5. Sequential Logic 3 Prof. Taeweon Suh Computer Science Education Korea University 2010 R&E Computer System Education & Research.
Chap 4. Sequential Circuits
ENG241 Digital Design Week #6 Sequential Circuits (Part A)
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
VI - Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Sequential logic Sequential circuits  simple circuits with feedback  latches.
© BYU 18 ASYNCH Page 1 ECEn 224 Handling Asynchronous Inputs.
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.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
BR 8/991 DFFs are most common Most programmable logic families only have DFFs DFF is fastest, simplest (fewest transistors) of FFs Other FF types (T, JK)
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
6-1 Programmable and Steering Logic Chapter #6: Sequential Logic Design.
1 COMP541 Sequential Circuits Montek Singh Feb 1, 2007.
Sequential Networks: Timing and Retiming
EKT 121 / 4 ELEKTRONIK DIGIT I
1 COMP541 Sequential Logic Timing Montek Singh Sep 30, 2015.
Clocking System Design
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
EE 466/586 VLSI Design Partha Pande School of EECS Washington State University
Penn ESE370 Fall DeHon 1 ESE370: Circuit-Level Modeling, Design, and Optimization for Digital Systems Day 20: October 25, 2010 Pass Transistors.
Dept. of Electrical Engineering
Lecture 4. Sequential Logic #3 Prof. Taeweon Suh Computer Science & Engineering Korea University COSE221, COMP211 Logic Design.
Chapter #6: Sequential Logic Design
Sequential Logic Combinational logic:
CSE 370 – Winter Sequential Logic-2 - 1
Topics Performance analysis..
Lecture 19 Logistics Last lecture Today
Presentation transcript:

Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation (and delay) occurs between registers clock data in DQDQ data out

Sequential Logic 2 there is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized clock data changingstable input clock T su ThTh Timing Methodologies (cont’d)  Definition of terms  setup time: minimum time before the clocking event by which the input must be stable (T su )  hold time:minimum time after the clocking event until which the input must remain stable (T h ) clock data DQDQ

Sequential Logic 3 all measurements are made from the clocking event that is, the rising edge of the clock Typical timing specifications  Positive edge-triggered D flip-flop  setup and hold times  minimum clock width  propagation delays (low to high, high to low, max and typical) T h 1ns T w 7ns T plh [2,4]ns T phl [1,3]ns T su 2ns D CLK Q T su 2ns T h 1ns

Sequential Logic 4 System Clock Frequency  Register transfer must fit into one clock cycle  reg t pd + C.L. t pd + reg t su < T clk  Use maximum delays  Find the “critical path”  Longest register-register delay

Sequential Logic 5 Short Paths  Can a path have too little delay?  Yes: Hold time can be violated  Unless t pd > t h  Use min delay (contamination delay)  Fortunately, most registers have hold time = 0  But there can still be a problem! Clock skew…

Sequential Logic 6 Clock Skew  Cannot make clock arrive at registers at the same time  If skew > 0:  t pd > t h + t skew  Clock skew can cause system failure  Can you fix this after you’ve fabbed the chip?

Sequential Logic 7 Clock Skew  Cannot make clock arrive at registers at the same time  If skew > 0:  t pd > t h + t skew  Clock skew can cause system failure  Can you fix this after you’ve fabbed the chip?

Sequential Logic 8 Clock Skew  If skew < 0:  t clk > reg t pd + CL t pd + reg t SU + | t skew |  Can you fix this after fab?

Sequential Logic 9 Clock Skew  If skew < 0:  t clk > reg t pd + CL t pd + reg t SU + | t skew |  Can you fix this after fab?

Sequential Logic 10 Clock Skew  Correct behavior assumes that all storage elements sample at exactly the same time  Not possible in real systems:  clock driven from some central location  different wire delay to different points in the circuit  Problems arise if skew is of the same order as FF contamination delay  Gets worse as systems get faster (wires don't improve as fast)  1) distribute clock signals against the data flow  2) wire carrying the clock between two communicating components should be as short as possible  3) try to make all wires from the clock generator be the same length => clock tree

Sequential Logic 11 Nasty Example  What can go wrong?  How can you fix it?

Sequential Logic 12 Other Types of Latches and Flip-Flops  D-FF is ubiquitous  simplest design technique, minimizes number of wires preferred in PLDs and FPGAs good choice for data storage register edge-triggered has most straightforward timing constraints  Historically J-K FF was popular versatile building block, often requires less total logic two inputs require more wiring and logic can always be implemented using D-FF  Level-sensitive latches in special circumstances popular in VLSI because they can be made very small (4 T) fundamental building block of all other flip-flop types two latches make a D-FF  Preset and clear inputs are highly desirable  System reset

Sequential Logic 13 behavior is the same unless input changes while the clock is high DQDQ CLK positive edge-triggered flip-flop DQDQ CLK transparent, flow-through (level-sensitive) latch D CLK Qedge Qlatch Comparison of latches and flip-flops

Sequential Logic 14 What About External Inputs?  Internal signals are OK  Can only change when clock changes  External signals can change at any time  Asynchronous inputs  Truly asynchronous  Produced by a different clock  This means register may sample a signal that is changing  Violates setup/hold time  What happens?

Sequential Logic 15 Sampling external inputs

Sequential Logic 16 small, but non-zero probability that the FF output will get stuck in an in-between state oscilloscope traces demonstrating synchronizer failure and eventual decay to steady state logic 0 logic 1 logic 0 logic 1 Synchronization failure  Occurs when FF input changes close to clock edge  the FF may enter a metastable state – neither a logic 0 nor 1 –  it may stay in this state an indefinite amount of time  this is not likely in practice but has some probability

Sequential Logic 17 Calculating probability of failure  For a single synchronizer Mean-Time Between Failure (MTBF) = exp ( t r /  ) / ( T0  f c  f a ) where a failure occurs if metastability persists beyond time tr  t r is the resolution time - extra time in clock period for settling  Tclk - (t pd + T CL + t setup )  f c is the frequency of the FF clock  f a is the number of asynchronous input changes per second applied to the FF  T0 and  are constaints that depend on the FF's electrical characteristics (e.g., gain or steepness of curve)  example values are T0 = 1ms and  = 30ps (sensitive to temperature, voltage, cosmic rays, etc.).  Must add probabilities from all synchronizers in system 1/MTBFsystem =  1/MTBFsynch

Sequential Logic 18 Xilinx Measurements

Sequential Logic 19 Xilinx Measurements

Sequential Logic 20 What does this circuit do?  What’s wrong with this?

Sequential Logic 21 What does this circuit do?  How much better is this?  Can you do better?

Sequential Logic 22 D D Q Q asynchronous input synchronized input Clk Guarding against synchronization failure  Give the register time to decide  Probability of failure cannot be reduced to 0, but it can be reduced  Slow down the system clock?  Use very fast technology for synchronizer -> quicker decision?  Cascade two synchronizers?

Sequential Logic 23 Stretching the Resolution Time  Also slows the sample rate and transfer rate

Sequential Logic 24 Sampling Rate  How fast does your sample clock need to be?

Sequential Logic 25 Sampling Rate  How fast does your sample clock need to be?  f(clkB) > f(clkA)  f(clkB) > 2 f(data) (Nyquist)

Sequential Logic 26 Sampling Rate  What if sample clock can’t go faster?  If input clock is not available, no solution(?)  If input clock is available (e.g. video codec)

Sequential Logic 27 Increasing sample rate  The problem is the relative sample rate  Slow down the input clock!

Sequential Logic 28 Another Problem with Asynchronous inputs  What goes wrong here? (Hint: it’s not a metastability thing)  What is the fix?

Sequential Logic 29 More Asynchronous inputs  What is the problem?  What is the fix?

Sequential Logic 30 Important Rule!  Exactly one register makes the synchronizing decision

Sequential Logic 31 More Asynchronous inputs  Can we input asynchronous data values with several bits?

Sequential Logic 32 More Asynchronous inputs  How can we input asynchronous data values with several bits?

Sequential Logic 33 What Went Wrong?  Each bit has a different delay  Wire lengths differ  Gate thresholds differ  Driver speeds are different  Register delays are different  Rise vs. Fall times  Clock skews to register bits  Bottom line – “data skew” is inevitable  aka Bus Skew  Longer wires => More skew  What is the solution??

Sequential Logic 34 Sending Multiple Data Bits  Must send a “clock” with the data  Waits until data is stable  De-skewing delay  f(clkB) > 2 f(clkA)

Sequential Logic 35 Sending Multiple Data Bits  Balancing path delays...  What’s wrong with this solution?  What’s the right way to do it?

Sequential Logic 36 Sending Multiple Data Bits  The right way to do it...

Sequential Logic 37 Sending Multiple Data Bits  Slightly different alternative...