Clocked Synchronous State-machine Analysis

Slides:



Advertisements
Similar presentations
COE 202: Digital Logic Design Sequential Circuits Part 2
Advertisements

These slides incorporate figures from Digital Design
Lecture #24 Page 1 EE 367 – Logic Design Lecture #24 Agenda 1.State Machines Review Announcements 1.n/a.
State-machine structure (Mealy)
1. 1. Output depends uniquely on inputs:  Contains only logic gates, AND, OR,...  No feedback interconnects 2. Output depends on inputs and memory:
Types of Logic Circuits
State Machine Design Procedure
CSCE 211: Digital Logic Design. Chapter 6: Analysis of Sequential Systems.
Circuits require memory to store intermediate data
1 EE365 Sequential-circuit analysis. 2 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered.
CS 151 Digital Systems Design Lecture 21 Analyzing Sequential Circuits.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
1 Sequential logic networks I. Motivation & Examples  Output depends on current input and past history of inputs.  “State” embodies all the information.
EECC341 - Shaaban #1 Lec # 13 Winter Sequential Logic Circuits Unlike combinational logic circuits, the output of sequential logic circuits.
EECC341 - Shaaban #1 Lec # 8 Winter Combinational Logic Circuit Transient Vs. Steady-state Output Gate propagation delay: The time between.
EECC341 - Shaaban #1 Lec # 10 Winter Implementing n-variable Functions Using 2 n -to-1 Multiplexers Any n-variable logic function, in canonical.
EECC341 - Shaaban #1 Lec # 14 Winter Clocked Synchronous State-Machines Such machines have the characteristics: –Sequential circuits designed.
Give qualifications of instructors: DAP
EECC341 - Shaaban #1 Lec # 16 Winter State Machine Design Procedure 1. Build state/output table (or state diagram) from word description.
Combinational Comparators
A clocked synchronous state-machine changes state only when a triggering edge or “tick” occurs on the clock signal. ReturnNext  “State-machine”: is a.
Digital Logic Design Lecture 26. Announcements Exams will be returned on Thursday Final small quiz on Monday, 12/8. Final homework will be assigned Thursday,
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
1 EECC341 - Shaaban #1 Lec # 6 Winter Combinational Circuit Analysis Example Given this logic circuit we can : Find corresponding logic.
1 Synchronous Sequential Circuit Analysis. 2 Synchronous Sequential Circuit State Memory – A set of n edge-triggered flip-flops that store the current.
7.4 Clocked Synchronous State-Machine Analysis
Chapter 6 Analysis of Sequential Systems Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR1 Sequential Circuit Design.
Synchronous Circuit Design (Class 10.1 – 10/30/2012) CSE 2441 – Introduction to Digital Logic Fall 2012 Instructor – Bill Carroll, Professor of CSE.
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
Introduction to State Machine
Fall 2004EE 3563 Digital Systems Design EE3563 Chapter 7, 8, 10 Reading Assignments  7.1, 7.2, 7.3  8.1, ,   8.5.1, 8.5.2,
Synchronous Counters Synchronous digital counters have a common clock which results in all the flip-flops being triggered simultaneously. Consequently,
DLD Lecture 26 Finite State Machine Design Procedure.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
Sequential Circuit: Analysis BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
Registers; State Machines Analysis Section 7-1 Section 5-4.
Sahar Mosleh PageCalifornia State University San Marcos 1 More on Flip Flop State Table and State Diagram.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
Introduction to Sequential Logic Design Finite State-Machine Analysis.
Sequential circuit analysis1 Sequential Circuit Analysis Last time we started talking about latches and flip-flops, which are basic one-bit memory units.
Chapter 6 Analysis of Sequential Systems Sequential Memory Feedback.
5 - 1 Chapter 6 Analysis of Sequential Systems Chapter 6 Analysis of Sequential Systems 6.0 Introduction  Clocked System Clock A signal that alternates.
Lecture #17: Clocked Synchronous State-Machine Analysis
Week #7 Sequential Circuits (Part B)
Introduction to Sequential Logic Design
ANALYSIS OF SEQUENTIAL CIRCUITS
Sequential logic design principles
Mealy Machine x X1 X2 S S1 S2 S3 x X1 X2 S S1 Y1 Y2 S2 Y3 S3 outputs
Analysis of Clocked Sequential Circuit
CSCE 211: Digital Logic Design
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
CISE204: Design of Digital Systems Lecture 18 : Sequential Circuits
Asynchronous Inputs of a Flip-Flop
ECE 301 – Digital Electronics
T Flip-Flop A T (toggle) flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when the two inputs are tied together. When T.
Princess Sumaya University
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
MTE 202, Summer 2016 Digital Circuits Dr.-Ing. Saleh Hussin
Instructor: Alexander Stoytchev
SYEN 3330 Digital Systems Chapter 6 – Part 3 SYEN 3330 Digital Systems.
FINITE STATE MACHINES.
ANALYSIS OF SEQUENTIAL CIRCUIT LOGIC DIAGRAM
Lecture 17 Logistics Last lecture Today HW5 due on Wednesday
Presentation transcript:

