Analysis of Clocked Sequential Circuits

Similar documents
Introduction to Sequential Circuits

Other Flip-Flops. Lecture 27 1

ELCT201: DIGITAL LOGIC DESIGN

Course Administration

Lecture 11: Synchronous Sequential Logic

ELCT201: DIGITAL LOGIC DESIGN

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

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

Synchronous Sequential Logic. Chapter 5

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

Chapter 5 Sequential Circuits

Sequential Logic Circuits

Chapter. Synchronous Sequential Circuits

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

Digital Logic Design I

Part II. Chapter2: Synchronous Sequential Logic

Unit 11. Latches and Flip-Flops

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

ELCT201: DIGITAL LOGIC DESIGN

Chapter 5 Synchronous Sequential Logic

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Logic Design II (17.342) Spring Lecture Outline

MC9211 Computer Organization

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

Chapter 5: Synchronous Sequential Logic

1. Convert the decimal number to binary, octal, and hexadecimal.

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

Combinational vs Sequential

Sequential Circuits: Latches & Flip-Flops

ECE 301 Digital Electronics

Synchronous Sequential Logic

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.

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

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

Chapter 5 Sequential Circuits

Chapter 5 Synchronous Sequential Logic

L5 Sequential Circuit Design

Problems with D-Latch

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

Chapter 8 Sequential Circuits

CHAPTER1: Digital Logic Circuits

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

Synchronous Sequential Logic

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output

CMSC 313 Preview Slides

ECE 331 Digital System Design

ECE 301 Digital Electronics

Synchronous Sequential Logic

CHAPTER 4: Logic Circuits

Universidad Carlos III de Madrid Digital Electronics Exercises

ECE 341. Lecture # 2

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

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

Digital Fundamentals: A Systems Approach

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

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

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

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

Sequential Logic and Clocked Circuits

Chapter 5 Sequential Circuits

Dr.Mohamed Elmahdy Winter 2015 Eng.Yasmin Mohamed. Problem Set 6. Analysis and Design of Clocked Sequential Circuits. Discussion: 7/11/ /11/2015

Chapter 3. Boolean Algebra and Digital Logic

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

CHAPTER 4: Logic Circuits

Engr354: Digital Logic Circuits

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

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

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

Administrative issues. Sequential logic

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

ASYNCHRONOUS COUNTER CIRCUITS

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

Counters

Lecture 8: Sequential Logic

CS T34-DIGITAL SYSTEM DESIGN Y2/S3

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

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

Flip-Flops and Sequential Circuit Design

Logic Design. Flip Flops, Registers and Counters

CPS311 Lecture: Sequential Circuits

FE REVIEW LOGIC. The AND gate. The OR gate A B AB A B A B 0 1 1

Review of digital electronics. Storage units Sequential circuits Counters Shifters

2 Sequential Circuits

D Latch (Transparent Latch)

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

ELE2120 Digital Circuits and Systems. Tutorial Note 7

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

EE292: Fundamentals of ECE

Synchronous sequential circuits

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

Synchronous Sequential Logic

Sequential Logic. Analysis and Synthesis. Joseph Cavahagh Santa Clara University. r & Francis. TaylonSi Francis Group. , Boca.Raton London New York \

UNIT IV. Sequential circuit

COMP2611: Computer Organization. Introduction to Digital Logic

Advanced Digital Logic Design EECS 303

Registers and Counters

DIGITAL SYSTEM DESIGN UNIT I (2 MARKS)

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

Transcription:

Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Presentation Outline Analysis of Clocked Sequential circuits State and Output Equations State Table State Diagram Mealy versus Moore Sequential Circuits State and Timing Diagrams Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 2

Analysis of Clocked Sequential Circuits Analysis is describing what a given circuit will do The output of a clocked sequential circuit is determined by 1. Inputs 2. State of the Flip-Flops Analysis Procedure: 1. Obtain the equations at the inputs of the Flip-Flops 2. Obtain the output equations 3. Fill the state table for all possible input and state values 4. Draw the state diagram Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 3

Analysis Example Is this a clocked sequential circuit? YES! What type of Memory? D Flip-Flops How many state variables? Two state variables: and What are the Inputs? One Input: What are the Outputs? One Output: Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 4

Flip-Flop Input Equations What are the equations on the inputs of the flip-flops? and are the current state, and are the next state, The values of and will be and at the next clock edge Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 5

Next State and Output Equations The next state equations define the next state At the inputs of the Flip-Flops Next state equations? There is only one output What is the output equation? Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 6

State Table State table shows the Next State and Output in a tabular form Next State Equations: and Output Equation: Another form of the state table Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 7

State Diagram State diagram is a graphical representation of a state table The circles are the states Two state variable Four states (ALL values of and ) Arcs are the state transitions Labeled with: Input / Output Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 8

Combinational versus Sequential Analysis Analysis of Combinational Circuits Obtain the Boolean Equations Fill the Truth Table Output is a function of input only Analysis of Sequential Circuits Obtain the Next State Equations Obtain the Output Equations Fill the State Table Draw the State Diagram Next state is a function of input and current state Output is a function of input and current state Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 9

Example with Output = Current State Analyze the sequential circuit shown below Two inputs: and One state variable No separate output Output = current state Obtain the next state equation, state table, and state diagram Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 10

