Digital Circuit And Logic Design I. Lecture 8

Similar documents
Digital Circuit And Logic Design I

Other Flip-Flops. Lecture 27 1

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Unit 11. Latches and Flip-Flops

Sequential Logic Circuits

D Latch (Transparent Latch)

EE292: Fundamentals of ECE

ECE 341. Lecture # 2

ELCT201: DIGITAL LOGIC DESIGN

Digital Circuits ECS 371

Synchronous Sequential Logic

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

LATCHES & FLIP-FLOP. Chapter 7

6. Sequential Logic Flip-Flops

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

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic Design I

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

Administrative issues. Sequential logic

Chapter. Synchronous Sequential Circuits

Chapter 5 Synchronous Sequential Logic

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

Introduction to Sequential Circuits

Lecture 8: Sequential Logic

Engr354: Digital Logic Circuits

Logic Design. Flip Flops, Registers and Counters

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

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

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

Experiment 8 Introduction to Latches and Flip-Flops and registers

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

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

CHAPTER 4: Logic Circuits

Synchronous Sequential Logic

Asynchronous (Ripple) Counters

CHAPTER 4: Logic Circuits

EKT 121/4 ELEKTRONIK DIGIT 1

INTRODUCTION TO SEQUENTIAL CIRCUITS

Exercise 2: D-Type Flip-Flop

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

Chapter 8 Sequential Circuits

Chapter 5: Synchronous Sequential Logic

Digital Fundamentals. Lab 5 Latches & Flip-Flops CETT Name: Date:

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

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

Flip-Flops and Sequential Circuit Design

CHAPTER 6 COUNTERS & REGISTERS

MC9211 Computer Organization

Combinational vs Sequential

RS flip-flop using NOR gate

10.1 Sequential logic circuits are a type of logic circuit where the output of the circuit depends not only on

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

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

RS flip-flop using NOR gate

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

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

Sri Vidya College of Engineering And Technology. Virudhunagar Department of Electrical and Electronics Engineering

CPS311 Lecture: Sequential Circuits

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

Synchronous Sequential Logic

Slide 1. Flip-Flops. Cross-NOR SR flip-flop S R Q Q. hold reset set not used. Cross-NAND SR flip-flop S R Q Q. not used reset set hold 1 Q.

Digital Fundamentals: A Systems Approach

CHAPTER1: Digital Logic Circuits

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

Problems with D-Latch

Experiment # 9. Clock generator circuits & Counters. Digital Design LAB

Chapter 5 Sequential Circuits

Synchronous Sequential Logic

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

EET2411 DIGITAL ELECTRONICS

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

Synchronous Sequential Logic

Counter dan Register

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 4. Logic Design

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

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

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

Part II. Chapter2: Synchronous Sequential Logic

Synchronous Sequential Logic. Chapter 5

Sequential Circuits: Latches & Flip-Flops

Combinational / Sequential Logic

Sequential Design Basics

ASYNCHRONOUS COUNTER CIRCUITS

Chapter 5 Sequential Circuits

ELE2120 Digital Circuits and Systems. Tutorial Note 7

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

Sequential Logic and Clocked Circuits

UNIT IV. Sequential circuit

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

CS8803: Advanced Digital Design for Embedded Hardware

Chapter 11 Latches and Flip-Flops

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

2. Counter Stages or Bits output bits least significant bit (LSB) most significant bit (MSB) 3. Frequency Division 4. Asynchronous Counters

Digital Systems Laboratory 3 Counters & Registers Time 4 hours

Sequential Digital Design. Laboratory Manual. Experiment #7. Counters

Lecture 11: Synchronous Sequential Logic

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

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

UNIT-3: SEQUENTIAL LOGIC CIRCUITS

Transcription:

Digital Circuit And Logic Design I Lecture 8

Outline Sequential Logic Design Principles (1) 1. Introduction 2. Latch and Flip-flops 3. Clocked Synchronous State-Machine Analysis Panupong Sornkhom, 2005/2 2

Sequential Logic Design Principles (1)

1. Introduction Logic circuits are classified into two types Combinational logic circuit Outputs depend only on its current inputs Sequential logic circuit Outputs depend not only on its current inputs, but also on the past sequence of inputs, possibly arbitrarily far back in time. So it is inconvenient to describe the behavior of a sequential circuit by means of a table that lists outputs as a function of input sequence that has been received up until the current time. To know where you are going next, you need to know where you are now. More information, the current state is needed. Panupong Sornkhom, 2005/2 4

