Lecture 19 Logistics Last lecture Today

Slides:



Advertisements
Similar presentations
Digital Techniques Fall 2007 André Deutz, Leiden University
Advertisements

1 Lecture 16 Timing  Terminology  Timing issues  Asynchronous inputs.
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.
Module 12.  In Module 9, 10, 11, you have been introduced to examples of combinational logic circuits whereby the outputs are entirely dependent on the.
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)
ENGIN112 L20: Sequential Circuits: Flip flops October 20, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 20 Sequential Circuits: Flip.
11/10/2004EE 42 fall 2004 lecture 301 Lecture #30 Finite State Machines Last lecture: –CMOS fabrication –Clocked and latched circuits This lecture: –Finite.
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.
1 CSE370, Lecture 14 Lecture 14 u Logistics n Midterm 1: Average 90/100. Well done! n Midterm solutions online n HW5 due date delayed until this Friday.
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.
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.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Clocking System Design
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
ECE 301 – Digital Electronics Brief introduction to Sequential Circuits and Latches (Lecture #14)
ECE 331 – Digital System Design Introduction to Sequential Circuits and Latches (Lecture #16)
Digital Design - Sequential Logic Design
Lecture 11: Sequential Circuit Design
Chapter #6: Sequential Logic Design
Sequential Logic Combinational logic:
Sequential circuit design with metastability
Digital Fundamentals Floyd Chapter 7 Tenth Edition
Digital Fundamentals Floyd Chapter 7 Tenth Edition
Prof. Hsien-Hsin Sean Lee
Learning Outcome By the end of this chapter, students are expected to refresh their knowledge on sequential logic related to HDL.
Flip Flops.
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
CISE204: Design of Digital Systems Lecture 18 : Sequential Circuits
Introduction to Sequential Logic Design
ECE Digital logic Lecture 16: Synchronous Sequential Logic
Sequential Circuits: Flip-Flops
CPE/EE 422/522 Advanced Logic Design L03
DIGITAL ELECTRONICS ТHEME 4: SEQUENTIAL LOGIC CIRCUITS. FLIP- FLOPS – ASYNCHRONOUS AND SYNCHRONOUS, R - S, D, T, J - K FLIP- FLOPS. The value of the outputs.
332:437 Lecture 12 Finite State Machine Design
CS M51A/EE M16 Winter’05 Section 1 Logic Design of Digital Systems Lecture 13 March 2 W’05 Yutao He 4532B Boelter Hall
Chapter 7 Latches, Flip-Flops, and Timers
CSE 370 – Winter Sequential Logic-2 - 1
Elec 2607 Digital Switching Circuits
触发器 Flip-Flops 刘鹏 浙江大学信息与电子工程学院 March 27, 2018
Instructor: Alexander Stoytchev
ECE434a Advanced Digital Systems L06
Asynchronous Sequential Logic
CSE 370 – Winter Sequential Logic - 1
Lecture 15 Logistics Last lecture Today HW4 is due today
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
Instructor: Alexander Stoytchev
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Metastability - When Good Flip-Flop Goes Bad: Causes and Cure
Lecture 16 Logistics Last lecture Today HW5 out, due next wednesday
CSE 370 – Winter Sequential Logic-2 - 1
Flip-Flops.
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
SEQUENTIAL CIRCUITS __________________________________________________
Lecture 22 Logistics Last lecture Today HW7 is due on Friday
FLIPFLOPS.
Presentation transcript:

Lecture 19 Logistics Last lecture Today HW5 is due today (full credit today, 20% off Monday 10:29am, Solutions up Monday 10:30am) HW6 is due Wednesday (no late HW accepted, solutions posted immediately) Midterm next Friday --- covers materials up to HW6 and Monday lecture) Last lecture Finite State Machines (FSM) Today Timing issues Timing terminology and issues and solutions (e.g. clock skew) Asynchronous inputs and issues and solutions (e.g. debouncing) 19

The “WHY” slide Timing issues For sequential logic, “timing” is critical because for the same inputs, the output could be different at different times (like T-flip flops). In order to achieve desired outputs, timing has to be taken into consideration. Transistors, chips, and even wires have their own delays. Because of this, nothing could ever be perfectly synchronized. It is important to understand how fast a clock can tick based on these delays and what the common issues are in making computers to run fast and accurately. There are synchronous and asynchronous inputs. For example, typing on the keyboard, you are putting in asynchronous inputs to the computer. Asynchronous inputs can change the outputs immediately regardless of the clock state, and it is important to know how to handle that. 19

Latches versus flip-flops D Q CLK D Qff Qlatch CLK D Q CLK behavior is the same unless input changes while the clock is high For most applications, it is not good to see Input changes instantaneously at the output 19

master-slave D flip-flop The master-slave D Master D latch Slave D latch Input D Q D Q Output CLK master-slave D flip-flop Because of the timing issue, it was good to use two latches as master-slave configuration or use one flip-flop. 19

Timing terminology and constraints Setup time tsu: Amount of time the input must be stable before the clock transitions high (or low for negative-edge triggered FF) Hold time th: Amount of time the input must be stable after the clock transitions high (or low for negative-edge triggered FF) Clock width tw : Clock width that must be met Propagation delays tplh and tphl: Propagation delay (high to low, low to high) (longer than hold time) tsu th tsu th D Q CLK D tw CLK Q tphl tplh 15 19

Cascading flip-flops Flip-flop propagation delays exceed hold times Second stage commits its input before Q0 changes In Q0 Q1 Clk tsu tphl th tplh IN CLK Q0 Q1 D Q > 15 19

Side note: Clock skew Goal: Clock all flip-flops at the same time Difficult to achieve in high-speed systems Clock delays (wire, buffers) are comparable to logic delays Problem is called clock skew Avoiding clock skew: design identical delays IN Q0 Q1 CLK0 CLK1 CLK0 clocks first flipflop CLK1 clocks second flipflop CLK1 should align with CLK0, but is delayed due to clock skew Original state: IN = 0, Q0 = 1, Q1 = 1 Next state: Q0 = 0, Q1 = 0 (should be Q1 = 1) 15 19

System considerations Use edge-triggered flip-flops wherever possible Avoid latches Most common: Master-slave D Basic rules for correct timing Clock flip-flops synchronously (all at the same time) No flip-flop changes state more than once per clock cycle FF propagation delay > hold time Avoid mixing positive-edge triggered and negative-edge triggered flip-flops in the same circuit 19

Asynchronous versus synchronous State changes occur when state inputs change Feedback elements may be wires or delays Synchronous State changes occur synchronously Feedback elements are clocked Asynchronous Synchronous Combinational Logic Clock Combinational Logic 16 19

Asynchronous inputs Clocked circuits are synchronous Circuit changes state only at clock edges Signals (voltages) settle in-between clock edges Unclocked circuits or signals are asynchronous No master clock Real-world inputs (e.g. a keypress) are asynchronous Synchronous circuits have asynchronous inputs Reset signal, memory wait, user input, etc. Inputs “bounce” Inputs can change at any time We must synchronize the input to our clock Inputs will violate flip-flop setup/hold times 19

Debouncing Switch inputs bounce Can use RS latch for debouncing i. e. don’t make clean transitions Can use RS latch for debouncing Eliminates dynamic hazards “Cleans-up” inputs 3.3V 0V R 1 Q 3.3V 1 S Q' 3.3V 0V 15 19

Synchronizer failure Occurs when FF input changes near clock edge Input is neither 1 or 0 when clock goes high Output may be neither 0 or 1 May stay undefined for a long time Undefined state is called metastability D CLK Q logic 0 logic 1 19

Minimizing synchronizer failures Failure probability can never be zero Cascade two (or more) flip-flops Effectively synchronizes twice Both would have to fail for system to fail asynchronous input synchronized input D Q D Q Clk 15 19

Handling asynchronous inputs Never fan-out asynchronous inputs Synchronize at circuit boundary Fan-out synchronized signal Synchronizer Async Q0 Async Q0 D Q D Q D Q Input Input Clock Clock Q1 Q1 D Q D Q Clock Clock 19

Summary: Timing issues with asynchronous inputs For sequential logic circuits, timing issues have to be considered. Inputs are often asynchronous and can cause problems. Different amount of delay at different part of the circuit can cause problems also. Solutions: Cascade flip flops in series Incorporate RS latch for debouncing Design to keep timing alignment in mind (length of cable, etc) 15 19