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

4.2i Foundation State Editor, XABEL - The one-hot state machine I create is "cold" (It will not move from the "000" state)

Description

Keywords: ABEL, one-hot, one hot, FSM, initialize

Urgency: Standard

General Description:
When I create a one-hot state machine through Foundation State Editor using ABEL as the synthesis language, the state machine produced is "cold" (i.e., it never moves from the "000" state).

Solution

1

This problem occurs because the ABEL code is produced with all state registers initializing to "0". This means that the state machine powers up to all "0"s; therefore, it is not in any state in the one-hot encoded state machine.

To work around this problem, manually edit the ABEL code so that the code initializes to the initial-state. Do this by adding the following line to the "Equations" section of the ABEL code:

<INIT_STATE>.AP = 0;

where <INIT_STATE> is the desired initial state.

This forces this particular state register to be a "preset" register, which will power-up to "1"; therefore, the one-hot state machine will be in this state at the start.

2

If you use the previous method to work around the problem, but then make further revisions to the state diagram, the ABEL code is regenerated and the initial condition is lost.

You may apply an initial condition that will not be overwritten by writing the initial condition in the "//diagram ACTIONS" box at the top of the State Editor. Do this by double-clicking on the "//diagram ACTIONS" box, then writing on the line below it:

<INIT_STATE>.AP=0;
AR# 3151
Date Created 12/03/1997
Last Updated 08/12/2003
Status Archive
Type General Article