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

Similar documents
Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

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

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

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

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

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

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

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

Basis of sequential circuits: the R-S latch

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

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

6. Sequential Logic Flip-Flops

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

UNIT 11 LATCHES AND FLIP-FLOPS

give sequence to events have memory (short-term) use feedback from output to input to store information

ECE321 Electronics I

Switching Circuits & Logic Design

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

Unit 11. Latches and Flip-Flops

Engr354: Digital Logic Circuits

Fundamentals of Computer Systems

Glitches/hazards and how to avoid them. What to do when the state machine doesn t fit!

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

EEC 118 Lecture #9: Sequential Logic. Rajeevan Amirtharajah University of California, Davis Jeff Parkhurst Intel Corporation

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

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

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

Advanced Digital Logic Design EECS 303

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards

Sequential Circuits: Latches & Flip-Flops

Overview of Chapter 4

Sequential Circuit Design: Part 1

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

ELCT201: DIGITAL LOGIC DESIGN

Fundamentals of Computer Systems

SEQUENTIAL LOGIC. Sequential Logic

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

EECS150 - Digital Design Lecture 3 Synchronous Digital Systems Review. Announcements

Combinational vs Sequential

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

Digital Circuits ECS 371

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

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

Sequential Circuits. Introduction to Digital Logic. Course Outline. Overview. Introduction to Digital Logic. Introduction to Sequential Circuits

Chapter 11 Latches and Flip-Flops

Fundamentals of Computer Systems

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Lecture 11: Sequential Circuit Design

Lecture 8: Sequential Logic

Logic Design ( Part 3) Sequential Logic (Chapter 3)

RS flip-flop using NOR gate


Digital Logic & Computer Design CS Professor Dan Moldovan Spring Chapter 3 :: Sequential Logic Design

CHAPTER 1 LATCHES & FLIP-FLOPS

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

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

CPE/EE 427, CPE 527 VLSI Design I Sequential Circuits. Sequencing

Digital Fundamentals

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).

Sequencing. Lan-Da Van ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Fall,

Sequential Circuit Design: Part 1

Switching Circuits & Logic Design

Clock - key to synchronous systems. Lecture 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

Clock - key to synchronous systems. Topic 7. Clocking Strategies in VLSI Systems. Latch vs Flip-Flop. Clock for timing synchronization

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

UNIT IV. Sequential circuit

No feedback between inputs and outputs combinational What is charge sharing?

Logic Design. Flip Flops, Registers and Counters

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

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

Digital Integrated Circuits EECS 312

ECE 341. Lecture # 2

Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

ELE2120 Digital Circuits and Systems. Tutorial Note 7

Chapter 7 Sequential Circuits

DALHOUSIE UNIVERSITY Department of Electrical & Computer Engineering Digital Circuits - ECED 220. Experiment 4 - Latches and Flip-Flops

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

Outline. EECS150 - Digital Design Lecture 27 - Asynchronous Sequential Circuits. Cross-coupled NOR gates. Asynchronous State Transition Diagram

RS flip-flop using NOR gate

CprE 281: Digital Logic

ENGR 303 Introduction to Logic Design Lecture 10. Dr. Chuck Brown Engineering and Computer Information Science Folsom Lake College

D Latch (Transparent Latch)

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

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.

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

Sequential Logic. References:

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

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

Report on 4-bit Counter design Report- 1, 2. Report on D- Flipflop. Course project for ECE533

Lecture 21: Sequential Circuits. Review: Timing Definitions

Outline. CPE/EE 422/522 Advanced Logic Design L03. Review: Clocked D Flip-Flop with Rising-edge Trigger. Sequential Networks

Project 6: Latches and flip-flops

ELCT201: DIGITAL LOGIC DESIGN

Sequential Design Basics

Chapter 5 Flip-Flops and Related Devices

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

Synchronous Sequential Logic

CprE 281: Digital Logic

Transcription:

Traversing igital esign EEC 5 - Components and esign Techniques for igital ystems EEC5 wks 6-5 Lec 22 equential Logic - Advanced avid Culler Electrical Engineering and Computer ciences University of California, Berkeley http://www.eecs.berkeley.edu/~culler http://inst.eecs.berkeley.edu/~cs5 equential Circuit esign and Timing EEC5 wks -6 EE 4 C6C TL & IA Types of Latches We have focused on -flips latch => FlipFlop => egisters (ld, clr) Most commonly used today (CMO, FPGA) Many other types of latches, JK, T hould be familiar with these too Opportunity to look much more closely at timing behavior Latch vs Flip Flops Timing Methodology

ecall: Forms of equential Logic Asynchronous sequential logic state changes occur whenever state inputs change (elements may be simple wires or delay elements) ynchronous sequential logic state changes occur in lock step across all storage elements (using a periodic waveform - the ) Example ring oscillator A B C E X Period of epeating Waveform ( tp) Gate elay ( td) A (=X) B C E (b) Timing waveform ecall: General Model of ynchronous Circuit Circuits with Feedback input How to control feedback? What stops values from cycling around endlessly input CL reg CL reg output option feedback output Our methodology so far: registers as flipflops with common control ingle-phase, edge triggered design input T su T h X X2 Xn switching network Z Z2 Zn Assumptions underlying the clean abstraction Input to FF valid a setup time before edge Outputs don t change too quickly after edge (hold time)» Clk-to- => hold time

