AR# 40093: Design Assistant for XST - Help with Finite State Machines.
Design Assistant for XST - Help with Finite State Machines.
Please refer to this answer record for help with Finite State Machines.
Note: This Answer Record is a part of the Xilinx Solution Center for XST (Xilinx Answer 38927). The Xilinx Solution Center for XSTs is available to address all questions related to XST. Whether you are starting a new design or troubleshooting a problem, use the Solution Center for XST to guide you to the right information.
XST can extract Finite State Machines (FSM) from the RTL code and optimizes the FSM by re-encoding based on the number of states and inputs.
If an FSM is extracted, you'll see messages similar to following in the "HDL Synthesis" stage.
And you'll see messages similar to following stating which encoding algorithm is used in the "Low Level Synthesis" stage.
There are some XST options which are usedto controlFSM optimization.
Whether or not to extract FSM from the RTL code.
Specify which FSM encoding algorithm to be used. The default value is auto, which meansXST automatically finds the best encoding style for each single FSM.
Specify which type of resource to be used to implement the FSM, LUT or BRAM. The default value is LUT.By setting it to BRAM,large FSMs can be made faster and more compact by implementing them in Block RAM.
Whether or not to implement FSM in safe mode.XST can add logic to your FSM implementation that will let your state machine recover from an invalid state.By default, XST will use the reset state as the recovery state.However, any state can be used as a recovery state, and this can be defined via theSafe_recovery_state constraint.
Definea recovery state for use when anFSM is implemented in Safe Implementation mode. IfSafe_recovery_state is not specified, the reset state is used as the recovery state.