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# 22654

8.1i XST - XST is not inferring the correct reset logic for next_state when it is reset in a two process FSM

Description

Keywords: XST, Netlist, Simulation, Reset.

When resetting the next_state signal in a two-process FSM encoding, I discover that it creates an incorrect netlist.

The example below does not synthesize correctly in XST:

======================================================
statemachine_current : process(current_state, mreset)
begin
if ( mreset = '0') then
next_state <= state_0 ;
else
case (current_state) is
when state_0
next_state <= state_1
-----
end case ;
end if;
end process statemachine_current ;

statemachine_next: process (clkm, reset)
begin
if (reset = '1') then
current_state <= state_0;
elsif (clkm'event and clkm = '1') then
current_state <= next_state;
end if;
end process statemachine_next;
=========================================================

Solution

To work around this issue, reset only the current state to the initial state as shown below:

====================================================
all_reset = reset or mreset ;
statemachine_current (current_state)
begin
case (current_state) is
when state_0
next_state <= state_1
-----
end case ;
end
statemachine_next: process (clkm, all_reset)
begin
if (all_reset = '0') then
current_state <= state_0;
elsif (clkm'event and clkm = '1') then
current_state <= next_state;
end if;
end process;
=====================================================

While this will work around the problem, this issue will be fixed in ISE 9.1i.
AR# 22654
Date Created 01/09/2006
Last Updated 01/08/2009
Status Archive
Type General Article