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

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

Basis of sequential circuits: the R-S latch

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

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Chapter 5 Sequential Circuits

Problems with D-Latch

Page 1. Some Definitions. Chapter 3: Sequential Logic. Sequential Logic. The Combinational Logic Unit. A NOR Gate with a Lumped Delay

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

ASYNCHRONOUS SEQUENTIAL CIRCUIT CONCEPTS

Software Engineering 2DA4. Slides 9: Asynchronous Sequential Circuits

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

Fundamentals of Computer Systems

Sequential Circuit Design: Part 1

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

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

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

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

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

Supplement 3 Asynchronous Sequential Circuit Concepts

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

Lecture 11: Sequential Circuit Design

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

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

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

Chapter 3 Unit Combinational

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

Sequential Circuit Design: Part 1

Chapter 5 Sequential Circuits

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

Combinational vs Sequential

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

Chapter 5 Sequential Systems. Introduction

Chapter 6 Sequential Circuits

Review of digital electronics. Storage units Sequential circuits Counters Shifters

D Latch (Transparent Latch)

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.

Synchronous Sequential Logic

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.

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

Engr354: Digital Logic Circuits

Lecture 21: Sequential Circuits. Review: Timing Definitions

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

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

CPS311 Lecture: Sequential Circuits

Principles of Computer Architecture. Appendix A: Digital Logic

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

Spring 2017 EE 3613: Computer Organization Chapter 5: The Processor: Datapath & Control - 1

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

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

EITF35: Introduction to Structured VLSI Design

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

1. What does the signal for a static-zero hazard look like?

6. Sequential Logic Flip-Flops

Keeping The Clock Pure. Making The Impurities Digestible

Digital Fundamentals

Chapter 7 Sequential Circuits

2.6 Reset Design Strategy

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

Clock Domain Crossing. Presented by Abramov B. 1

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

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

Unit 11. Latches and Flip-Flops

Sequential Circuits: Latches & Flip-Flops

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

PGT104 Digital Electronics. PGT104 Digital Electronics

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

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

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

DEDICATED TO EMBEDDED SOLUTIONS


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

Computer Architecture and Organization

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

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Synchronous Sequential Logic. Chapter 5

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

CARLETON UNIVERSITY. The Tug-of-War Game. Player 1 RESET

Last time, we saw how latches can be used as memory in a circuit

Combinational / Sequential Logic

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

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

ECE321 Electronics I

11. Sequential Elements

Digital Fundamentals 11/2/2017. Summary. Summary. Floyd. Chapter 7. Latches

ELCT201: DIGITAL LOGIC DESIGN

Synchronous Digital Logic Systems. Review of Digital Logic. Philosophy. Combinational Logic. A Full Adder. Combinational Logic

Lecture 8: Sequential Logic

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

Chapter. Synchronous Sequential Circuits

EE 447/547 VLSI Design. Lecture 9: Sequential Circuits. VLSI Design EE 447/547 Sequential circuits 1

Digital Fundamentals: A Systems Approach

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

Fundamentals of Computer Systems

Lecture 10: Sequential Circuits

Logic Design. Flip Flops, Registers and Counters

CHAPTER 11 LATCHES AND FLIP-FLOPS

Chapter 4. Logic Design

Transcription:

State Machine Signaling Momentary hanges in Outputs Timing ehavior Glitches/hazards and how to avoid them SM Partitioning What to do when the state machine doesn t fit! State Machine Signaling State Machine Retiming Introducing Idle States (synchronous model) our ycle Signaling (asynchronous model) ealing with synchronous Inputs Metastability and synchronization S 5 - Spring 24 Lec #6 Signaling - an be useful pulse shaping circuits an be a problem incorrect circuit operation (glitches/hazards) Example: pulse shaping circuit ' = delays matter in function remains high for three gate delays after changes from low to high S 5 - Spring 24 Lec #6 Signaling - 2 is not always pulse 3 gate-delays wide Oscillatory ehavior Hazards/Glitches nother pulse shaping circuit resistor open switch + Hazards/glitches: unwanted switching at the outputs Occur when different paths through circuit have different propagation delays s in pulse shaping circuits we just analyzed angerous if logic causes an action while output is unstable May need to guarantee absence of glitches close switch initially undefined open switch Usual solutions ) Wait until signals are stable (by using a clock): preferable (easiest to design when there is a clock synchronous design) 2) esign hazard-free circuits: sometimes necessary (clock not used asynchronous design) S 5 - Spring 24 Lec #6 Signaling - 3 S 5 - Spring 24 Lec #6 Signaling - 4 Types of Hazards Static Hazards Static -hazard Input change causes output to go from to to Static -hazard INput change causes output to go from to to ue to a literal and its complement momentarily taking on the same value Thru different paths with different delays and reconverging May cause an output that should have stayed at the same value to momentarily take on the wrong value Example: ynamic hazards Input change causes a double change from to to to OR from to to to S S S' S' static- hazard static- hazard hazard S 5 - Spring 24 Lec #6 Signaling - 5 S 5 - Spring 24 Lec #6 Signaling - 6

