Problems with D-Latch

Similar documents
Chapter 5 Sequential Circuits

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

Chapter 5 Sequential Circuits

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

Chapter 3 Unit Combinational

Overview of Chapter 4

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Chapter 6 Sequential Circuits

Sequential Logic Circuits

Part II. Chapter2: Synchronous Sequential Logic

Chapter 5: Synchronous Sequential Logic

Digital Logic Design I

Synchronous Sequential Logic. Chapter 5

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

2 Sequential Circuits

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

ECE 3401 Lecture 12. Sequential Circuits (II)

6. Sequential Logic Flip-Flops

Chapter. Synchronous Sequential Circuits

Synchronous Sequential Logic

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Engr354: Digital Logic Circuits

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

Chapter 8 Sequential Circuits

D Latch (Transparent Latch)

Chapter 5 Sequential Systems. Introduction

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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.

Chapter 5 Synchronous Sequential Logic

Combinational / Sequential Logic

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Synchronous Sequential Logic

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

Unit 11. Latches and Flip-Flops

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

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

B.Tech CSE Sem. 3 15CS202 DIGITAL SYSTEM DESIGN (Regulations 2015) UNIT -IV

Chapter 5 Synchronous Sequential Logic

Synchronous Sequential Logic

Chapter 5 Sequential Circuits

CS8803: Advanced Digital Design for Embedded Hardware

Sequential Circuit Design: Part 1

Combinational vs Sequential

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

Analysis of Clocked Sequential Circuits

Synchronous Sequential Logic

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits

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

Lecture 11: Synchronous Sequential Logic

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

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

CS8803: Advanced Digital Design for Embedded Hardware

Review of digital electronics. Storage units Sequential circuits Counters Shifters

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

ELCT201: DIGITAL LOGIC DESIGN

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Sequential Circuits: Latches & Flip-Flops

Synchronous Sequential Logic

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

ECE 341. Lecture # 2

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

Introduction to Sequential Circuits

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

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

Digital Circuits ECS 371

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

CprE 281: Digital Logic

MC9211 Computer Organization

Universidad Carlos III de Madrid Digital Electronics Exercises

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

CprE 281: Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

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

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

Registers & Counters. BME208 Logic Circuits Yalçın İŞLER

Principles of Computer Architecture. Appendix A: Digital Logic

CHAPTER 11 LATCHES AND FLIP-FLOPS

Administrative issues. Sequential logic

ECE 3401 Lecture 11. Sequential Circuits

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

Logic Design. Flip Flops, Registers and Counters

UNIT IV. Sequential circuit

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

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

Sequential Circuit Design: Part 1

INTRODUCTION TO SEQUENTIAL CIRCUITS

Chapter 3. Boolean Algebra and Digital Logic

LATCHES & FLIP-FLOP. Chapter 7


Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

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

Outputs Combinational circuit. Next state. Fig. 4-1 Block Diagram of a Sequential Circuit

Review of Flip-Flop. Divya Aggarwal. Student, Department of Physics and Astro-Physics, University of Delhi, New Delhi. their state.

CHAPTER1: Digital Logic Circuits

Chapter 11 Latches and Flip-Flops

CPS311 Lecture: Sequential Circuits

L5 Sequential Circuit Design

Transcription:

Problems with -Latch If changes while is true, the new value of will appear at the output. The latch is transparent. If the stored value can change state more than once during a single clock pulse, the result is a hazard that might introduce a glitch later in the circuit. We must design the circuit so that the state can change only once per clock cycle. hapter 5 - Part 1 1

How to remove the transparency? This can be accomplished by connecting two latches together. The left half of the circuit is the clocked -latch from the previous section. The right half of the circuit is a clocked S-R latch. hapter 5 - Part 1 2

S-R Master-Slave Flip-Flop onsists of two clocked S S-R latches in series S S with the clock on the R R R second latch inverted The input is observed by the first latch with = 1 The output is changed by the second latch with = 0 The path from input to output is broken by the difference in clocking values ( = 1 and = 0). hapter 5 - Part 1 3