implest Circuits with Feedback Latches Two inverters form a static memory cell Will hold value as long as it has power applied "data" "load" "" "" "remember" "stored value" How to get a new value into the memory cell? electively break feedback path Load new value into cell "stored value" Level-sensitive latch holds value when is low Transparent when is high What does it take to build a consistent timing methodology with only latches? Very hard! All stages transparent at same time. equire that minimum propagation delay is greater than high phase of the (duty period) in a b a b s Two-phase non-overlapping s Used to keep time Wait long enough for inputs (' and ') to settle Then allow to have effect on value stored s are regular periodic signals Period (time between ticks) uty-cycle (time is high between ticks - expressed as % of period) period duty cycle (in this case, 5%) equential elements partition into two classes phase ele ts feed phase phase ele ts feed phase Approximate single phase: each register replaced by a pair of latches on two phases Can push logic across (retiming) Can always slow down the s to meet all timing constraints in a b a b c/l -

Master-lave tructure Latches vs FlipFlips Level sensitive vs edge triggered Very different design methodologies for correct use Both are ed, but latch is asynchronous Output can change while is high setup time to delay Construct flipflop from two latches Clk FF Latch Asynchronous - Latch Cross-coupled NO gates imilar to inverter pair, with capability to force output to (reset=) or (set=) ' ' ' ' Cross-coupled NAN gates imilar to inverter pair, with capability to force output to (reset=) or (set=) ' ' tate Behavior of - latch Transition Table (t) (t) (t) (t+δ) hold reset set X not allowed X equential (output depends on history when inputs =, =) but asynchronous (t) characteristic equation (t+δ) = + (t) X X '

Theoretical - Latch Behavior Timing Behavior ' = = ' = = = = ' = = ' tate iagram tates: possible values Transitions: changes based on inputs possible oscillation between states and = = = = ' ' = = = = \ eset Hold et eset et ace Observed - Latch Behavior - Latch Analysis 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 Break feedback path ' (t) (t+δ) = = = ' = = = = = ' = = ' = = = (t) (t+δ) X X hold reset set not allowed (t) X X characteristic equation (t+δ) = + (t)

Gated - Latch Towards a ynchronous esign Control when and inputs matter Otherwise, the slightest glitch on or while enable is low could cause change in value stored Ensure & stable before utilized (to avoid transient =, =) ' ' enable' ' et ' enable' ' eset ' Controlling an - latch with a Can't let and change while is active (allowing and to pass) Only have half of period for signal changes to propagate ignals must be stable for the other half of period ' ' ' ' and ' ' stable changing stable changing stable Cascading Latches Announcements Connect output of one latch to input of another How to stop changes from racing through chain? Need to control flow of data from one latch to the next Advance from one latch per period Worry about logic between latches (arrows) that is too fast» hortest paths, not critical paths ' ' Guest Lecture, Nov 29, r. obert Iannucci, CTO Nokia arah Lecture on Testing Methodology Thurs. HW out tonight, due before Break Lab lecture covers final point Wireless CP this week Next week TAs will do extended office hours M-W rather than formal lab. Final Check off week 4 No Class ec 6. Final report Friday ec. 7. ign up for min slots 5 min presentation, 5 min &A Arrive 2 mins before scheduled slot to set up

Master-lave tructure Break flow by alternating s (like an air-lock) Use positive to latch inputs into one - latch Use negative 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 but does not affect any cascaded flip-flops master stage P' ' P slave stage ' P P' ' The s Catching Problem In first - stage of master-slave FF -- glitch on or while is high "caught" by master stage Leads to constraints on logic (feeding the latch) to be hazardfree et eset s catch Master Outputs lave Outputs master stage P' ' P slave stage ' Flip-Flop JK Flip Flops Make and complements of each other in Master stage Eliminates s catching problem» Input only needs to settle by edge Can't just hold previous value (must have new value ready every period) Value of just before goes low is what is stored in flipflop Can make - flip-flop by adding logic to make = + ' master stage slave stage J(t) K(t) (t) (t+δ) hold reset set toggle K J - master/slave P' ' ' ' P gates

(neg) Edge-Triggered Flip-Flops Edge-Triggered Flip-Flops (cont d) Clk= More efficient solution: only 6 gates sensitive to inputs only near edge of signal (not while high) holds ' when goes low holds when goes low negative edge-triggered flip-flop (-FF) 4-5 gate delays must respect setup and hold time constraints to successfully capture input characteristic equation (t+) = =, Clk High Clk= Act as inverters Hold state Edge-Triggered Flip-Flops (cont d) -FF Behavior when = =, Clk High Clk= u -> -> u Clk= l u =u =l -> -> Change in propagate through lower and upper latch, but ==, isolating slave

