R
Rick C
Guest
I was in another discussion on FSM because of a research paper that used the two terms. I've never liked the Mealy machine because the state diagram (a directed graph) doesn't properly describe the asynchronous nature of the outputs. It shows and output changing as part of the state transition, but in reality the output is a combinational circuit of inputs and state which can change without a corresponding change in state.
In the real world nearly all logic is actually sequential. If the inputs to a FSM are async, then the machine can go haywire if the inputs change too close to the clock edge. A race condition in the circuit can cause some state FFs to change and others not resulting in wrong states at best and invalid states at worst. So async inputs are always buffered through FFs to prevent this making then synchronous.
The result is virtually all FSMs are actually Moore or a combination of the two where the outputs are a registered version of what you would get from a Mealy FSM.
When done in software, virtually every design is Moore since there is no opportunity for outputs to change other than when the code is run (equivalent to a clock edge). There is no such thing as a Mealy FSM in software without greatly complicating your code.
Anyone here who even thinks about FSM in terms of Mealy and Moore?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
In the real world nearly all logic is actually sequential. If the inputs to a FSM are async, then the machine can go haywire if the inputs change too close to the clock edge. A race condition in the circuit can cause some state FFs to change and others not resulting in wrong states at best and invalid states at worst. So async inputs are always buffered through FFs to prevent this making then synchronous.
The result is virtually all FSMs are actually Moore or a combination of the two where the outputs are a registered version of what you would get from a Mealy FSM.
When done in software, virtually every design is Moore since there is no opportunity for outputs to change other than when the code is run (equivalent to a clock edge). There is no such thing as a Mealy FSM in software without greatly complicating your code.
Anyone here who even thinks about FSM in terms of Mealy and Moore?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209