1. Introduction (cont.) The state of a sequential circuit is a collection of state variables whose values at any one time contain all the information about the past necessary to account for the circuit s future behavior. In TV channel-selector, the current channel number is the current state. Inside the TV, this state might be stored as seven binary state variables representing a decimal number between 0 and 127. Given the current state (channel number), we can always predict the next state as a function of the inputs In a digital logic circuit, state variables are binary values, corresponding to certain logic signals in the circuit. A circuit with n binary state variables has 2 n possible states. Sequential circuits are sometimes called finite-state machines. Panupong Sornkhom, 2005/2 5

1. Introduction (cont.) The state changes of most sequential circuits occur at times specified by a free-running clock signal. By convention, a clock signal is active high if state changes occur at the clock s rising edge or when the clock is HIGH, and active low in the complementary case. The clock period is the time between successive transitions in the same direction, and the clock frequency is the reciprocal of the period. The first edge or pulse in a clock period or some times the period itself is called a clock tick. The duty cycle is the percentage of time that the clock signal at its asserted level. Panupong Sornkhom, 2005/2 6

1. Introduction (cont.) Clock signal: (a) active high; (b) active low Panupong Sornkhom, 2005/2 7

2. Latches and Flip-Flops Flip-flop is a sequential device that normally samples its inputs and changes its outputs only at times determined by a clocking signal. On the other hand, latch is a sequential device that watches all of its inputs continuously and changes its outputs at any time, independent of a clocking signal. Panupong Sornkhom, 2005/2 8

2. Latches and Flip-Flops (cont.) S-R Latch An S-R (set-reset) latch based on NOR gates. The circuit has two inputs, S and R, and two outputs, labeled Q and QN, where QN is normally the complement of Q. S-R latch: (a) Circuit design using NOR gates; (b) function table Panupong Sornkhom, 2005/2 9

2. Latches and Flip-Flops (cont.) Typical operation of an S-R latch: (a) normal inputs; (b) S and R asserted simultaneously Logic symbol for an S-R latch: (a) without bubble; (b) preferred for bubble-to bubble logic design; (c) incorrect because of double negation Panupong Sornkhom, 2005/2 10

2. Latches and Flip-Flops (cont.) An S R latch with active-low set and reset inputs may be built from NAND gates S-bar-R-bar latch: (a) circuit design using NAND gates; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 11

2. Latches and Flip-Flops (cont.) S-R Latch with Enable An S-R or S R latch is sensitive to its S and R inputs at all times. However, it may easily be modified to create a device that is sensitive to these inputs only when an enabling input C is asserted. S-R latch with enable: (a) circuit design using NAND gates; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 12

2. Latches and Flip-Flops (cont.) D Latch S-R latches are useful in control applications, where we often think in terms of setting a flag in response to some condition and resetting it when conditions change. However, we often need latches simply to store bits of information. A D latch may be used in such an application. D latch: (a) circuit design using NAND gates; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 13

2. Latches and Flip-Flops (cont.) Functional behavior of a D latch for various inputs Panupong Sornkhom, 2005/2 14

2. Latches and Flip-Flops (cont.) Edge-Triggered D Flip-Flop A positive-edge-triggered D flip-flop combines a pair of D latches to create a circuit that samples its D input and changes its outputs only at the rising edge of a controlling CLK signal. The triangle on the D flip-flop s CLK input indicates edge-triggered behavior and is called a dynamic-input indicator. Positive-edge-triggered D flip-flop: (a) circuit design using D latch; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 15

2. Latches and Flip-Flops (cont.) Functional behavior of a positive-edge-triggered D flip-flop Panupong Sornkhom, 2005/2 16

2. Latches and Flip-Flops (cont.) Edge-Triggered D Flip-Flop (cont.) A negative-edge-triggered D flip-flop simply inverts the clock input, so that all the action take place on the falling edge of CLK_L; by convention, a falling-edge trigger is considered to be active low. Negative-edge-triggered D flip-flop: (a) circuit design using D latch; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 17

2. Latches and Flip-Flops (cont.) Edge-Triggered D Flip-Flop (cont.) Some D flip-flops have asynchronous inputs that may be used to force the flip-flop to a particular state independent of the CLK and D inputs. These inputs, typically labeled PR (present) and CLR (clear), behave like the set and reset inputs on an SR latch. Positive-edgetriggered D flipflop with preset and clear: (a) logic symbol; (b) circuit design using NAND gates Panupong Sornkhom, 2005/2 18

2. Latches and Flip-Flops (cont.) Commercial circuit for a positive-edgetriggered D flipflop such as 74LS74 Panupong Sornkhom, 2005/2 19

