Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- To add a little more information to this, I created a single statemachine with less than 8 states for an EPM7128. While the LE count is 2 higher on the segmented statemachine ( selection mux for output ), it uses 10 fewer registers ( 19-vs-29 ) and 16 fewer p-terms (72-vs-88). Compiling the same code for a Cyclone, you get somewhat similar results with the seperated statemachine taking up more resources ( 37-vs-34 LE's and 32 -vs- 23 registers). --- Quote End --- I have been for years and still asking myself if a design passes timing why should we worry about state machine encoding. state machines is an old and generic methodology of design across various areas of engineering(including mechanical for example) and my understanding is that HDL does not really support it in the true sense. It instead implements the idea in registers to keep track of circuit "memory". Thus a counter can be used equally and if I trust a counter will not go wrong then why should I worry about states extra encoding. Just a thought. Moreover, the number of extra registers may not matter much unless you have lots of state machines.