moore和mealy
Finite automata may also have outputs corresponding to each input symbol. Such finite automata are known as finite automata with the output.
有限自動機還可以具有與每個輸入符號相對應的輸出。 這種有限自動機稱為輸出的有限自動機。
There are two finite state machines with outputs namely Mealy machine and Moore machine.
有兩個輸出的有限狀態機,即Mealy機和Moore機 。
1)機器 (1) Mealy machine )
A finite state machine whose output generated depends on both the present state and the present input is called a mealy machine.
其生成的輸出既取決于當前狀態又取決于當前輸入的有限狀態機稱為粉狀機。
It is represented by 6 tuples (Q, ∑, O, δ, X, q0):
它由6個元組(Q,∑,O,δ,X,q0)表示 :
Q is a set of states. It is finite in number.
Q是一組狀態。 它的數量是有限的。
>∑ is a set of symbols called the input alphabets. They are also finite.
> ∑是一組稱為輸入字母的符號。 它們也是有限的。
O is a set of symbols called the output alphabets. They cannot be infinite in number.
O是一組稱為輸出字母的符號。 它們的數量不能無限。
δ is the input transition function which maps Q × ∑ into Q.
δ是將Q×∑映射到Q中的輸入轉換函數。
X is the output transition function which maps Q × ∑ into O.
X是將Q×∑映射到O的輸出轉換函數。
q0 is the initial start state from where any input starts getting processed (q0 ∈ Q).
q0是初始開始狀態,從該狀態開始處理任何輸入(q0∈Q) 。
2)摩爾機 (2) Moore machine)
Finite state machine whose output depends only on the present state.
有限狀態機,其輸出僅取決于當前狀態。
It is represented by 6 tuples (Q, ∑, O, δ, X, q0):
它由6個元組(Q,∑,O,δ,X,q0)表示 :
Q is a set of states. It is finite in number.
Q是一組狀態。 它的數量是有限的。
∑ is a set of symbols called the input alphabets. They are also finite.
∑是一組稱為輸入字母的符號。 它們也是有限的。
O is a set of symbols called the output alphabets. They cannot be infinite in number.
O是一組稱為輸出字母的符號。 它們的數量不能無限。
δ is the input transition function where δ maps Q × ∑ into Q.
δ是輸入轉換函數,其中δ將Q×∑映射到Q中 。
X is the output transition function where X Maps Q into O.
X是輸出轉換函數,其中X將 Q映射為O。
q0 is the initial start state from where any input starts getting processed (q0 ∈ Q).
q0是初始開始狀態,從該狀態開始處理任何輸入(q0∈Q) 。
Mealy機器和Moore機器之間的比較/差異 (Comparison/Differences between Mealy machine and Moore machine )
Mealy Machine | Moore machine |
---|---|
Output depends on both upon present state and present input. | Output depends only upon present state. |
it has less states than Moore machine. | it has more states than mealy machine. |
It reacts faster to inputs. | It reacts slower to inputs because more logic is required. |
In same clock cycle. | There are more circuit delays. |
The output is placed on transitions. | Output is placed on the states. |
Less hardware is need to design. | More hardware is required. |
If there is a change in input then output also changes. | There is no change in output if input changes. |
It is very difficult to design. | It is easy to design. |
![]() |
機器 | 摩爾機 |
---|---|
輸出取決于當前狀態和當前輸入。 | 輸出僅取決于當前狀態。 |
它的狀態少于摩爾機。 | 它的狀態比粉塵機還多。 |
它對輸入的React更快。 | 它對輸入的React較慢,因為需要更多的邏輯。 |
在相同的時鐘周期內。 | 有更多的電路延遲。 |
輸出放置在過渡上。 | 輸出放置在狀態上。 |
設計所需的硬件更少。 | 需要更多硬件。 |
如果輸入發生變化,則輸出也會發生變化。 | 如果輸入發生變化,則輸出不會發生變化。 |
設計非常困難。 | 這很容易設計。 |
![]() |
翻譯自: https://www.includehelp.com/toc/comparative-study-of-mealy-machine-and-moore-machine.aspx
moore和mealy