CSE 370 – Winter Sequential Logic-2 - 1

Slides:



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

11/12/2004EE 42 fall 2004 lecture 311 Lecture #31 Flip-Flops, Clocks, Timing Last lecture: –Finite State Machines This lecture: –Digital circuits with.
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.
Announcements Assignment 7 posted, due Friday 18 th All project components ordered Dates –Thursday 12/1 review lecture –Tuesday 12/6 project demonstrations.
Chapter #6: Sequential Logic Design
Page 1 Sequential Logic Basic Binary Memory Elements.
Sequential Logic 1 clock data in may changestable data out (Q) stable Registers  Sample data using clock  Hold data between clock cycles  Computation.
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.
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.
11/16/2004EE 42 fall 2004 lecture 331 Lecture #33: Some example circuits Last lecture: –Edge triggers –Registers This lecture: –Example circuits –shift.
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:
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
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.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
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
ENGR-43_Lec-05c_Thevenin_AC_Power.pptx 1 Bruce Mayer, PE Engineering-43: Engineering Circuit Analysis Bruce Mayer, PE Licensed.
VI - Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Sequential logic Sequential circuits  simple circuits with feedback  latches.
1 CSE370, Lecture 15 Lecture 15 u Logistics n HW5 due this Friday n HW6 out today, due Friday Feb 20 n I will be away Friday, so no office hour n Bruce.
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.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
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.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Computer Organization CDA 3103 Dr. Hassan Foroosh Dept. of Computer Science UCF © Copyright Hassan Foroosh 2002.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
Digital Design: Sequential Logic Principles
Lecture 10 Flip-Flops/Latches
Digital Design: Sequential Logic Blocks
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Lecture #16: D Latch ; Flip-Flops
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
David Culler Electrical Engineering and Computer Sciences
Chapter #6: Sequential Logic Design
Registers and Counters
Sequential Logic Combinational logic:
Digital Fundamentals Floyd Chapter 7 Tenth Edition
Prof. Hsien-Hsin Sean Lee
Flip Flops.
Typical Timing Specifications
Introduction to Sequential Logic Design
ECE Digital logic Lecture 16: Synchronous Sequential Logic
CPE/EE 422/522 Advanced Logic Design L03
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 13 March 2 W’05 Yutao He 4532B Boelter Hall
LECTURE 15 – DIGITAL ELECTRONICS
Chapter 7 Latches, Flip-Flops, and Timers
CS Fall 2005 – Lec. #5 – Sequential Logic - 1
Elec 2607 Digital Switching Circuits
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
ECE 434 Advanced Digital System L05
Instructor: Alexander Stoytchev
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
CSE 370 – Winter Sequential Logic-2 - 1
FLIP-FLOPS.
Synchronous sequential
Synchronous Sequential
Flip-Flops.
Lecture 19 Logistics Last lecture Today
Week 11 Flip flop & Latches.
Presentation transcript:

CSE 370 – Winter 2002 - Sequential Logic-2 - 1 Overview Last lecture Master-slave flip-flops Edge triggered flip-flops Today Timing methodologies 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 1

CSE 370 – Winter 2002 - Sequential Logic-2 - 2 Timing methodologies Rules for interconnecting components and clocks guarantee proper operation of system when strictly followed Approach depends on building blocks used for memory elements we'll focus on systems with edge-triggered flip-flops found in programmable logic devices many custom integrated circuits focus on level-sensitive latches fewer transistors Basic rules for correct timing: (1) correct inputs, with respect to time, are provided to the flip-flops (2) no flip-flop changes state more than once per clocking event (3) Avoid mixing positive-edge flip-flops and negative-edge flip-flops in the same circuit 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 2

Timing methodologies (cont’d) Definition of terms clock: periodic event, causes state of memory element to change can be rising edge or falling edge or high level or low level setup time: minimum time before the clocking event by which the input must be stable (Tsu) hold time: minimum time after the clocking event until which the input must remain stable (Th) input clock Tsu Th data D Q D Q clock there is a timing "window" around the clocking event during which the input must remain stable and unchanged in order to be recognized stable changing data clock 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 3

Comparison of latches and flip-flops D Q D CLK Qedge Qlatch CLK positive edge-triggered flip-flop D Q G CLK transparent (level-sensitive) latch behavior is the same unless input changes while the clock is high 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 4

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) Th 5ns Tw 25ns Tplh 25ns 13ns Tphl 40ns 25ns Tsu 20ns D CLK Q all measurements are made from the clocking event that is, the rising edge of the clock 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 5

Comparison of latches and flip-flops (cont’d) Type When inputs are sampled When output is valid unclocked always propagation delay from input change latch level-sensitive clock high propagation delay from input change latch (Tsu/Th around falling or clock edge (whichever is later) edge of clock) master-slave clock high propagation delay from falling edge flip-flop (Tsu/Th around falling of clock edge of clock) negative clock hi-to-lo transition propagation delay from falling edge edge-triggered (Tsu/Th around falling of clock flip-flop edge of clock) 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 6

Cascading edge-triggered flip-flops (timing considerations) Shift register new value goes into first stage while previous value of first stage goes into second stage consider setup/hold/propagation delays (prop must be > hold) CLK IN Q0 Q1 D Q OUT 100 Input stream 0101011 IN Q0 Q1 CLK 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 7

