Forum Discussion
Altera_Forum
Honored Contributor
12 years ago --- Quote Start --- I just posted a similar question about this earlier on. The thing with one-hot state machines is that you'll need a register for each state. So if you have large state-machines (say, 32 states) that would, as a binary state, only require 5 bits. Yet if it's encoded as one-hot, it will require a bit for each state, effectively turning it into 32 registers. So if you can achieve the same result with multiple, smaller state-machines that utilize the LUT's better, you could potentially save logic. The more inputs your states require, the bigger your register usage gets as well. Last but not least, it's a lot easier to maintain a (few) smaller state-machines than one gigantic monster. -Mux --- Quote End --- 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).