Week #6 - Verilog Behavioural Modeling (Part 4) FSM
Week #6 - Verilog Behavioural Modeling (Part 4) FSM
VERILOG BEHAVIOURAL
MODELING
(Part 3)
Mealy Machine
• the outputs depend on both the PRESENT STATE
AND the input variables
FSM: Moore vs Mealy
Moore State Machine
zero 0 input
[0]
1
0
name of state
one1
[0]
0
output
1
two1s 1
[1] A Moore ‘’11’
sequence detector
zero
input
0/0 1/0
output
one1
1/1
A Mealy ’11’
sequence detector
Ease of design
Moore state machine is easier to design
than Mealy. First design the states depending
on the previous state and input. Then design
output only depending on state.
Whereas in Mealy, you have to consider both
state and input while designing the output
Moore vs. Mealy
Number of states
Mealy state machine uses less states than
the Moore. Since inputs influence the output
in the immediate clock, memory needed to
remember the input is less. So, it uses less
flip-flops and hence circuit is simpler
Mealy vs. Moore
Output / Response
In Mealy, output changes immediately when
the input changes. So, Mealy is faster than
Moore.
Mealy gives immediate response to input and
Moore gives response in the next clock
FSM Behavioural Model