Cascading flip-flops (con’t) Flip-flop propagation delays must exceed hold times The second stage must latch its input before the value changes (propagation delays exceed hold times; clock width exceeds setup time) In Q0 Q1 Clk tsu tphl th tplh 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 8

CSE 370 – Winter 2002 - Sequential Logic-2 - 9 Clock skew The problem correct behavior assumes next state of all storage elements determined by all storage elements at the same time this is difficult in high-performance systems because time for clock to arrive at flip-flop is comparable to delays through logic effect of skew on cascaded flip-flops: 100 In Q0 Q1 CLK0 CLK1 CLK1 is a delayed version of CLK0 original state: IN = 0, Q0 = 1, Q1 = 1 due to skew, next state becomes: Q0 = 0, Q1 = 0, and not Q0 = 0, Q1 = 1 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 9

Summary of latches and flip-flops Development of D-FF level-sensitive used in custom integrated circuits can be made with 4 switches edge-triggered used in programmable logic devices good choice for data storage register Historically J-K FF was popular but now never used similar to R-S but with 1-1 being used to toggle output (complement state) good in days of TTL/SSI not a good choice for PALs/PLAs as it requires 2 inputs can always be implemented using D-FF Preset and clear inputs are highly desirable on flip-flops used at start-up or to reset system to a known state Synchronous: at clock edge; Asynchronous (quick but dangerous!): at any time 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 10

Metastability and asynchronous inputs Clocked synchronous circuits inputs, state, and outputs sampled or changed in relation to a common reference signal (called the clock) e.g., master/slave, edge-triggered Asynchronous circuits inputs, state, and outputs sampled or changed independently of a common reference signal (glitches/hazards a major concern) e.g., R-S latch Asynchronous inputs to synchronous circuits inputs can change at any time, will not meet setup/hold times dangerous, synchronous inputs are greatly preferred cannot be avoided (e.g., reset signal, memory wait, user input) 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 11

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 logic 1 logic 0 logic 0 logic 1 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 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 12

Dealing with synchronization failure Probability of failure can never be reduced to 0, but it can be reduced (1) slow down the system clock this gives the synchronizer more time to decay into a steady state; synchronizer failure becomes a big problem for very high speed systems (2) use fastest possible logic technology in the synchronizer this makes for a very sharp "peak" upon which to balance (3) cascade two synchronizers this effectively synchronizes twice (both would have to fail) asynchronous input Q synchronized input D Q D Clk synchronous system 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 13

Handling asynchronous inputs Never allow asynchronous inputs to fan-out to more than one flip-flop synchronize as soon as possible and then treat as synchronous signal Clocked Synchronizer Synchronous System Async Q0 Async Q0 D Q D Q D Q Input Input Clock Clock D Q Q1 D Q Q1 Clock Clock 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 14

Handling asynchronous inputs (cont’d) What can go wrong? input changes too close to clock edge (violating setup time constraint) In Q0 Q1 CLK In is asynchronous and fans out to D0 and D1 one FF catches the signal, one does not inconsistent state may be reached! 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 15

CSE 370 – Winter 2002 - Sequential Logic-2 - 16 Flip-flop features Reset (set state to 0) – R synchronous: Dnew = R' • Dold (when next clock edge arrives) asynchronous: doesn't wait for clock, quick but dangerous Preset or set (set state to 1) – S (or sometimes P) synchronous: Dnew = Dold + S (when next clock edge arrives) Both reset and preset Dnew = R' • Dold + S (set-dominant) Dnew = R' • Dold + R'S (reset-dominant) Selective input capability (input enable or load) – LD or EN multiplexor at input: Dnew = LD' • Q + LD • Dold load may or may not override reset/set (usually R/S have priority) Complementary outputs – Q and Q' 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 16

CSE 370 – Winter 2002 - Sequential Logic-2 - 17 Registers Collections of flip-flops with similar controls and logic stored values somehow related (for example, form binary value) share clock, reset, and set lines similar logic at each stage Examples registers in ALU shift registers counters R S D Q OUT1 OUT2 OUT3 OUT4 CLK IN1 IN2 IN3 IN4 "0" 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 17

CSE 370 – Winter 2002 - Sequential Logic-2 - 18 Shift register Holds samples of input store last 4 input values in sequence 4-bit (right) shift register: D Q IN OUT1 OUT2 OUT3 OUT4 CLK 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 18

Universal shift register Holds 4 values serial or parallel inputs serial or parallel outputs permits shift left or right shift in new values from left or right left_in left_out right_out clear right_in output input s0 s1 clock clear sets the register contents and output to 0 s1 and s0 determine the shift function s0 s1 function 0 0 hold state 0 1 shift right 1 0 shift left 1 1 load new input 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 19

Design of universal shift register Consider one of the four flip-flops new value at next clock cycle: clear s0 s1 new value 1 – – 0 0 0 0 output 0 0 1 output value of FF to left (shift right) 0 1 0 output value of FF to right (shift left) 0 1 1 input Nth cell to N-1th cell to N+1th cell Q D CLK CLEAR s0 and s1 control mux 1 2 3 Q[N-1] (left) Q[N+1] (right) Input[N] 11/16/2018 CSE 370 – Winter 2002 - Sequential Logic-2 - 20