2. Latches and Flip-Flops (cont.) Edge-Triggered D Flip-Flop with Enable A commonly desired function in D flip-flops is the ability to hold the last value stored, rather tan load a new value, at the clock edge. This is accomplished by adding an enable input, called EN or CE (clock enable). Positive-edge-triggered D flip-flop with enable: (a) circuit design; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 20

2. Latches and Flip-Flops (cont.) Edge-Triggered J-K Flip-Flop. Edge-triggered J-K flip-flop: (a) equivalent function using edge-triggered D flip-flop; (b) function table; (c) logic symbol Panupong Sornkhom, 2005/2 21

2. Latches and Flip-Flops (cont.) Functional behavior of a positive-edge-triggered J-K flip-flop Panupong Sornkhom, 2005/2 22

2. Latches and Flip-Flops (cont.) Edge-Triggered T Flip-Flop. A T (toggle) changes state on every tick of the clock Positive-edge-triggered T flip-flop: (a) logic symbol; (b) function behavior Possible circuit designs for a T flip-flop: (a) using D flip-flop; (b) using J-K flip-flop Panupong Sornkhom, 2005/2 23

3. Clock Synchronous State-Machine Analysis State-Machine Structure Next state = F(current state,input) Output = G(current state,input) Clock synchronous state-machine structure (Mealy machine) Panupong Sornkhom, 2005/2 24

3. Clock Synchronous State-Machine Analysis State-Machine Structure A sequential circuit whose outputs depend on both state and input is called a Mearly machine In some sequential circuit, the outputs depend on the current state alone Output = G(current state) Such a circuit is called Moore machine Clock synchronous state-machine structure (Moore machine) Panupong Sornkhom, 2005/2 25

3. Clock Synchronous State-Machine Analysis Characteristic Equations The functional behavior of a latch of flip-flop can be described formally by a characteristic equation that specifies the flip-flop s next state as a function of its current state and inputs. By convention, the * suffix in Q* means the next value of Q. Notice that the characteristic equation does not describe detailed timing behavior of the device (latching vs. edge-triggered, etc.) Panupong Sornkhom, 2005/2 26

3. Clock Synchronous State-Machine Analysis Analysis of State Machines with D Flip-Flops The analysis of a clocked synchronous state machine has three basic steps: Determine the next-state and output functions F and G. Use F and G to construct a state/output table that completely specifies the next state and output of the circuit for every possible combination of current state and input (Optional) Draw a state diagram that presents the information from the previous step in graphical form. Panupong Sornkhom, 2005/2 27

3. Clock Synchronous State-Machine Analysis Panupong Sornkhom, 2005/2 28

3. Clock Synchronous State-Machine Analysis Logic equations that express the excitation signals as functions of the current state and input are called excitation equations and can be derived from the circuit diagram: Using the characteristic equation of D flip-flops, Q* = D, we can describe the next-state function of the example machine with equations for the next value of a state variables: These equtions, which express the next value of the state variables as a function of current state and input, are called transition equations Panupong Sornkhom, 2005/2 29

3. Clock Synchronous State-Machine Analysis Transition, state, and state/output tables for the state machine in preceding figure Panupong Sornkhom, 2005/2 30

3. Clock Synchronous State-Machine Analysis Once a state table is produced, we have only the output logic of the machine left to analyze. In the example machine, there is only a single output signal and it is a function of both current state and input (this is a mealy machine). So we can write a single output equation: Panupong Sornkhom, 2005/2 31

3. Clock Synchronous State-Machine Analysis State/output tables for Moore machines are slightly simpler. Suppose we removed the EN signal from the AND gate that produces the MAX output, producing a Moore-type output MAXS. Panupong Sornkhom, 2005/2 32

3. Clock Synchronous State-Machine Analysis (cont.) Analysis of State Machines with J-K Flip-Flops Clocked synchronous state machines built from J-K flip-flops can also be analyzed by the basic procedure in the preceding subsection. The only difference is that there are two excitation equations for each flip-flop one for J and the other for K. To obtain the transition equations, both of these but be substituted into the J-K s characteristic equation, Panupong Sornkhom, 2005/2 33

3. Clock Synchronous State-Machine Analysis (cont.) From the logic diagram, we can derive the following excitation equations: Panupong Sornkhom, 2005/2 34

3. Clock Synchronous State-Machine Analysis (cont.) Substituting into the characteristic equation for the J-K flip-flops, we obtain the transition equations: Reading the logic diagram, we can write the output equation Transition/output and state/output table Panupong Sornkhom, 2005/2 35

3. Clock Synchronous State-Machine Analysis (cont.) From the table, we can draw a state diagram: Panupong Sornkhom, 2005/2 36