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

Foundation 4.2i - If block statement structures use {,}s in ABEL state machine assignments, incorrect equations are produced

Description

Keywords: XABEL, ABEL, .abl, state machine, goto, state equation, incorrect

Urgency: Standard

General Description:
When I use {,}s to enclose a state equation, the assignment is ignored.

For example:

state_diagram Sreg
async_reset InitState : CLR;

state InitState: if !(A # B) then InitState;
else if (A) then {goto State1;}
else {goto State2;}
state State1: goto InitState;
state State2: goto InitState;

The simple state machine coded above will produce the following equations:

" State1.D = (InitState.Q);
" State2.D = (InitState.Q);

instead of these expected equations:

" State1.D = (InitState.Q & A);
" State2.D = (InitState.Q & !A & B);

解决方案

According to ABEL syntax, the compiler is looking for a single state equation such as "State1" or "goto State1". Because the use of {,}s indicates the inclusion of multiple statements, they have no meaning in the ABEL syntax.

When {,}s are not used, the ABEL code will compile the correct equations. When {,}s are included, the condition attached to the statement is ignored.

If the state machine must transition to the next state with certain registers set, a "WITH" statement should be used.

(An enhancement request has been filed for the syntax checker so that an error or warning will be reported when {,}s are used in conjunction with state equations.)
AR# 6286
创建日期 04/26/1999
Last Updated 08/12/2003
状态 Archive
Type 综合文章