Behavior when -> -FF; behavior when == Clk= -> u u l -> -> u -> =u Clk= ->~ = ==old Lower output Upper latch retains old unchanged =l new new old -> Falling edge allows latched to propagate to output latch when is low data is held Edge-Triggered Flip-Flops (cont d) Timing Methodologies 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 pos pos' neg neg' positive edge-triggered FF negative edge-triggered FF ules for interconnecting components and s Guarantee proper operation of system when strictly followed Approach depends on building blocks used for memory elements Focus on systems with edge-triggered flip-flops» Found in programmable logic devices Many custom integrated circuits focus on level-sensitive latches Basic rules for correct timing: () Correct inputs, with respect to time, are provided to the flip-flops (2) No flip-flop changes state more than once per ing event

Timing Methodologies (cont d) efinition of terms : periodic event, causes state of memory element to change; can be rising or falling edge, or high or low level setup time: minimum time before the ing event by which the input must be stable (Tsu) hold time: minimum time after the ing event until which the input must remain stable (Th) input T su T h there is a timing "window" around the ing event during which the input must remain stable and unchanged in order to be recognized data data stable changing Comparison of Latches and Flip- Flops (cont d) Type When inputs are sampled When output is valid uned always propagation delay from input change latch level-sensitive high propagation delay from input change latch (Tsu/Th around falling or edge (whichever is later) edge of ) master-slave high propagation delay from falling edge flip-flop (Tsu/Th around falling of edge of ) negative hi-to-lo transition propagation delay from falling edge edge-triggered (Tsu/Th around falling of flip-flop edge of ) Typical Timing pecifications Positive edge-triggered flip-flop etup and hold times Minimum width Propagation delays (low to high, high to low, max and typical) Cascading Edge-triggered Flip-Flops 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) Tsu 2ns Th 5ns Tsu 2ns Th 5ns IN OUT Tw 25ns Tplh 25ns 3ns Tphl 4ns 25ns IN all measurements are made from the ing event that is, the rising edge of the

Cascading Edge-triggered Flip-Flops (cont d) Why this works Propagation delays exceed hold times width constraint exceeds setup time This guarantees following stage will latch current value before it changes to new value kew 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 to arrive at flip-flop is comparable to delays through logic Effect of skew on cascaded flip-flops: In T su 4ns T p 3ns T su 4ns T p 3ns timing constraints guarantee proper operation of cascaded components assumes infinitely fast distribution of the In original state: IN =, =, = due to skew, next state becomes: =, =, and not =, = is a delayed version of T h 2ns T h 2ns Need Propagation kew > Hold Time ummary of Latches and Flip-Flops evelopment of -FF Level-sensitive used in custom integrated circuits» can be made with 4 pairs of gates» Usually follows multiphase non-overlapping discipline Edge-triggered used in programmable logic devices Good choice for data storage register Historically J-K FF was popular but now never used imilar to - but with - being used to toggle output (complement state) Good in days of TTL/I (more complex input function: = J' + K' Not a good choice for PALs/PLAs as it requires 2 inputs Can always be implemented using -FF Preset and clear inputs are highly desirable on flip-flops Used at start-up or to reset system to a known state Flip-Flop Features eset (set state to ) ynchronous: new = ' old (when next edge arrives) Asynchronous: doesn't wait for, quick but dangerous Preset or set (set state to ) (or sometimes P) ynchronous: new = old + (when next edge arrives) Asynchronous: doesn't wait for, quick but dangerous Both reset and preset new = ' old + (set-dominant) new = ' old + ' (reset-dominant) elective input capability (input enable/load) L or EN Multiplexer at input: new = L' + L old Load may/may not override reset/set (usually / have priority) Complementary outputs and '

Maintaining the igital Abstraction (in an analog world) Circuit design with very sharp transitions Noise margin for logical values Carefully esign torage Elements (E) Internal feedback tructured ystem esign E + CL, cycles must cross E Timing Methodology All E advance state together All inputs stable across state change V dd V out V in V dd Where does this breakdown? Interfacing to the physical world Can t tell it not to change near the edge igital Abstraction input input CL reg CL reg output option feedback output Example Problems Metastability Async Input ed ynchronous ystem Async Input ynchronizer In worst cast, cannot bound time for FF to decide if inputs can change right on the edge Circuit has a metastable balance point horrible example In? In In is asynchronous and fans out to and one FF catches the signal, one does not inconsistent state may be reached! logic logic

Practical olution Metastability throughout the ages Async Input ynchronizer eries of synchronizers each reduces the chance of getting stuck (exponentially) Make P(metastability) < P(device failure) Oversample and then low pass Buridan, Jean (3-58), French cholastic philosopher, who held a theory of determinism, contending that the will must choose the greater good. Born in Bethune, he was educated at the University of Paris, where he studied with the English cholastic philosopher William of Ocham. After his studies were completed, he was appointed professor of philosophy, and later rector, at the same university. Buridan is traditionally but probably incorrectly associated with a philosophical dilemma of moral choice called "Buridan's ass." In the problem an ass starves to death between two alluring bundles of hay because it does not have the will to decide which one to eat. idn t take EEC 5