FSM Models
Mealy Model Contains three components:
State Memory to store the current state S(t)
State Transition Function to determine the next state
S(t+1) depending upon the current state S(t) and the input X(t)
Output Function which generates the output Y(t) as
function of the current state S(t) and the input X(t)
NDG on FSM
Both Mealy and Moore Models can be mapped into each other
Mealy Machines usually have fewer state variables (memory
elements)- Widely used in Engineering Applications
Moore Machines are simpler to analyze mathematically
NDG on FSM
NDG on FSM
NDG on FSM
Vend
COINS
Input Conditioning
Output
Drivers
FSM
Rs. 2 Coin
Drink / Change
Change
CLOCK
Fig-05: A Vending Machine Model
NDG on FSM
NDG on FSM
S1
S3
S7
S2
S4
S5
S6
S8
NDG on FSM
00/00
Inputs/Outputs=
Rs.2:Rs.1/Vend:Change
Reset
S0
Reset
S0
00/00
00/00
00/00
00/00
01/10
01/00
S2
S2
10/10
10/11
00/00
S1
10/00
01/00
S1
S3
[a]
[b]
Fig-08: State Minimization Step-03 [a] Cyclic State Diagram of VM [b] Reduced FSM for VM
NDG on FSM
10
Inputs/Outputs=
Rs.2:Rs.1/Vend:Change
S0
00/00
S3
xx/00
00/00
01/10
01/00
S2
10/10
S1
10/00
10/11
01/00
NDG on FSM
11
Current State
Inputs = Rs.2:Rs.1
Next State
Outputs= Vend:Change
S0
S0
S0
S1
S1
S1
S2
S2
S2
S3
00
01
10
00
01
10
00
01
10
XX
S0
S1
S2
S1
S2
S0
S2
S0
S0
S0
00
00
00
00
00
10
00
10
11
00
NDG on FSM
S0
S1
S2
S3
00
S0, 00
S1, 00
S2, 00
S0, 00
10
S2, 00
S0, 10
S0, 11
S0, 00
12
S0
S1
S2
S3
00
S0, 00
S1, 00
S2, 00
S0, 00
10
S2, 00
S0, 10
S0, 11
S0, 00
00
01
10
11
00
00, 00
01, 00
10, 00
00, 00
10
10, 00
00, 10
00, 11
00, 00
13
Vend
Combinational Logic
Gates
Change
NDG on FSM
14
NDG on FSM
15
NDG on FSM
16
FSM Optimization
Three Ways to Optimize the HW Complexity of FSM
State Minimization
State Assignment
Logic Equation Minimization
NDG on FSM
17
Fig-12: Bit Sequence Detector [a] State Diagram [b] State Table
18
Fig-13: Minimal State Bit Sequence Detector [a] Stat Table [b] State Diagram
NDG on FSM
19
20
NDG on FSM
22
Next outputs are the same for each state in the same state
partition/group
AND
Next states are the same for each state in the same
set/group
Final Optimized FSM has got only
Five States.!
NDG on FSM
23
NDG on FSM
24
25
NDG on FSM
26
NDG on FSM
27
28
29
Implementation Alternatives
Standard ICs Suitable for Simple Designs
PROM Suitable for many Outputs/States, No Logic Minimization needed,
Exhaustive Implementation for all Possible Input Combinations, Size grows
Exponentially
Fig-17:
Implementation of
FSM with PROM
30
NDG on FSM
31
NDG on FSM
32
[b]
Fig-20: ASM Chart [a] ASM Elements [b]
An ASM Block
33
34
NDG on FSM
35
00/00
S0
00/00
00/00
01/10
01/00
Rs.1
Rs.1
Rs.2
Rs.1
10/00
S2
10/10
S1
Rs.2
Inputs/Outputs=
Rs.2:Rs.1/Vend:Change
S3
xx/00
Rs.2
10/11
01/00
[a]
Rs.1
Rs.2
[b]
Fig-23: Mealy Model of Vending Machine [a] State Diagram [b] ASM Chart
NDG on FSM
36
NDG on FSM
37
38
39
40
NDG on FSM
41
42
43
NDG on FSM
44
NDG on FSM
45