UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

AR# 21243

7.1i XST - Wrong/unreached states reported in XST log file for finite state machine (FSM)

Description

Keywords: FSM, unreachable, incorrect

XST 7.1 has a new capability of reporting the state encoding values, as well as unreachable states. It has been observed that with certain FSMs, XST erroneously reports unreachable states.

This issue happens when creating FSMs in VHDL with enumerated types in which some of the states are not used:

:
type State_type is ( IDLE,START,STATE1,STATE2,STATE3,STATE4,STATE5,STATE6);
signal current_state : State_type;
signal next_state : State_type;
:
:
case current_state is

when IDLE =>
if in1 = '1' then
out1 <= '1';
next_state <= START;
end if;

when START =>
if in2 = '1' then
out2 <= '1';
next_state <= STATE3;
end if;

when STATE3 =>
if in3 = '1' then
out3 <= '1';
next_state <= STATE5;
end if;

when STATE5 =>
if in4 = '1' then
out4 <= '1';
next_state <= START;
end if;

when others => next_state <= IDLE;
end case;
:
:

Solution

To work around this issue, use the signal_encoding constraint either through a command line switch or through HDL:

Command line switch:
1. With Project Navigator already open, right-click on the "Synthesize - XST" process and select "Properties..."
2. Select the "Synthesis Options" tab.
3. In the "Other XST Command Line Options" field, insert -signal_encoding user.
4. Click the OK button.

To insert the constraint in the HDL:

:
type State_type is ( IDLE,START,STATE1,STATE2,STATE3,STATE4,STATE5,STATE6);
signal current_state : State_type;
signal next_state : State_type;

attribute signal_encoding : string;
attribute signal_encoding of current_state : signal is "user";
attribute signal_encoding of next_state : signal is "user";
:
:


NOTE: There are some complex FSMs on the signal_encoding constraint that do not work on the signal, in which case, place the signal_encoding constraint on the VHDL entity:

entity top is
port (
:
:
);

attribute signal_encoding : string;
attribute signal_encoding of top : entity is "user";

end entity;

This issue is fixed in ISE 8.1i
AR# 21243
Date Created 09/04/2007
Last Updated 01/07/2009
Status Archive
Type General Article