Clocked Synchronous State-machine Analysis Given the circuit diagram of a state machine: Analyze the combinational logic to determine flip-flop input (excitation) equations: Di = Fi (Q, inputs) The input to each flip-flop is based upon current state and circuit inputs. Substitute excitation equations into flip-flop characteristic equations, giving transition equations: Qi* = Hi( Di ) From the circuit, find output equations: Z = G (Q, inputs) The outputs are based upon the current state and possibly the inputs. 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. Draw the state diagram which is the graphical representation of state table.

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

State Machine Analysis Example From the state equations and output equation, construct the state transition/output table: x Q1 Q0 0 1 0 0 00,0 01,0 0 1 00,1 11,0 1 0 00,1 10,0 1 1 00,1 10,0 Q1* Q0* , y Input State equations: Q0* = Q1’. x Q1* = Q1 . x + Q0 . x Output equation: y = (Q0 + Q1) . x' Current State Output for current state when x =1 Next State when x =0 Next State when x =1 Output for current state when x =0

State Machine Analysis Example Draw the state diagram of the state machine. state transition/output table state diagram 00 01 11 10 1/0 0/1 0/0 x Q1 Q0 0 1 0 0 00,0 01,0 0 1 00,1 11,0 1 0 00,1 10,0 1 1 00,1 10,0 Q1* Q0* , y Arc = input x / output y Node = state

Clocked State-machine Analysis: 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: Q1 Q0 State Name 0 0 A 0 1 B 1 0 C 1 1 D

Clocked State-machine Analysis Example: Transition/Output Table Using State Names For the last example naming The States: Q1 Q0 State Name 0 0 A 0 1 B 1 0 C 1 1 D Transition/output Table: Transition/output Table using state names: x Q1 Q0 0 1 0 0 00,0 01,0 0 1 00,1 11,0 1 0 00,1 10,0 1 1 00,1 10,0 Q1* Q0* , y x S 0 1 A A,0 B,0 B A,1 D,0 C A,1 C,0 D A,1 C,0 S* , y A B C D

Clocked State-machine Analysis Example: State Diagram Using State Naming Q1 Q0 State Name 0 0 A 0 1 B 1 0 C 1 1 D Naming The States: State Diagram without state naming: State Diagram with state naming: 00 01 11 10 1/0 0/1 0/0 0/0 1/0 0/1 A C 1/0 0/1 0/1 1/0 1/0 B D Arc = input x / output y Node = state

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 1 2 3 4 5 6 7 1 Clock Time 1 Input X

State Machine Timing Diagram Example Cycle: 0 1 2 3 4 5 6 7 1 Clock Time 1 Input X 1 Q1 A B D C A A B A 1 Q0 Output Y

State Machine Analysis Example 2 Analyze the state machine: D Q CLK Q X Y Q2’ Q0 Q1 CLK D0 D1 D2 Q2 Z1 Z2 State Memory Input Logic F Output Logic G

