Clocked Synchronous State-machine Analysis

Similar documents
Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Sequential Synchronous Circuit Analysis

Chapter 15 SEQUENTIAL CIRCUITS ANALYSIS, STATE- MINIMIZATION, ASSIGNMENT AND CIRCUIT IMPLEMENTATION

Lecture 10: Synchronous Sequential Circuits Design

Digital Circuits and Systems

EEE2135 Digital Logic Design

Finite State Machine. By : Ali Mustafa

Synchronous Sequential Circuit Design. Digital Computer Design

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Simplify the following Boolean expressions and minimize the number of literals:

The Design Procedure. Output Equation Determination - Derive output equations from the state table

CPE100: Digital Logic Design I

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Lecture 8: Sequential Networks and Finite State Machines

Finite State Machine (FSM)

Chapter 5 Synchronous Sequential Logic

Analysis and Design of Sequential Circuits: Examples

Chapter 4. Sequential Logic Circuits

Digital Logic Design - Chapter 4

Problem Set 9 Solutions

Synchronous Sequential Logic

Topic 8: Sequential Circuits

Sequential Logic Circuits

Different encodings generate different circuits

Models for representing sequential circuits

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

or 0101 Machine

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

CprE 281: Digital Logic

Digital Design 2010 DE2 1

Sequential Circuit Analysis

Mealy & Moore Machines

Chapter 7 Sequential Logic

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Chapter 4 Part 2 Sequential Circuits

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CE1911 LECTURE FSM DESIGN PRACTICE DAY 1

Lab #10: Design of Finite State Machines

EE 209 Logic Cumulative Exam Name:

EE 209 Spiral 1 Exam Solutions Name:

Topics for Lecture #9. Button input processor

Synchronous Sequential Circuit

CPE100: Digital Logic Design I

6 Synchronous State Machine Design

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Fundamentals of Digital Design

EGR224 F 18 Assignment #4

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Synchronous Sequential Logic Part I

FSM model for sequential circuits

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

Digital Logic Design. Midterm #2

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

Sequential logic and design

Computer Science Final Examination Friday December 14 th 2001

ECE380 Digital Logic. Synchronous sequential circuits

14.1. Unit 14. State Machine Design

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Lecture 17: Designing Sequential Systems Using Flip Flops

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

Lecture 7: Logic design. Combinational logic circuits

P2 (10 points): Given the circuit below, answer the following questions:


14:332:231 DIGITAL LOGIC DESIGN

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

I. Motivation & Examples

Digital Design. Sequential Logic

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

Total time is: 1 setup, 2 AND, 3 XOR, 1 delay = (1*1) + (2*2) + (3*3) + (1*1) = 15ns

Logical design of digital systems

FYSE420 DIGITAL ELECTRONICS

Delhi Noida Bhopal Hyderabad Jaipur Lucknow Indore Pune Bhubaneswar Kolkata Patna Web: Ph:

Sequential vs. Combinational

I. Motivation & Examples

Chapter 7. Synchronous Sequential Networks. Excitation for

Chapter 6. Synchronous Sequential Circuits

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

EECS150 - Digital Design Lecture 23 - FSMs & Counters

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CHW 261: Logic Design

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

ELCT201: DIGITAL LOGIC DESIGN

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Q: Examine the relationship between X and the Next state. How would you describe this circuit? A: An inverter which is synched with a clock signal.

Sequential Circuit Design

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

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

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

EECS150 - Digital Design Lecture 11 - Shifters & Counters. Register Summary

Sequential Circuits Sequential circuits combinational circuits state gate delay

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

For smaller NRE cost For faster time to market For smaller high-volume manufacturing cost For higher performance

Menu. Master-Slave Flip-Flop

Lecture 13: Sequential Circuits, FSM

Digital Electronics Sequential Logic

CSE 140: Components and Design Techniques for Digital Systems. Lecture 9: Sequential Networks: Implementation