ynamic Hazards Eliminating Static Hazards ue to the same versions of a literal taking on opposite values Thru different paths with different delays and reconverging May cause an output that was to change value to change 3 times instead of once Example: 3 2 dynamic hazards 2 S 5 - Spring 24 Lec #6 Signaling - 7 3 hazard ollowing 2-level logic function has a hazard, e.g., when inputs change from = to G G G3 G3 \ \ = = No Glitch in this case This is the fix \ Glitch in this case G G G G3 G3 G3 \ \ = = ( is still ) = ( is ) S 5 - Spring 24 Lec #6 Signaling - 8 Eliminating ynamic Hazards SM Partitioning \ \ G Slow G3 \ G4 V ery slow G5 Very difficult! circuit that is static hazard free can still have dynamic hazards est approach: esign critical circuits to be two level and eliminate all static hazards OR, use good clocked synchronous design style Why Partition? What if programmable logic is limited in number of inputs and outputs that can be used in a particular device? or PLs/PLs, the number of product terms are limited, thus limiting the complexity of the next state and output functions S 5 - Spring 24 Lec #6 Signaling - 9 S 5 - Spring 24 Lec #6 Signaling - Partitioning the State Machine Partitioning the State Machine Suppose that SM is partitioned so that states at the right are in one partition and states at the left are in the other How do you support intersignaling between the state machine partitions? It is usually a good idea to partition the machine so there are as few cross links as possible (min cut set in graph theoretic terms) Solution: introduce idle states S and S Machine at left enters S allowing machine at right to exit S When machine at right returns to S, machine at left exits S S 5 - Spring 24 Lec #6 Signaling - S 5 - Spring 24 Lec #6 Signaling - 2

Rules for Introducing Idle States Example: Partitioning the Up/own ounter S 5 - Spring 24 Lec #6 Signaling - 3 S 5 - Spring 24 Lec #6 Signaling - 4 Example Partitioning: Traffic Light ontroller Partitioned SM lock iagram Main ontroller vs. ounter/timer ST triggers transfer of control TS or TL triggers return of control TS' (TL )' TL / ST HY HG Reset TS / ST Y TS' T T T2 T3 ST T9 T8 T7 T T T2 T9 [TL] T8 T7 T6 reset traffic light controller ST TS TL timer HR HY HG R Y G Interface between the two partitions are the signals ST, TS, TL NOTE: Main ontroller and Timer use the same clock and are operating in a synchronous mode TS / ST TL+' / ST G (TL+')' T4 [TS] T6 T3 T5 (a) Main controller T5 (b) ounter/timer T4 S 5 - Spring 24 Lec #6 Signaling - 5 S 5 - Spring 24 Lec #6 Signaling - 6 State Machine Retiming State Machine Retiming Moore vs. (sync) Mealy Machine Vending Machine Example Retiming the Moore Machine: aster generation of outputs Synchronizing the Mealy Machine: dd a, delaying the output These two implementations have identical timing behavior Open asserted only when in state 5 S 5 - Spring 24 Lec #6 Signaling - 7 Open asserted when last coin inserted leading to state 5 Push the N gate through the State s and synchronize with an output Like computing open in the prior state and delaying it one state time S 5 - Spring 24 Lec #6 Signaling - 8

