FAMU-FSU College of Engineering EEL 3705 / 3705L Digital Logic Design Spring 2007 Instructor: Dr. Michael Frank Module #10: Sequential Logic Timing & Pipelining.

Slides:



Advertisements
Similar presentations
Introduction to CMOS VLSI Design Sequential Circuits.
Advertisements

Changes in input values are reflected immediately (subject to the speed of light and electrical delays) on the outputs Each gate has an associated “electrical.
11/12/2004EE 42 fall 2004 lecture 311 Lecture #31 Flip-Flops, Clocks, Timing Last lecture: –Finite State Machines This lecture: –Digital circuits with.
Introduction to Sequential Logic Design Latches. 2 Terminology A bistable memory device is the generic term for the elements we are studying. Latches.
Sequential Digital Circuits Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
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.
Latches CS370 –Spring 2003 Section 4-2 Mano & Kime.
Flip-Flops Computer Organization I 1 June 2010 © McQuain, Feng & Ribbens A clock is a free-running signal with a cycle time. A clock may be.
Lecture 11: Sequential Circuit Design. CMOS VLSI DesignCMOS VLSI Design 4th Ed. 11: Sequential Circuits2 Outline  Sequencing  Sequencing Element Design.
1 Fundamentals of Computer Science Sequential Circuits.
CHAPTER 3 Sequential Logic/ Circuits.  Concept of Sequential Logic  Latch and Flip-flops (FFs)  Shift Registers and Application  Counters (Types,
ECE 331 – Digital System Design Latches and Flip-Flops (Lecture #17) The slides included herein were taken from the materials accompanying Fundamentals.
Digital Logic Chapter 5 Presented by Prof Tim Johnson
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
1 Kuliah Rangkaian Digital Kuliah 8: Rangkaian Logika Sekuensial Teknik Komputer Universitas Gunadarma.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Sequential circuits The digital circuits considered thus far have been combinational, where the outputs are entirely dependent on the current inputs. Although.
Fall 2004EE 3563 Digital Systems Design EE 3563 Sequential Logic Design Principles  A sequential logic circuit is one whose outputs depend not only on.
ReturnNext  Latch : a sequential device that watches all of its inputs continuously and changes its outputs at any time, independent of a clocking signal.
Sequential Logic Computer Organization Ellen Walker Hiram College Figures from Computer Organization and Design 3ed, D.A. Patterson & J.L. Hennessey, Morgan.
EET 1131 Unit 10 Flip-Flops and Registers
EKT 124 / 3 DIGITAL ELEKTRONIC 1
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
1 Lecture 28 Timing Analysis. 2 Overview °Circuits do not respond instantaneously to input changes °Predictable delay in transferring inputs to outputs.
Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis EE4800 CMOS Digital IC Design & Analysis Lecture 11 Sequential Circuit Design Zhuo Feng.
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.
EE141 © Digital Integrated Circuits 2nd Timing Issues 1 Latch-based Design.
Lecture 9 Memory Elements and Clocking
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.
Modern VLSI Design 2e: Chapter 5 Copyright  1998 Prentice Hall PTR Topics n Memory elements. n Basics of sequential machines.
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.
Introduction to CMOS VLSI Design Lecture 10: Sequential Circuits
Chapter #6: Sequential Logic Design 6.2 Timing Methodologies
Introduction to CMOS VLSI Design Lecture 10: Sequential Circuits Credits: David Harris Harvey Mudd College (Material taken/adapted from Harris’ lecture.
Contemporary Logic Design Sequential Logic © R.H. Katz Transparency No Chapter #6: Sequential Logic Design Sequential Switching Networks.
CS 151 Digital Systems Design Lecture 28 Timing Analysis.
Chapter 3: Sequential Logic Circuit EKT 121 / 4 ELEKTRONIK DIGIT 1.
A presentation on Counters
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
ETE Digital Electronics Latches and Flip-Flops [Lecture:12] Instructor: Sajib Roy Lecturer, ETE, ULAB.
Digital Integrated Circuits© Prentice Hall 1995 Sequential Logic SEQUENTIAL LOGIC.
COE 202: Digital Logic Design Sequential Circuits Part 1
Introduction to Sequential Logic Design Flip-flops.
Flip Flop
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
Introduction to Sequential Logic Design Flip-flops FSM Analysis.
Company LOGO DKT 122/3 DIGITAL SYSTEM 1 WEEK #12 LATCHES & FLIP-FLOPS.
Sequential Logic Combinatorial components: the output values are computed only from their present input values. Sequential components: their output values.
Topic: Sequential Circuit Course: Logic Design Slide no. 1 Chapter #6: Sequential Logic Design.
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
Flip Flop Chapter 15 Subject: Digital System Year: 2009.
ECE C03 Lecture 81 Lecture 8 Memory Elements and Clocking Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
CEC 220 Digital Circuit Design Latches and Flip-Flops Monday, March 03 CEC 220 Digital Circuit Design Slide 1 of 19.
Synchronous Sequential Logic A digital system has combinational logic as well as sequential logic. The latter includes storage elements. feedback path.
Synchronous Sequential Logic Part I
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
Chapter 6 – Digital Electronics – Part 1 1.D (Data) Flip Flops 2.RS (Set-Reset) Flip Flops 3.T Flip Flops 4.JK Flip Flops 5.JKMS Flip Flops Information.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
Synchronous Sequential Circuits by Dr. Amin Danial Asham.
ECE 301 – Digital Electronics Brief introduction to Sequential Circuits and Latches (Lecture #14)
Dept. of Electrical Engineering
Instructor: Alexander Stoytchev CprE 281: Digital Logic.
7. Latches and Flip-Flops Digital Computer Logic.
Lecture #16: D Latch ; Flip-Flops
Presentation transcript:

FAMU-FSU College of Engineering EEL 3705 / 3705L Digital Logic Design Spring 2007 Instructor: Dr. Michael Frank Module #10: Sequential Logic Timing & Pipelining

FAMU-FSU College of Engineering Sequential Logic Timing Parameters  Any sequential storage element is subject to constraints on the relative timing of input, clock and output events.  Some important terms: Setup time t s – Min. req. time fr. start of valid input data to latching clock edge. Hold time t h – Min. req. time fr. latching edge to end of valid input data. Ouput delay time t od – Worst-case time from latching clock edge to first appearance of corresp. valid output data.  A.k.a. “Clock-to-Q” time  These parameters, together w. combinational propagation delays, determine the max. tolerable operating frequency for a given sequential circuit. clk D Q D valid invalid Q tsts thth t od Example: Rising edge- triggered D flip-flop new value old value

FAMU-FSU College of Engineering Estimation of Timing Parameters  Given the internal structure of a storage element, and the delays associated with its internal components, we can estimate its overall setup, hold, and output delay times. Example: Given that the prop. delay for NOT=1 ns, and NAND=2 ns, estimate t s, t h, and t od for the master-slave D flip-flop shown below. D D latch SR latch clk Q q ~q ~D ~r 1 ~s 1 ~s 2 ~r 2 ~clk Rising-edge-triggered D flip-flop made of a clocked D latch driving a clocked SR latch, w. negative clock skew to reduce output delay clk ~clk D ~D ~r 1 ~s 1 q ~q ~s 2 ~r 2 Q SR held SR transparent SR held SR transp. D transp. D held D transparentD held d1d1 undef. d2d2 ud. ~d 1 undef. ~d 2 d1d1 undef.und. ~d 1 d2d2 ~d 2 1 undef. 1 und. d1d1 undef. und. ~d 1 undef. 1 1 u u ~d 1 uu d1d1 d0d0 d1d1 d2d2 u u (Timing estimations on next slide)

FAMU-FSU College of Engineering Setup/Hold Time Estimations for this Example  Setup time t s = 4 ns, because Path to set D latch B+D+F+E (7 ns) must beat lockdown signal A+C&A+D (3 ns).  Hold time t s = 3 ns, because A+C (3 ns) must finish before it’s safe to allow D to fluctuate  Output delay t od = 7 ns, because Critical path is B+D+F+H+J+I (11 ns), minus setup time of 4 ns before clock edge D D latch SR latch clk Q q ~q ~D ~r 1 ~s 1 ~s 2 ~r 2 ~clk clk ~clk D ~D ~r 1 ~s 1 q ~q ~s 2 ~r 2 Q SR held SR transparent SR held SR transp. D transp. D held D transparentD held d1d1 undef. d2d2 ud. ~d 1 undef. ~d 2 d1d1 undef.und. ~d 1 d2d2 ~d 2 1 undef. 1 und. d1d1 undef. und. ~d 1 undef. 1 1 u u ~d 1 uu d1d1 d0d0 d1d1 d2d2 u u A B C D E F G H I J

FAMU-FSU College of Engineering Sequential Logic Timing Analysis  What is the minimum clock period t per,min and max freq. f max for this sequential circuit?  One constraint: New state D′ must be ready by at least a setup-time prior to next edge.  t per > t od + t pd + t s  Thus t per,min = t od + t pd + t s, and so f max = 1/(t od + t pd + t s ). Combinational state-update logic w. prop. delay t pd DQ t s, t h, t od clk D valid invalid Q tsts thth t od D′ tsts thth t pd

FAMU-FSU College of Engineering Why is Hold Time important?  Consider the behavior of a sequential circuit immediately after a clock edge… If the minimum (fastest-case) output delay plus propagation delay is less than the storage element’s hold time,  The flip-flop’s input can get corrupted before we are finished locking its state! The new-state signal “races” all the way around the circuit and interferes with itself.  This is an example of a “race condition” hazard. These can be avoided entirely by using “two- phase non-overlapping clocks” (next slide) Combinational state-update logic w. prop. delay t pd DQ t s, t h, t od D′ A race condition exists if t od + t pd < t h.

FAMU-FSU College of Engineering Two-Phase Non-overlapping Clocks  Suppose that the two latches making up a flip-flop are driven by independent clocks… That is, the 2 nd is not simply the complement of the first…  If the duty cycles (active periods) of the clocks are non-overlapping, then both latches are never transparent at the same time  For there to be a race condition is then impossible! latch 1 latch 2 next-state logic Φ1Φ1 Φ2Φ2 Φ1Φ1 Φ2Φ2 period of non-overlap latch 1 transparent latch 2 transparent

FAMU-FSU College of Engineering Generating two-phase nonoverlapping clocks from single-phase clocks  What if two-phase non-overlapping clocks aren’t provided to you? Never fear, you can make them with a NOR- based structure, like an unclocked SR latch…  The falling edge on one of the clock outputs causes a subsequent rising edge on the other… clk Φ1Φ1 Φ2Φ2 clk′ clk clk′ Φ1Φ1 Φ2Φ2

FAMU-FSU College of Engineering Clock Frequency Dividers  What if the available clock signals are too fast for your design, and you need a slower clock? This is easy, just use an n-bit counter to divide the input clock frequency by 2 n … You can also use a modulo-m counter with its overflow bit clocking a T flip-flop to obtain a frequency reduction by any even factor 2m. n-bit counter clk (freq. f) … q0q0 q1q1 q2q2 q n-1 frequency f/2 frequency f/4 frequency f/8 frequency f/2 n

FAMU-FSU College of Engineering Another way to generate 2-phase non-overlapping clocks  Assuming that you already have a working edge- triggered sequential counter… This method generates non-overlapping output clocks with frequencies ¼ that of the input clock.  Note there is also a significant period of non-overlap. Nearly eliminates possibility of race conditions. 2-bit counter t 1..0 decoder Φ1Φ1 e0e0 e1e1 e2e2 e3e3 Φ2Φ2 clk

FAMU-FSU College of Engineering JK Flip-Flops  A JK latch or flip-flop is like an SR flip-flop (with J=set, K=reset), but… When both J and K inputs are on, toggles (complements) the flip- flop’s state  This input combination was disallowed for the SR case  An (unclocked or level-sensitive) JK latch is not very useful because its output (when J=K=1) is unstable, and hence unpredictable. Move slide to earlier module Edge-triggered JK flip-flop from an edge-triggered D flip-flop J K Q D ck

FAMU-FSU College of Engineering T (Toggle) Flip-Flop  Basically, a JK flip-flop where J=K=T. When T is on, output is toggled  when T is off, output remains unchanged Like with JK, output would be unstable if transitions were not edge-triggered J K ck Q T (when T=1)

FAMU-FSU College of Engineering Pipelined Sequential Logic  What if your next-state logic becomes very deep and complicated? Its propagation delay will likely be high…  And this means your clock frequency will be low. This hurts the performance (throughput) of your design.  A widely-used approach to fix this problem: Divide your deep logic into some number d of sequential stages (where d is called the “pipeline depth”)…  with relatively shallow, fast logic between them You can then clock new inputs into the circuit at (nearly) d times higher frequency!  Side effect: Your design now maintains d states in parallel! Your application must be parallelizable for this to be helpful.  Note: Pipelining can improve throughput, but not the latency (time from input to output) to process individual data.

FAMU-FSU College of Engineering Non-pipelined vs. pipelined sequential designs For pipeline depth d=2:  Non-pipelined computes: x t+1 = z t = g(f(x t ))  Pipelined computes: y t+1 = f(x t ); x t+2 = z t+1 = g(y t+1 ) = g(f(x t ))  state on even cycles And simultaneously:  y t+2 = f(x t+1 ); x t+3 = z t+2 = g(y t+2 ) = g(f(x t+1 )) state on odd cycles clk g(f(x)) x z x f(x)f(x) y g(y)g(y) clk z Are both of these states representing something useful? Depends on your application! Slow clock Faster clock same function!