Transcription:

Clocked Synchronous State-machine Analysis Given the circuit diagram of a state machine: Analyze the combinational logic to determine flip-flop input (excitation) equations: D i = F i (Q, inputs) The input to each flip-flop is based upon current state and circuit inputs. 2 Substitute excitation equations into flip-flop characteristic equations, giving transition equations: Q i * = H i ( D i ) 3 From the circuit, find output equations: Z = G (Q, inputs) The outputs are based upon the current state and possibly the inputs. 4 Construct a state transition/output table from the transition and output equations: Similar to truth table. Present state on the left side. Outputs and next state for each input value on the right side. Provide meaningful names for the states in state table, if possible. 5 Draw the state diagram which is the graphical representation of state table. # Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example Analyze the state machine: Input (or excitation) equations: D0 = Q. X x D Q Q D = Q. x + Q0. x Q' Q' 2 Characteristic equations: Q0* = D0 Q* = D D Q Q0 Find State equations: CP Q' Q0' Q0* = Q. x Q* = Q. x + Q0. x y 3 Output equation: y = (Q0 + Q). x' This is a Mealy Machine since output = G(current state, input) #2 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 4 From the state equations and output equation, construct the state transition/output table: State equations: Q0* = Q. x Q* = Q. x + Q0. x Output equation: y = (Q0 + Q). x' Current State x Q Q0 0 0 0 00,0 0,0 0 00,,0 0 00, 0,0 00, 0,0 Q* Q0*, y Input Next State when x =0 Output for current state when x =0 Next State when x = Output for current state when x = #3 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 5 Draw the state diagram of the state machine. state transition/output table state diagram x Q Q0 0 0 0 00,0 0,0 0 00,,0 0 00, 0,0 00, 0,0 Q* Q0*, y 0/0 00 /0 0/ 0/ 0/ 0 0 /0 Arc = input x / output y Node = state /0 /0 #4 Lec # 5 Winter 200 2-5-2002

Clocked State-machine Analysis: State Naming State Naming: Optionally name the states and substitute state names S for state-variable combinations in transition/output table and in state diagram. Example: For a circuit with two flip-flops: Q Q0 0 0 A 0 B 0 C D State Name #5 Lec # 5 Winter 200 2-5-2002

Clocked State-machine Analysis Example: Transition/Output Table Using State Names For the last example naming The States: Transition/output Table: Q Q0 State Name 0 0 A 0 B 0 C D Transition/output Table using state names: A B C D x Q Q0 0 0 0 00,0 0,0 0 00,,0 0 00, 0,0 00, 0,0 Q* Q0*, y x S 0 A A,0 B,0 B A, D,0 C A, C,0 D A, C,0 S*, y #6 Lec # 5 Winter 200 2-5-2002

Clocked State-machine Analysis Example: State Diagram Using State Naming Naming The States: State Diagram without state naming: Q Q0 State Name 0 0 A 0 B 0 C D State Diagram with state naming: 0/0 00 0/ 0 /0 0/0 A 0/ C /0 /0 0/ 0/ /0 /0 0/ 0/ /0 0 /0 Arc = input x / output y Node = state B /0 D #7 Lec # 5 Winter 200 2-5-2002

Clocked State-machine Analysis: State Machine Timing Diagram The timing diagram for a state machine graphically shows the state machine response in terms of state variables and output signals vs. time for given time-varying input signals and a given initial state. State machine timing diagrams can be generated using transition/output tables or state diagrams. Timing diagrams can be used to account for both combinational and flip-flop propagation delays. Example: For the state machine in the previous example show the timing diagram for the following input, assuming an initial state A and ignoring propagation delays: Cycle: 0 2 3 4 5 6 7 Clock 0 Time Input X 0 #8 Lec # 5 Winter 200 2-5-2002