Example with Output = Current State Flip-Flop Input Equation: Next State Equation: 1 Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 11

Sequential Circuit with T Flip-Flops Circuit has two T Flip-Flops One Input One output Two state variables: and Obtain the T-FF input equations Obtain the next state equations Fill the state table Draw the state diagram Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 12

Recall: Flip-Flop Characteristic Equation For D Flip-Flop: 1 = For T Flip-Flop: +1 = () These equations define the Next State For JK Flip-Flop: +1 = + () D Flip-Flop T Flip-Flop JK Flip-Flop D Q(t+1) T Q(t+1) J K Q(t+1) 0 0 Reset 1 1 Set 0 Q(t) No change 1 Q'(t) Complement 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q'(t) Complement Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 13

Sequential Circuit with T Flip-Flops T Flip-Flop Input Equations: = = Next State Equations: (+1 1 Output Equation: Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 14

From Next State Equations to State Table T Flip-Flop Input Equations: = = Next State Equations: +1 1 Output Equation: Notice that the output is a function of the present state only. It does NOT depend on the input Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 15

From State Table to State Diagram Four States: =00, 01, 10, 11 (drawn as circles) Output Equation: (does not depend on input ) Output is shown inside the state circle (/) Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 16

Sequential Circuit with a JK Flip-Flops One Input and two state variables: and (outputs of Flip-Flops) No separate output Output = Current state Obtain the JK input equations Obtain the next state equations Fill the state table Draw the state diagram Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 17

JK Input and Next State Equations JK Flip-Flop Input Equations: = and = = and = Next State Equations: +1 1 Substituting: 1 1 Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 18

From JK Input Equations to State Table JK Input Equations: =, =, = and = Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 19

From State Table to State Diagram Four states: =00,01,10,!" 11 (drawn as circles) Arcs show the input value on the state transition Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 20

Mealy versus Moore Sequential Circuits There are two ways to design a clocked sequential circuit: 1. Mealy Machine: Outputs depend on present state and inputs 2. Moore Machine: Outputs depend on present state only Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 21

Mealy Machine The outputs are a function of the present state and Inputs The outputs are NOT synchronized with the clock The outputs may change if inputs change during the clock cycle The outputs may have momentary false values (called glitches) The correct outputs are present just before the edge of the clock Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 22

Mealy State Diagram An example of a Mealy state diagram is shown on the right Each arc is labeled with: Input / Output The output is shown on the arcs of the state diagram The output depends on the current state and input Notice that State 11 cannot be reached from the other states Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 23

Tracing a Mealy State Diagram Cycle 0 1 2 3 4 5 6 7 8 Inputx 0 1 1 0 1 1 1 1 0 Present StateAB? 0 0 1 0 0 1 1 1? 0 1 0 0 1 0 0 0 Output z 0 0 0 0 0 0 1 1 0 When the circuit is powered, the initial state (AB) is unknown Even though the initial state is unknown, the input x = 0 forces a transition to state AB = 00, regardless of the present state Sometimes, a reset input is used to initialize the state to 00 Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 24

False Output in the Timing Diagram Cycle 0 1 2 3 4 5 6 7 8 Inputx 0 1 1 0 1 1 1 1 0 Present StateA B? 0 0 1 0 0 1 1 1? 0 1 0 0 1 0 0 0 Output z 0 0 0 0 0 0 1 1 0 A Negative edge-triggered B Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 25

Moore Machine The outputs are a function of the Flip-Flop outputs only The outputs depend on the current state only The outputs are synchronized with the clock Glitches cannot appear in the outputs (even if inputs change) A given design might mix between Mealy and Moore Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 26

Moore State Diagram An example of a Moore state diagram is shown on the right Arcs are labeled with input only 0 00 0 0 1 01 0 The output is shown inside the state: (State / Output) The output depends on the current state only 0 0 11 1 1 1 10 0 1 Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 27

Tracing a Moore State Diagram When the circuit is powered, the initial state (AB) and output are unknown 0 0 Input x = 0 resets the state AB to 00. Can also be done with a reset signal. 00 0 1 01 0 Cycle 0 1 2 3 4 5 6 7 8 0 0 1 Inputx 0 1 1 0 1 1 1 1 0 Present StateA B? 0 0 1 0 0 1 1 1? 0 1 0 0 1 0 1 1 11 1 1 10 0 Output z? 0 0 0 0 0 0 1 1 1 Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 28

Timing Diagram of a Moore Machine Cycle 0 1 2 3 4 5 6 7 8 Inputx 0 1 1 0 1 1 1 1 0 Present StateA B? 0 0 1 0 0 1 1 1? 0 1 0 0 1 0 1 1 Output z? 0 0 0 0 0 0 1 1 The output is synchronized with the clock. No false output (or glitch) can appear. Negative edge-triggered A B Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 29

Summary To analyze a clocked sequential circuit: 1. Obtain the equations at the Inputs of the flip-flops 2. Obtain the Next State equations For a D Flip-Flop, the Next State = D input equation For T and JK, use the characteristic equation of the Flip-Flop 3. Obtain the Output equations 4. Fill the State Table Put all the combinations of current state and input Fill the next state and output columns 5. Draw the State Diagram Two types of clocked sequential circuits: Mealy versus Moore Analysis of Clocked Sequential Circuits COE 202 Digital Logic Design Muhamed Mudawar slide 30