cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Similar documents
Sequential logic. Circuits with feedback. How to control feedback? Sequential circuits. Timing methodologies. Basic registers

Sequential Circuits. Sequential Logic. Circuits with Feedback. Simplest Circuits with Feedback. Memory with Cross-coupled Gates.

Sequential Logic. Sequential Circuits. ! Timing Methodologies " Cascading flip-flops for proper operation " Clock skew

! Two inverters form a static memory cell " Will hold value as long as it has power applied

ALGORITHMS IN HW EECS150 ALGORITHMS IN HW. COMBINATIONAL vs. SEQUENTIAL. Sequential Circuits ALGORITHMS IN HW

Traversing Digital Design. EECS Components and Design Techniques for Digital Systems. Lec 22 Sequential Logic - Advanced

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

Chapter 6. sequential logic design. This is the beginning of the second part of this course, sequential logic.

UNIT 11 LATCHES AND FLIP-FLOPS

Unit 11. Latches and Flip-Flops

Switching Circuits & Logic Design

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Basis of sequential circuits: the R-S latch

ELCT201: DIGITAL LOGIC DESIGN

Experiment 8 Introduction to Latches and Flip-Flops and registers

6. Sequential Logic Flip-Flops

Switching Circuits & Logic Design

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

3 Flip-Flops. The latch is a logic block that has 2 stable states (0) or (1). The RS latch can be forced to hold a 1 when the Set line is asserted.

INTRODUCTION TO SEQUENTIAL CIRCUITS

Logic Design. Flip Flops, Registers and Counters

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Advanced Digital Logic Design EECS 303

Sequential Circuits: Latches & Flip-Flops

IT T35 Digital system desigm y - ii /s - iii

Chapter 11 Latches and Flip-Flops

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Combinational vs Sequential

Introduction to Sequential Circuits

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

EEE2135 Digital Logic Design Chapter 6. Latches/Flip-Flops and Registers/Counters 서강대학교 전자공학과

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

ELCT201: DIGITAL LOGIC DESIGN

RS flip-flop using NOR gate

UNIT IV. Sequential circuit

Lecture 8: Sequential Logic

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

12/31/2010. Overview. 12-Latches and Flip Flops Text: Unit 11. Sequential Circuits. Sequential Circuits. Feedback. Feedback

D Latch (Transparent Latch)

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

CHAPTER 11 LATCHES AND FLIP-FLOPS

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

RS flip-flop using NOR gate

Engr354: Digital Logic Circuits

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

CHAPTER1: Digital Logic Circuits

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Digital Fundamentals: A Systems Approach

Chapter. Synchronous Sequential Circuits

Memory elements. Topics. Memory element terminology. Variations in memory elements. Clock terminology. Memory element parameters. clock.

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Flip-Flops and Sequential Circuit Design

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

Digital Integrated Circuits EECS 312

CHAPTER 4: Logic Circuits

Chapter 4. Logic Design

ECE 341. Lecture # 2

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

ELE2120 Digital Circuits and Systems. Tutorial Note 7

CHAPTER 4: Logic Circuits

DIGITAL CIRCUIT LOGIC UNIT 11: SEQUENTIAL CIRCUITS (LATCHES AND FLIP-FLOPS)

LATCHES & FLIP-FLOP. Chapter 7

Fundamentals of Computer Systems

Asynchronous (Ripple) Counters

Sequential Design Basics

Flip-Flops and Related Devices. Wen-Hung Liao, Ph.D. 4/11/2001

Synchronous Sequential Logic

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

Chapter 5: Synchronous Sequential Logic

Introduction to Microprocessor & Digital Logic

Fundamentals of Computer Systems

Sequential Logic and Clocked Circuits

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Review of digital electronics. Storage units Sequential circuits Counters Shifters

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

Other Flip-Flops. Lecture 27 1

Sequential Circuit Design: Part 1

MC9211 Computer Organization

Rangkaian Sekuensial. Flip-flop

ESE 570 STATIC SEQUENTIAL CMOS LOGIC CELLS. Kenneth R. Laker, University of Pennsylvania, updated 25Mar15


CPS311 Lecture: Sequential Circuits

PRE J. Figure 25.1a J-K flip-flop with Asynchronous Preset and Clear inputs

Counters

EL302 DIGITAL INTEGRATED CIRCUITS LAB #3 CMOS EDGE TRIGGERED D FLIP-FLOP. Due İLKER KALYONCU, 10043

