ミーリー・マシンとムーア・マシン
#verilog #fpga #fsm
Mealyマシン(ミーリー・マシン)
現在のステートと入力(input)で出力(output)が確定する
(クロックに非同期で出力が変化する)
Mooreマシン(ムーア・マシン)
現在のステートからのみ出力(output)が確定する
(クロックの同期でしか出力が変化しない)
The basic block diagram of an FSM is the same as that of a regular sequential circuit and is repeated in Figure 5.1. It consists of a state register, next-state logic, and output logic. An FSM is known as a Moore machine if the output is only a function of state, and is known as a Mealy machine if the output is a function of state and external input. Both types of output may exist in a complex FSM, and we simply refer to it as containing a Moore output and a Mealy output. The Moore and Mealy outputs are similar but not identical. Understanding their subtle differences is the key for controller design. The example in Section 5.3.1 illustrates the behaviors and constructions of the two types of outputs.(Chu, Pong P.. FPGA Prototyping by SystemVerilog Examples (p.112). Wiley. Kindle 版.)
https://gyazo.com/b62e093c36dc80ddf062cfc2066edd5b
ミーリとムーア、どっちがいいの?
ムーアは同期回路、ミーリは非同期回路
ミーリは入力に応じてすぐに出力を変えることが可能
ムーアは1クロック後にしか変えれない
ムーアマシンの方が作りが単純で覚えることが少なそう
ただ、ムーアはステートが増えやすいらしい
ひとまずはムーア・マシンだけ覚えておけば良いかな?
メモ
HDLによるFPGA設計 / ムーアマシンのRTL記述
http://zakii.la.coocan.jp/hdl/15_moore_layout.htm
HDLによるFPGA設計 / デジタル回路の基本形
http://zakii.la.coocan.jp/hdl/11_moore.htm
ムーアマシンに、入力から出力までFFを経由しないパスを追加したものをミーリーマシンというが、これはブロック間の遅延管理がわかりにくくなるとか、入力のハザードが出力へ直接伝わるといった不都合があるので使わない方がよい
http://zakii.la.coocan.jp/hdl/11_moore.htm
同期設計されたデジタル回路はすべてムーアマシンに帰着する
有限状態遷移機械(FSM)設計
あとで読む
状態遷移図からVerilogへの落とし込み方が良さそう
ASM図の説明も載ってる
https://www.slideshare.net/kaizenjapan/fsm2013ppt