Answers Database


Foundation State Editor F1.x, XABEL: One-hot state machine is created "Cold"


Record #3151

Product Family: Software

Product Line: Aldec

Product Part: Foundation State Editor

Product Version: 1.5is2

Problem Title:
Foundation State Editor F1.x, XABEL: One-hot state machine is created "Cold"


Problem Description:
Urgency: Standard

General Description:

When creating a one-hot state machine through the Foundation
State Editor with Abel as the synthesis language, the state
machine produced will be "cold", ie, it will never move from
the "000" state.


Solution 1:

The method in resolution 1 provides a workaround to the problem.
However, if any further revisions are made to the state diagram,
the ABEL code is regenerated, and the initial condition is lost.

A way to apply an initial condition which will not be over-written
is the following.  Write the initial condition in the '//diagram
ACTIONS'  box at the top of the state editor. Simply double-click
on the '//diagram ACTIONS' box, and then on the line below it,
write:	<INIT_STATE>.AP=0;



Solution 2:

This problem is caused by the fact that the Abel code is
produced with all state registers initializing to 0. This
means that the state machine powers up to all 0's, and
therefore is not in any state in the one-hot encoded state
machine.

The workaround is to manually edit the ABEL code such that the
code will initialize to the initial-state. To do this, add
the following line to the Equations section of the Abel code:

<INIT_STATE>.AP = 0;

where <INIT_STATE> is the desired initial state.

This will force this particular state register to be a "preset"
register, and therefore power-up to '1', and therefore the
one-hot state machine will be in this state to begin with.




End of Record #3151 - Last Modified: 05/28/99 08:01

For the latest news, design tips, and patch information on the Xilinx design environment, check out the Technical Tips!