Chapter 8 Sequential Circuits

Chapter 1: Switching Algebra Chapter 2: Logical Levels, Timing & Delays. Introduction to latches Chapter 9: Binary Arithmetic

Figure 1 shows a simple implementation of a clock switch, using an AND-OR type multiplexer logic.

Transcription:

equential logic equential circuits simple circuits with feedback latches edge-triggered flip-flops Timing methodologies cascading flip-flops for proper operation clock skew Basic registers shift registers simple counters Hardware description languages and sequential logic Autumn 2 CE37 - XIII - equential Logic Circuits with feedback How to control feedback? what stops values from cycling around endlessly X X2 Xn switching network Z Z2 Zn Autumn 2 CE37 - XIII - equential Logic 2

implest circuits with feedback Two inverters form a static memory cell will hold value as long as it has power applied "" "" "stored value" How to get a new value into the memory cell? selectively break feedback path load new value into cell "remember" "data" "load" "stored value" Autumn 2 CE37 - XIII - equential Logic 3 Memory with cross-coupled gates Cross-coupled NO gates similar to inverter pair, with capability to force output to (reset=) or (set=) Cross-coupled NAND gates similar to inverter pair, with capability to force output to (reset=) or (set=) ' ' ' ' ' ' Autumn 2 CE37 - XIII - equential Logic 4

Timing behavior ' eset Hold et eset et ace \ Autumn 2 CE37 - XIII - equential Logic 5 tate behavior or - latch ' Truth table of - latch behavior hold unstable ' ' ' ' Autumn 2 CE37 - XIII - equential Logic 6

Theoretical - latch behavior ' tate diagram states: possible values of outputs transitions: changes based on inputs = = ' = ' = ' ' Autumn 2 CE37 - XIII - equential Logic 7 Theoretical - latch behavior ' tate diagram states: possible values of outputs transitions: changes based on inputs = = ' = = ' = = = ' = ' Autumn 2 CE37 - XIII - equential Logic 8

Theoretical - latch behavior ' tate diagram states: possible values of outputs transitions: changes based on inputs = = ' = = = = ' = = = = ' = = ' Autumn 2 CE37 - XIII - equential Logic 9 Theoretical - latch behavior ' tate diagram states: possible values of outputs transitions: changes based on inputs = = ' = = = = ' = = = = ' = = = = = = possible oscillation between states and ' Autumn 2 CE37 - XIII - equential Logic

Observed - latch behavior Very difficult to observe - latch in the - state one of or usually changes first Ambiguously returns to state - or - a so-called "race condition" or non-deterministic transition = = ' = = = = = ' = = ' = = ' = = Autumn 2 CE37 - XIII - equential Logic - latch analysis Break feedback path (t) ' (t+δ) (t) (t+δ) X X hold reset set not allowed (t) X X characteristic equation (t+δ) = + (t) Autumn 2 CE37 - XIII - equential Logic 2

- latch using NAND gates ' (t) (t) (t+δ) X X hold reset set not allowed (t) X X characteristic equation (t+δ) = + (t) Autumn 2 CE37 - XIII - equential Logic 3 Gated - latch Control when and inputs matter otherwise, the slightest glitch on or while enable is low could cause change in stored value ' enable' ' ' et eset ' ' enable' ' Autumn 2 CE37 - XIII - equential Logic 4

Clocks Used to keep time wait long enough for inputs (' and ') to settle then allow to have effect on value stored Clocks are regular periodic signals period (time between clock ticks) duty-cycle (clock pulse width - expressed as % of period) duty cycle (in this case, 5%) period Autumn 2 CE37 - XIII - equential Logic 5 Clocks (cont d) Controlling an - latch with a clock and can t change while clock is active only have half of clock period for signal changes to propagate signals must be stable for the other half of clock period clock stable changing stable changing stable and clock Autumn 2 CE37 - XIII - equential Logic 6

Cascading latches Connect output of one latch to input of another How to stop changes from racing through chain? need to be able to control flow of data from one latch to the next move one latch per clock period have to worry about logic between latches (arrows) that is too fast clock Autumn 2 CE37 - XIII - equential Logic 7 Master-slave structure Break flow by alternating clocks (like an air-lock) use positive clock to latch inputs into one - latch use negative clock to change outputs with another - latch View pair as one basic unit master-slave flip-flop twice as much logic output changes a few gate delays after the falling edge of clock but does not affect any cascaded flip-flops master stage slave stage P P Autumn 2 CE37 - XIII - equential Logic 8