Flip-Flop Problem The change in the flip-flop output is delayed by the pulse width which makes the circuit slower or S and/or R are permitted to change while = 1 Suppose = 0 and S goes to 1 and then back to 0 with R remaining at 0 The master latch sets to 1 A 1 is transferred to the slave Suppose = 0 and S goes to 1 and back to 0 and R goes to 1 and back to 0 The master latch sets and then resets A 0 is transferred to the slave This behavior is called 1s or 0s catching hapter 5 - Part 1 4

Flip-Flop Solution Use edge-triggering instead of master-slave An edge-triggered flip-flop ignores the pulse while it is at a constant level and triggers only during a transition of the clock signal Edge-triggered flip-flops can be built directly at the electronic circuit level, or A master-slave flip-flop which also exhibits edge-triggered behavior can be used. hapter 5 - Part 1 5

Edge-Triggered Flip-Flop The edge-triggered flip-flop is the same as the masterslave flip-flop S R It can be formed by: Replacing the first clocked S-R latch with a clocked latch or Adding a input and inverter to a master-slave S-R flip-flop The delay of the S-R master-slave flip-flop can be avoided since the 1s-catching behavior is not present with replacing S and R inputs The change of the flip-flop output is associated with the negative edge at the end of the pulse It is called a negative-edge triggered flip-flop hapter 5 - Part 1 6

Negative Edge-Triggered Flip-Flops hapter 5 - Part 1 7

Positive-Edge Triggered Flip-Flop Formed by adding inverter to clock input S R changes to the value on applied at the positive clock edge within timing constraints to be specified Our choice as the standard flip-flop for most sequential circuits hapter 5 - Part 1 8

ifference between a LATH and a FLIP- FLOP? Latch is a level sensitive device while flipflop is an edge sensitive device. Latch is sensitive to glitches on enable pin, whereas flip-flop is immune to glitches. Latches take less gates (also less power) to implement than flip-flops. Latches are faster than flip-flops. hapter 5 - Part 1 9

Standard Symbols for Storage Elements S S R R Master-Slave: Postponed output indicators S SR S SR with 1 ontrol (a) Latches with 0 ontrol R R Edge-Triggered: ynamic indicator Triggered SR Triggered SR Triggered (b) Master-Slave Flip-Flops Triggered Triggered Triggered (c) Edge-Triggered Flip-Flops hapter 5 - Part 1 10

irect Inputs At power up or at reset, all or part of a sequential circuit usually is initialized to a known state before it begins operation This initialization is often done outside of the clocked behavior of the circuit, i.e., asynchronously. R irect R and/or S inputs that control the state of the latches within the flip-flops are used for this initialization. For the example flip-flop shown 0 applied to R resets the flip-flop to the 0 state 0 applied to S sets the flip-flop to the 1 state S hapter 5 - Part 1 11

Sequential ircuit Analysis General Model urrent State at time (t) is stored in an array of flip-flops. Storage Elements Inputs Next State at time (t+1) is a Boolean function of State and Inputs. State LK ombinational Logic Next State Outputs Outputs at time (t) are a Boolean function of State (t) and (sometimes) Inputs (t). hapter 5 - Part 1 12

Example 1 (from Fig. 5-15) Input: Output: State: x(t) y(t) (A(t), B(t)) x A A What is the Output Function? B P What is the Next State Function? y hapter 5 - Part 1 13

Example 1 (from Fig. 5-15) (continued) Boolean equations for the functions: A(t+1) = A(t)x(t) + B(t)x(t) x Next State A A B(t+1) = A(t)x(t) y(t) = x(t)(b(t) + A(t)) B P ' y Output hapter 5 - Part 1 14

Example 1(from Fig. 5-15) (continued) Where in time are inputs, outputs and states defined? 1 0 1 0 0 0 0 1 hapter 5 - Part 1 15

State Table haracteristics State table a multiple variable table with the following four sections: Present State the values of the state variables for each allowed state. Input the input combinations allowed. Next-state the value of the state at time (t+1) based on the present state and the input. Output the value of the output as a function of the present state and (sometimes) the input. From the viewpoint of a truth table: the inputs are Input, Present State and the outputs are Output, Next State hapter 5 - Part 1 16

