Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Mealy vs Moore Design

Status
Not open for further replies.

tronix

Advanced Member level 4
Full Member level 1
Joined
Jul 6, 2006
Messages
116
Helped
8
Reputation
16
Reaction score
1
Trophy points
1,298
Activity points
1,967
mealy vs moore

Hi all
Let's discuss advantages/Disadvantages of Mealy vs Moore Design
 

mealy vs moore machine

The advantage of the Moore model is a simplification of the behaviour. The use of a Mealy FSM leads often to a reduction of the number of states.

Moore model is very easy to code. The program of Mealy is complex.
 
difference between mealy and moore

So if I can make state table of Both Designs mealy would always be my first choice. right?
 

difference between mealy and moore machine

See Mealy is faster than moore. Mealy Next state output is the function of state and input but the Moore next state is a function of previous state only

vipul
 

mealy sequence detector

vipulsinha said:
See Mealy is faster than moore. Mealy Next state output is the function of state and input but the Moore next state is a function of previous state only

vipul

But why should it make mealy faster?
Also I think moore has an advantage that it will not give false output in between clocks due to transition in inputs
 

difference between moore and mealy

Hi guys!
Please go through any text book covering both machines.
thing is....
Whether it is mealy or moore,next state depends on both input a well as present state.
only the difference is Output where u will take. ...in mealy,output depends on present input as well as state.
but,in moore output is function of state only.Got it...?
so what are the advantages and disadvantages...?
mealy will be faster.In the sense that,output will change as soon as the input transition accoding to the logic.
In moore,it has to wait for one clock cycle since it changes with the state.
Better...u try out one example like sequence detector with both kinds of machines.
Mealy is fast but it is asynchronous...right...?since the output changes as soon as the inputs change according to the logic.
so what is the problem...?
problem is glitches....for any asynchronously behaving circuit will have glitches.
And the most important disadvantage of Mealy is that It may lead to Metastability.
Ok Guys!
one more thing....people will prefer moore as it is synchronous.
one more thing is that...u can convert mealy machine into moore by just taking the registered output....right...?
generally,Moore will hae more no of states compared to mealy.
u will come to know by solving a simple problem right from drwaing state machine to state diagrams to hard ware implementation to wveforms.okkkk....
bye...
 
moore vs mealy

Balu everything u said makes sense to me except

balu304 said:
mealy will be faster.In the sense that,output will change as soon as the input transition accoding to the logic.
In moore,it has to wait for one clock cycle since it changes with the state.

b/c output depends on states as well not only the inputs so I don't think that mealy will be faster
 

difference between mealy moore machine

this is very good explanation given by balu 304 ...i think it is enough
 

convert mealy machine to moore machine

This following explanation is for tronix...
As I previously said,u should have tried on ur own by solving a simple sequence detector.it's ok...
now we take a sequence detector which whas to detect bit sequence of 101... ok...
Let me say.....
already it has reached a state which recognised bit stream of 10 and output is low(logic zero).now we will see for both machines what is going to happen.ok..
now, In mealy machine,as soon as the input bit is one..the output will become logic high.It need not go into another state.
Now let us see for Moore machine...
It is in the state which recognised the bit equence of 10 and state output is low.
now,If the incoming input bit is one it will go to another state upon the clock tick where we will take output which depends on the present state.
so we say that the new state is the one which detected the sequence of 101 and it's output is logic high.
so mealy is asynchronous where as moore is synchronous.
It is very difficult to tell like this.
I am not good at giving explainations through writing.
it is better..pls try out a simple circuit.
ok...bye...

Added after 11 minutes:

in the above said example,mealy will take one state lesser than moore. In general, atleast one state is lesser in mealy compared to moore. state is nothing but the flipflops condition(state of logic loww or high).And state transition i.e. one state to another state happens with the clock edge.so mealy is faster as it contains less no of states.....right....?
 
conversion of moore machine to mealy machine

Balu
Got d point. Absolutely correct , Mealy will be faster than Moore at least by setup time of f/fs. Right?
 

mealy vs. moore

any good book for learning state machines and vhdl code for state machines
 

converting mealy machine to moore machine

There is no point making such a fuss about the meally/moore distinction. You can view a mealy machine as moore + some logic, you can view moore machine as mealy + flops. This is an academic distinction and in general something you will pretty much never pay any attention to during logic design. As for speed, again, it is impossible to tell which one is 'faster' just by that distinction (mealy vs. moore). The remark about glitches is also not true, if the FSM is a part of a larger synchronous design there is no danger from glitches. In case the FSM outputs are going to another clock domain, glitches are still a very real problem even if you use a moore machine (still you have >1 flip flop driving a logic cone and thus glitches). Bottom line: you pick what is right for the design (and mostly never even think about mealy vs. moore distinction). All of the above generalized statements about one vs. other are false, with the exception of mealy usually leading to smaller number of states.
 
moore sequence detector

While designing, what i keep in mind is final waveforms...not bothering whether i'll use mealy or moore...

in my design im using both mealy n moore, state machine is combination of both..
 

mealy to moore conversion

just two cents, mealy is more power-efficient than moore because of fewer flops. In power-critical designs, try to reduce the number of flops is a good idea.
 

moore output

balu304 said:
Hi guys!
Please go through any text book covering both machines.
thing is....
Whether it is mealy or moore,next state depends on both input a well as present state.
only the difference is Output where u will take. ...in mealy,output depends on present input as well as state.
but,in moore output is function of state only.Got it...?
so what are the advantages and disadvantages...?
mealy will be faster.In the sense that,output will change as soon as the input transition accoding to the logic.
In moore,it has to wait for one clock cycle since it changes with the state.
Better...u try out one example like sequence detector with both kinds of machines.
Mealy is fast but it is asynchronous...right...?since the output changes as soon as the inputs change according to the logic.
so what is the problem...?
problem is glitches....for any asynchronously behaving circuit will have glitches.
And the most important disadvantage of Mealy is that It may lead to Metastability.
Ok Guys!
one more thing....people will prefer moore as it is synchronous.
one more thing is that...u can convert mealy machine into moore by just taking the registered output....right...?
generally,Moore will hae more no of states compared to mealy.
u will come to know by solving a simple problem right from drwaing state machine to state diagrams to hard ware implementation to wveforms.okkkk....
bye...



Please can u suggest some good books with solved examples, also if possible the link to download if they exist in the download section.

thanks
 

how to convert mealy machine to moore machine

One is without cycle delay and makes timing path longer. Another is with a cycle delay and makes timing better.
 

Hi,

One last thing...from an STA perspective:

Moore machines register the inputs and drive the outputs (possibly through some combinatorial logic).

Mealy machines allow inputs to propagate combinatorially from inputs to the outputs. These particular paths could become critical paths because of their non-local creation or logic depth.

Moore machines can therefore give you a bit more control over your critical paths.
 
both are useful depending on what kind of problems you are solving. Mealy happens to depend on current state and input while moore only depends on state.
 

I would like to contradict balu here. Please refer the attached document for details. It states Moore (and not Mealy) suffers from glitches because of Clock to Q and combinational logic delays. Mealy, as expected, suffers from metastability.

HTH.
 

Attachments

  • smv.pdf
    17.8 KB · Views: 220

Hi
@socware - the 'Digital Principles and Design ' by Donald d. Givone is very good for a detailed explanation of Moore and Mealy .It also has an worked example with serial adder.
other than that Digital logic by Tocci is also good

---------- Post added at 04:31 ---------- Previous post was at 04:28 ----------

@ soc
Hi the book principles of modern digital design by Parag.k.lala is good for learning VHDL as well as digital logic
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top