Hi, I have read that using a single always block(synchronous) for implementing a state machine is not a good practice. Can somebody tell me how does the synthesis tool handle this??
Thanks in advance! Sandhya
Hi, I have read that using a single always block(synchronous) for implementing a state machine is not a good practice. Can somebody tell me how does the synthesis tool handle this??
Thanks in advance! Sandhya
Did anyone tell you *why* a "single always block" is a bad thing for FSMs? Most of the time when someone makes a general rule like this, there is a reason for it that only applies under certain conditions. If you don't know the conditions, you might as well not use the rule.
I expect you were told this because it is easier to control and optimize a FSM if the signal on the input to the FFs is a separate entity to which you can apply attributes. I have done FSMs both ways and it mainly depends on how complex your FSM is and how fast you need it to run. If you have a simple machine or it is not pressed for speed, a single always block is an ok way to code it and is simpler to write and read.
-- Rick "rickman" Collins rick.collins@XYarius.com
ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.