Altera_Forum
Honored Contributor
13 years agoGood technique for designing FSM
Hello guys,
Suppose I have the following behaviour of a circuit and I wanna design a FSM to control it: https://www.alteraforum.com/forum/attachment.php?attachmentid=6674 in each clock cycle, red block means say...multiplication, blue block means addition and green block means certain output after comparison. I can generally think of two ways to construct the FSM: 1) I have two states so as to toggle between red and blue blocks, in addition a counter is set up, after four clock cycles the state that triggers blue blocks will also trigger green block, a third state is used after eight cycles and output green blocks only. 2) I use 4 states, triggering blue only; red only; blue&green; green only. One counter is needed to determine which state to go next. I'm not sure after compilation which FSM will produce more efficient circuit, or maybe they are the same thing? Is there any typical technique used to construct FSM that control the behaviour similar to the above example? Thanks!