Analysis of state machines
-
Upload
abhilash-nair -
Category
Education
-
view
313 -
download
2
description
Transcript of Analysis of state machines
![Page 1: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/1.jpg)
Detailed steps in the Analysis Process1. Determine the excitation equations for the flip flop inputs
2. Substitute the excitation equations into the flip flop characteristic equations to obtain transition equations.
3. Use transition equations to construct transition table.
4. Determine the output equations.
5. Add output values to the transition table for each state (Moore) or state /input combination (Mealy) to create a transition/output table.
6. Name the states and substitute state names for state – variable combinations in the transition/output table to obtain the state/output table.
7. Draw a state diagram corresponding to the state/output table.
![Page 2: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/2.jpg)
Analysis: Example 1 - State MachineAnalyze the synchronous state machines shown below. Determine the excitation equations, transition equations and output equations. Construct the transition output table and state output table. Draw the state diagram.
DQ
Q
XZ
Clk
![Page 3: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/3.jpg)
DQ
Q
XZ
Clk
InputOutput
Next StatePresent State
CombinationalLogic
MemoryClock
Excitation
1. Determine the excitation equations for the flip flop inputs
QXD
![Page 4: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/4.jpg)
2. Substitute the excitation equations into the flip flop characteristic equations to obtain transition equations.
DQ *
QXQ *
characteristic equation
transition equation
3. Use transition equations to construct transition table.
State Input X
Q 0 1
0 0 1
1 1 0
Next State Q*
Transition table
![Page 5: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/5.jpg)
4. Determine the output equations.
QXZ output equation
5. Add output values to the transition table for each state (Moore) or state /input combination (Mealy) to create a transition/output table.
State Input X
Q 0 1
0 0,0 1,1
1 1,1 0,0
Next State Q*, Z
Transition/output table
![Page 6: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/6.jpg)
6. Name the states and substitute state names for state – variable combinations in the transition/output table to obtain the state/output table.
Substituting state names ‘A’ for state Q = 0 & ‘B’ for state Q = 1S is current state & S* is next state.
State Input X
S 0 1
A A,0 B,1
B B,1 A,0
Next State S*, Z
State/output table
![Page 7: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/7.jpg)
7. Draw a state diagram corresponding to the state/output table.
State Input X
S 0 1
A A,0 B,1
B B,1 A,0
Next State S*, Z
State/output table
State diagram
A B0/0 0/1
1/1
1/0
![Page 8: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/8.jpg)
8
Analysis: Example 2 - State Machine
![Page 9: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/9.jpg)
9
Analysis: Example 2 - Excitation Equations
![Page 10: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/10.jpg)
10
Analysis: Example 2 - Transition Equations
• Excitation equations
• Characteristic equations
• Substitute excitation equations into characteristic equations
![Page 11: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/11.jpg)
11
Analysis: Ex 2 - Transition/State Tables
transitiontable
state table state/outputtable
transition equations
output equation
![Page 12: Analysis of state machines](https://reader036.fdocuments.net/reader036/viewer/2022082921/555ecfadd8b42af67f8b5716/html5/thumbnails/12.jpg)
Analysis: Example 2 - State Diagram
• Mealy machine state diagram– Circles for states– Arrows for transitions (note output info)
12