XST corrupts my state machine. Only disabling FSM encoding helps

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,

i have a state machine like this

always @( * )
case(state)
IDLE:
  casex(SOME_STATEMENTS)
    :
      next = NEXT_STATE1;
    :
      next = NEXT_STATE3;
    default:
      next = IDLE;
STATE1;
  casex(SOME_STATEMENTS)
    :
      next = STATE2;
    :
      next = STATE4;
    default:
      next = STATE1;
default:
  next = IDLE;

In functional simulation everything is fine. After XST synthesis
magical things happen. THe FSM just doesn't work correctly anymore
logically. Some inputs are misinterpreted causing the FSM to jump into
wrong states. It's ridiculous. The output signals for the specific
states however are correct.

FSM encoding USER did not help however disabling FSM encoding by
setting it to NONE in the XST properties helped. Now the design runs
fine after XST. It is however 3 MHz slower. Worse is that you cannot
trust the XST anymore at all.

Is this a known problem? Maybe its just the coding style which
confuses the XST.


Re: XST corrupts my state machine. Only disabling FSM encoding helps
Quoted text here. Click to load it

[snip]

Quoted text here. Click to load it

[snip]

Quoted text here. Click to load it

How about that old classic: Are your inputs synchronized to the state
machine clock?

---
Joe Samson
Pixel Velocity

Re: XST corrupts my state machine. Only disabling FSM encoding helps

Quoted text here. Click to load it

Hi yes all inputs are synchornized to the FSM clock. I can further add
that I am doing a non timing anotated simulation.


Re: XST corrupts my state machine. Only disabling FSM encoding helps
On Sep 26, 7:39 am, " snipped-for-privacy@googlemail.com"
Quoted text here. Click to load it


You have simplified your example code to the point that you do not
even show the clock.  The sample code describes an asynchronous state
machine, which I doubt is what you want based on other messages.

Instead of:

always @( * )

Do you have:

always @( posedge clk)

If not, that is a problem.  If you do, I would suggest posting a more
complete example.

Regards,

John McCaskill
www.fastertechnology.com


Re: XST corrupts my state machine. Only disabling FSM encoding helps
Don't use casex or casez at all.

When I coded an FSM using casez, XST's optimizer simply removed the entire
FSM
(and any downstream logic driven by the FSM.) In your case, I see you have
nested
case+casex statements, so XST's output was a bit better (but ultimately,
incorrect.)

Anyway, I had this problem in XST (Webpack) 9.1.03 -- I'm guessing it still
hasn't
been fixed as of XST 9.2.03?

Quoted text here. Click to load it
...



Site Timeline