synchronous FSM

Aug 09, 2004 1 Replies

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 Ignore the reply address. To email me use the above address with the XY removed. Arius - A Signal Processing Solutions Company Specializing in DSP and FPGA design URL http://www.arius.com 4 King Ave 301-682-7772 Voice Frederick, MD 21701-3110 301-682-7666 FAX

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required