State Machine Analysis Example 2 1 Excitation Equations D0 = X . Y’.Q2 D1 = X . Q0 D2 = Y’ + Q1 Characteristic Equations Q0* = D0 Q1* = D1 Q2* = D2 2 State or Transition Equations Q0* = D0 = X . Y’ . Q2’ Q1* = D1 = X . Q0 Q2* = D2 = Y’ + Q1 3 Output Equations Z1 = X . Q0 + Q1’ Z2= (Q1 . Q2)’

State Machine Analysis Example 2 From the state equations and output equation, construct the state transition/output table: state XY name Q2 Q1 Q0 00 01 11 10 A 0 0 0 100, 11 000, 11 000, 11 101, 11 B 0 0 1 100, 11 000, 11 010, 11 111, 11 C 0 1 0 100, 01 100, 01 100, 01 101, 01 D 0 1 1 100, 01 100, 01 110, 11 111, 11 E 1 0 0 100, 11 000, 11 000, 11 100, 11 F 1 0 1 100, 11 000, 11 010, 11 110, 11 G 1 1 0 100, 00 100, 00 100, 00 100, 00 H 1 1 1 100, 00 100, 00 110, 10 110,10 Q2* Q1* Q0*, Z1 Z2 (Next State, Outputs) Transition Equations Q0* = D0 = X . Y’ . Q2’ Q1* = D1 = X . Q0 Q2* = D2 = Y’ + Q1 Output Equations Z1 = X . Q0 + Q1’ Z2= (Q1 . Q2)’

State-machine Analysis Example 2: Transition/Output Table Using State Names XY S 00 01 11 10 A E, 11 A, 11 A, 11 F, 11 B E, 11 A, 11 C, 11 H, 11 C E, 01 E, 01 E, 01 F, 01 D E, 01 E, 01 G, 11 H, 11 E E, 11 A, 11 A, 11 E, 11 F E, 11 A, 11 C, 11 G, 11 G E, 00 E, 00 E, 00 E, 00 H E, 00 E, 00 G, 10 G,10 S*, Z1 Z2

State-machine Analysis Example 2: State Diagram (incomplete) B Y (11) X Y (11) (11) X’ Y A X Y’ (11) X’ Y’ (11) C X’+Y (01) XY’ (11) XY’ (01) X’Y’ (11) H XY’ (11) D XY (11) X’ (01) G E F Arc: input expression (outputs) = expression (Z1 /Z2)

State Machine Analysis Example 3 Analyze the state machine: J K CLK X Y Z Q1 Q2 J1 K1 J2 K2 Q

State Machine Analysis Example 3 Excitation Equations J1 = X K1 = X·Y J2 = X’ K2 = 0 Characteristic Equations Q*= J·Q’ + K’·Q Q1*= J1·Q1’ + K1’·Q1 Q2* = J2·Q2’ + K2’·Q2 1 2 Transition Equations Q1* = X·Q1’ + (X·Y)’ ·Q1 = X·Q1’ + X’·Q1 + Y’·Q1 Q2* = X’·Q2’ + 0’·Q2 = X’·Q2’ + Q2 3 Output Equation Z = X·Q1 + Q2

State Machine Analysis Example 3 From the state equations and output equation, construct the state transition/output table: XY S Q1 Q2 00 01 11 10 A 0 0 01,0 01,0 10,0 10,0 B 0 1 01,1 01,1 11,1 11,1 C 1 0 11,0 11,0 00,1 10,1 D 1 1 11,1 11,1 01,1 11,1 Q1* Q2*, Z Output Equation Z = X·Q1 + Q2 Transition Equations Q1* = X·Q1’ + X’·Q1 + Y’·Q1 Q2* = X’·Q2’ + Q2

State-machine Analysis Example 3: Transition/Output Table Using State Names XY S 00 01 11 10 A B,0 B,0 C,0 C,0 B B,1 B,1 D,1 D,1 C D,0 D,0 A,1 C,1 D D,1 D,1 B,1 D,1 S*, Z

State-machine Analysis Example 3: State Diagram B C D 00,01,10 1 10 00,01 11 10,11 Arc Format: inputs xy output z