State Machine Timing Diagram Example Cycle: 0 2 3 4 5 6 7 Clock 0 Time Input X 0 Q Q0 0 0 A B D C A A B A Output Y #9 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 2 Analyze the state machine: X Y Q2 D0 D Q CLK Q Q0 Z Q0 D D Q CLK Q Q Q D2 D Q CLK Q Q2 Q2 Z2 CLK Input Logic F State Memory Output Logic G #0 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 2 Excitation Equations D0 = X. Y.Q2 D = X. Q0 D2 = Y + Q 2 Characteristic Equations Q0* = D0 Q* = D Q2* = D2 State or Transition Equations Q0* = D0 = X. Y. Q2 Q* = D = X. Q0 Q2* = D2 = Y + Q 3 Output Equations Z = X. Q0 + Q Z2= (Q. Q2) # Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 2 4 From the state equations and output equation, construct the state transition/output table: state XY name Q2 Q Q0 00 0 0 A 0 0 0 00, 000, 000, 0, B 0 0 00, 000, 00,, C 0 0 00, 0 00, 0 00, 0 0, 0 D 0 00, 0 00, 0 0,, E 0 0 00, 000, 000, 00, F 0 00, 000, 00, 0, G 0 00, 00 00, 00 00, 00 00, 00 H 00, 00 00, 00 0, 0 0,0 Transition Equations Q0* = D0 = X. Y. Q2 Q* = D = X. Q0 Q2* = D2 = Y + Q Q2* Q* Q0*, Z Z2 (Next State, Outputs) Output Equations Z = X. Q0 + Q Z2= (Q. Q2) #2 Lec # 5 Winter 200 2-5-2002

State-machine Analysis Example 2: Transition/Output Table Using State Names XY S 00 0 0 A E, A, A, F, B E, A, C, H, C E, 0 E, 0 E, 0 F, 0 D E, 0 E, 0 G, H, E E, A, A, E, F E, A, C, G, G E, 00 E, 00 E, 00 E, 00 H E, 00 E, 00 G, 0 G,0 S*, Z Z2 #3 Lec # 5 Winter 200 2-5-2002

State-machine Analysis Example 2: State Diagram (incomplete) Y () () X Y B X Y () A X Y () X Y () C H XY () XY X +Y X Y (0) (0) () XY () XY () D X (0) G E F Arc: input expression (outputs) = expression (Z /Z2) #4 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 3 Analyze the state machine: X J J Q Q Z Y K K Q J2 J Q Q2 K2 K Q CLK #5 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 3 Excitation Equations J = X K = X Y J2 = X K2 = 0 2 Characteristic Equations Q*= J Q + K Q Q*= J Q + K Q Q2* = J2 Q2 + K2 Q2 Transition Equations Q* = X Q + (X Y) Q = X Q + X Q + Y Q Q2* = X Q2 + 0 Q2 = X Q2 + Q2 3 Output Equation Z = X Q + Q2 #6 Lec # 5 Winter 200 2-5-2002

State Machine Analysis Example 3 4 From the state equations and output equation, construct the state transition/output table: XY S Q Q2 00 0 0 A 0 0 0,0 0,0 0,0 0,0 B 0 0, 0,,, C 0,0,0 00, 0, D,, 0,, Q* Q2*, Z Transition Equations Q* = X Q + X Q + Y Q Q2* = X Q2 + Q2 Output Equation Z = X Q + Q2 #7 Lec # 5 Winter 200 2-5-2002

State-machine Analysis Example 3: Transition/Output Table Using State Names XY S 00 0 0 A B,0 B,0 C,0 C,0 B B, B, D, D, C D,0 D,0 A, C, D D, D, B, D, S*, Z #8 Lec # 5 Winter 200 2-5-2002

State-machine Analysis Example 3: State Diagram Arc Format: inputs xy output z A 00,0 0 B 00,0 00,0,0 D 0, 00,0 0 0, C 0 0 #9 Lec # 5 Winter 200 2-5-2002