D flip-flop Make and complements of each other eliminates s catching problem can't just hold previous value must have new value ready every clock period value of D just before clock goes low is what is stored in flip-flop can make - flip-flop by adding logic to make D = + master stage slave stage P D P gates Autumn 2 CE37 - XIII - equential Logic 9 Edge-triggered flip-flops using gates Only 6 gates sensitive to inputs only near edge of clock signal (not while high) Clk= D D D D becomes D when clock goes low Autumn 2 CE37 - XIII - equential Logic 2 becomes D when clock goes low negative edge-triggered D flip-flop (D-FF) 4-5 gate delays must respect setup and hold time constraints to successfully capture input D characteristic equation (t+) = D

Edge-triggered flip-flops using transistors Only 8 transistors clk clk clk clk D D clk clk clk clk D D Autumn 2 CE37 - XIII - equential Logic 2 Edge-triggered flip-flops (cont d) Positive edge-triggered inputs sampled on rising edge; outputs change after rising edge Negative edge-triggered flip-flops inputs sampled on falling edge; outputs change after falling edge D pos pos neg neg positive edge-triggered FF negative edge-triggered FF Autumn 2 CE37 - XIII - equential Logic 22

Timing methodologies ules 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 such as our FPGA many custom integrated circuits focus on level-sensitive latches they are much smaller (but need to be careful about timing) Basic rules for correct timing: () correct inputs, with respect to clock, are provided to the flip-flops (2) no flip-flop changes state more than once per clocking event Autumn 2 CE37 - XIII - equential Logic 23 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 etup time: minimum time before the clocking event by which the input must be stable (T setup or T su ) Hold time: minimum time after the clocking event until which the input must remain stable (T hold or T h ) input T su T h data D D clock 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 clock stable changing Autumn 2 CE37 - XIII - equential Logic 24

Comparison of latches and flip-flops D positive edge-triggered flip-flop D edge D G transparent (level-sensitive) latch latch behavior is the same unless input changes while the clock is high Autumn 2 CE37 - XIII - equential Logic 25 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 hi-to-lo transition 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) Autumn 2 CE37 - XIII - equential Logic 26

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) D Clk T su.8 ns T h.5 ns T w 3.3 ns T pdlh 3.6 ns T su.8 ns T h.5 ns T w 3.3 ns T pdhl. ns all measurements are made from the clocking event (the rising edge of the clock) Autumn 2 CE37 - XIII - equential Logic 27 Cascading edge-triggered flip-flops IN hift 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) D D OUT IN Autumn 2 CE37 - XIII - equential Logic 28

Cascading edge-triggered flip-flops (cont d) Why this works propagation delays exceed hold times clock width constraint exceeds setup time this guarantees following stage will latch current value before it changes to new value In T su.8ns T p.-3.6ns T su.8ns T p.-3.6ns timing constraints guarantee proper operation of cascaded components assumes infinitely fast distribution of the clock T h.5ns T h.5ns Autumn 2 CE37 - XIII - equential Logic 29 Clock skew When it doesn t work 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: In is a delayed version of original state: IN =, =, = expected next state: =, = due to skew, next state becomes: =, = ( races through two FFs instead of one) Autumn 2 CE37 - XIII - equential Logic 3

ummary of latches and flip-flops Development of D-FF level-sensitive used in custom integrated circuits can be made with 8 switches edge-triggered used in modern programmable logic devices good choice for data storage register Historically, JK-FF was popular but now never used similar to but with - being used to toggle output JK = hold, reset, set, toggle (complement state) good in days of I (more complex input function: D = J + K ) can always be implemented using D-FF, if needed Preset and clear inputs are highly desirable on flip-flops used at start-up or to reset system to a known state Autumn 2 CE37 - XIII - equential Logic 3 Flip-flop features eset (set state to ) synchronous: D new = ' D (when next clock edge arrives) asynchronous: doesn't wait for clock, quick but dangerous Preset or set (set state to ) (or sometimes P) synchronous: D new = D + (when next clock edge arrives) asynchronous: doesn't wait for clock, quick but dangerous Both reset and preset D new = ' D + (set-dominant) D new = ' D + ' (reset-dominant) elective input capability (input enable or load) LD or EN multiplexor at input: D new = LD' + LD D load may or may not override reset/set (usually / have priority) Complementary outputs and ' Autumn 2 CE37 - XIII - equential Logic 32