I do not see FSM getting inferred when I synthesize a state machine containing states lesser than 5 using Vivado 2013.2/2013.3.
What is the reason behind this behavior, and how do I infer FSM for state machines containing states lesser than 5?
Starting 2013.2, Vivado Synthesis tool has internally set the limit on minimum number of FSM states extraction to be 5. This is controlled by a parameter minFsmStates (default set to 5). The reason for having a minimum limit is to avoid extraction of very small state machines. There is little to no benefit in terms of QOR (Area/timing) when optimizing smaller state machines. As a result, Vivado synthesis will not infer FSMs by default for state machines containing states lesser than 5.
The minimum number of states necessary for FSM extraction can be modified using the following TCL parameter command:
set_param synth.elaboration.rodinMoreOptions {rt::set_parameter minFsmStates 4}
The above command sets the minimum number of states required to be 4. Executing this command in the Vivado TCL console before running synthesis or adding it as part of the TCL script will modify the minFsmStates parameter to 4 and allows Vivado synthesis to infer FSMs for state machines containing states equal to 4 and above.