Example 1: State Table (from Fig. 5-15) The state table can be filled in using the next state and output equations: A(t+1) = A(t)x(t) + B(t)x(t) B(t+1) = A (t)x(t) y(t) = x (t)(b(t) + A(t)) Present State Input Next State Output A(t) B(t) x(t) A(t+1) B(t+1) y(t) 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 hapter 5 - Part 1 17

Example 1: Alternate State Table 2-dimensional table that matches well to a K-map. A(t+1) = A(t)x(t) + B(t)x(t) B(t+1) = A (t)x(t) y(t) = x (t)(b(t) + A(t)) Present Next State Output State x(t)=0 x(t)=1 x(t)=0 x(t)=1 A(t) B(t) A(t+1)B(t+1) A(t+1)B(t+1) y(t) y(t) 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 hapter 5 - Part 1 18

State iagrams The sequential circuit function can be represented in graphical form as a state diagram with the following components: A circle with the state name in it for each state A directed arc from the Present State to the Next State for each state transition A label on each directed arc with the Input values which causes the state transition, and A label: On each circle with the output value produced, or On each directed arc with the output value produced. hapter 5 - Part 1 19

State iagrams Label form: On circle with output included: state/output Moore type output depends only on state On directed arc with the output included: input/output Mealy type output depends on state and input hapter 5 - Part 1 20

Example 1: State iagram x=0/y=0 Which type? iagram gets confusing for large circuits For small circuits, usually easier to understand than the state table x=1/y=0 A B 0 0 x=0/y=1 x=0/y=1 x=0/y=1 1 0 0 1 1 1 x=1/y=0 x=1/y=0 x=1/y=0 hapter 5 - Part 1 21

Moore and Mealy Models Sequential ircuits or Sequential Machines are also called Finite State Machines (FSMs). Two formal models exist: Moore Model Named after E.F. Moore. Outputs are a function ONLY of states Usually specified on the states. Mealy Model Named after G. Mealy Outputs are a function of inputs AN states Usually specified on the state transition arcs. In contemporary design, models are sometimes mixed Moore and Mealy hapter 5 - Part 1 22

Moore and Mealy Example iagrams Mealy Model State iagram maps inputs and state to outputs x=0/y=0 x=1/y=0 0 1 Moore Model State iagram maps states to outputs x=0 x=0/y=0 x=1/y=1 0/0 x=0 x=1 x=0 x=1 1/0 2/1 x=1 hapter 5 - Part 1 23

Moore and Mealy Example Tables Mealy Model state table maps inputs and state to outputs Present State Next State x=0 x=1 Output x=0 x=1 0 0 1 0 0 1 0 1 0 1 Moore Model state table maps state to outputs Present Next State State Output x=0 x=1 0 0 1 0 1 0 2 0 2 0 2 1 hapter 5 - Part 1 24

Example 2: Sequential ircuit Analysis Logic iagram: A Z R B R lock Reset R hapter 5 - Part 1 25

Example 2: Flip-Flop Input Equations Variables Inputs: None Outputs: Z State Variables: A, B, Initialization: Reset to (0,0,0) Equations A(t+1) = Z = B(t+1) = (t+1) = hapter 5 - Part 1 26

Example 2: State Table X = X(t+1) A B A B Z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 hapter 5 - Part 1 27

Example 2: State iagram Reset AB 000 111 100 001 011 010 101 Which states are used? What is the function of the circuit? 110 hapter 5 - Part 1 28

Weekly Exercise 4-3 4-7 4-11 4-13 hapter 5 - Part 1 29

Terms of Use 2004 by Pearson Education,Inc. All rights reserved. The following terms of use apply in addition to the standard Pearson Education Legal Notice. Permission is given to incorporate these materials into classroom presentations and handouts only to instructors adopting Logic and omputer esign Fundamentals as the course text. Permission is granted to the instructors adopting the book to post these materials on a protected website or protected ftp site in original or modified form. All other website or ftp postings, including those offering the materials for a fee, are prohibited. You may not remove or in any way alter this Terms of Use notice or any trademark, copyright, or other proprietary notice, including the copyright watermark on each slide. Return to Title Page hapter 5 - Part 1 30