State Machine Retiming Generalized Inter-SM Signaling Timing behavior is the same, but are the implementations really identical? Interlocked Synchronized Signaling input in retimed Moore implementation Only difference in don t care case of nickel and dime at the same time input in synchronous Mealy implementation S 5 - Spring 24 Lec #6 Signaling - 9 S 5 - Spring 24 Lec #6 Signaling - 2 synchronous Signaling synchronous Signaling lso known as speed-independent signaling uester/client/master vs. Provider/Server/Slave locked Subsystem S requester client master ommunications Signals uest ata low cknowledgement locked Subsystem S 5 - Spring 24 Lec #6 Signaling - 2 S2 provider server slave irst consider the common clock case (synchronous) Master asserts uest Slave recognizes request, processes request, indicates completion by asserting cknowledgement Master accepts results, removes uest ata ck lk Slave see uest removed, removes cknowledge S 5 - Spring 24 Lec #6 Signaling - 22 synchronous Signaling True synchronous Signaling What if Slave can t respond in single cycle? Solution: Wait signaling ata W ait lk Slave inhibits master by asserting wait When slave unasserts wait, master knows request has been processed, and can latch results S 5 - Spring 24 Lec #6 Signaling - 23 Now remove the assumption of a single common clock How do we make sure that receiver has seen the sender s signal? Solution: Interlocked signaling our cycle signaling: assert, process request, assert ack, latch result, remove, remove ck and start again Sometimes called Return to Zero signaling ata ck S 5 - Spring 24 Lec #6 Signaling - 24

True synchronous Signaling True synchronous Timing lternative scheme: Two-ycle Signaling Non-return-to-zero signaling Transaction start by lo-to-hi, finishes ck lo-to-hi Next transaction starts by hi-to-lo, finishes ck hi-to-lo ata uires EXTR state to keep track of the current sense of the transitions faster than 4 cycle case, but usually involves more hardware Self-Timed ircuits Uses /ck signaling as described omponents can be constructed with NO internal clocks etermines on its own when the request has been processed oncept of the delay line simply slows down the pass through of the to the ck usually matched to the worst case delay path ecoming MORE important for large scale VLSI chips were global clock distribution is a challenge Input ombinational logic elay Output ck ck S 5 - Spring 24 Lec #6 Signaling - 25 S 5 - Spring 24 Lec #6 Signaling - 26 Metastability and synchronous inputs Synchronization ailure locked 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 synchronous circuits Inputs, state, and outputs sampled or changed independently of a common reference signal (glitches/hazards a major concern) E.g., R-S latch synchronous inputs to synchronous circuits Inputs can change at any time, will not meet setup/hold times angerous, synchronous inputs are greatly preferred annot be avoided (e.g., reset signal, memory wait, user input) S 5 - Spring 24 Lec #6 Signaling - 27 Occurs when input changes close to clock edge may enter a metastable state neither a logic nor May stay in this state an indefinite amount of time Is not likely in practice but has some probability logic logic logic logic small, but non-zero probability oscilloscope traces demonstrating that the output will get stuck synchronizer failure and eventual in an in-between state decay to steady state S 5 - Spring 24 Lec #6 Signaling - 28 ealing with Synchronization ailure Handling synchronous Inputs Probability of failure can never be reduced to, but it can be reduced () 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) Never allow asynchronous inputs to fan-out to more than one flip-flop Synchronize as soon as possible and then treat as synchronous signal sync Input locked Synchronous System lock sync Input Synchronizer lock asynchronous input synchronized input lock lock lk S 5 - Spring 24 Lec #6 Signaling - 29 synchronous system S 5 - Spring 24 Lec #6 Signaling - 3

Handling synchronous Inputs (cont d) Signaling Summary What can go wrong? In LK Input changes too close to clock edge (violating setup time constraint) S 5 - Spring 24 Lec #6 Signaling - 3 In is asynchronous and fans out to and one catches the signal, one does not inconsistent state may be reached! Glitches/Hazards Introduce redundant logic terms to avoid them OR use synchronous design! SM Partitioning Replacing monolithic State Machine with simpler communicating state machine Technique of introducing idle states State Machine Retiming Rearranging the logic/s in a state machine to speed up its output signaling behavior Machine-to-machine Signaling Synchronous vs. asynchronous our vs. Two ycle Signaling synchronous inputs and their dangers Synchronizer failure: what it is and how to minimize its impact S 5 - Spring 24 Lec #6 Signaling - 32