Statemachine debugging with Chipscope

Allow me to clarify. I now consider the issues of illegal state
detection and binary conversion as two separate points of discussion.
In the latter, all I'm suggesting now is that here is a means for
translating an fsm into a format better understood through chipscope
and/or status regs, regardless of how that fsm is ultimately coded. I
take the blame for suggesting originally that using the "OTHERS"
clause in this binary conversion takes care of illegal states. I now
agree that this is not the case.

For illegal state detection, it's up to the designer to either use a
synthesis switch so that the tools can add the overhead logic into the
original fsm code--which is completely separate from the binary
conversion part--or build in this detection/recovery manually. I
suggested that doing this within the binary conversion realm could
alleviate performance issues that could occur with safe mode built
within the original fsm.

Sorry for the confusion.
John

KJ wrote:
I fully understand that "when others" does not necessarily generate
recovery logic. Altera (and I suspect other tools) require a specific
synthesis tool setting in order to enable 'safe state machines'. With
Quartus, the setting is called "Safe State Machine" and is defined as
"Tells the compiler to implement state machines that can recover
gracefully from an illegal state."
 
On Nov 12, 10:18 am, Jeff Cunningham <j...@sover.net> wrote:
On 11/12/10 9:28 AM, jc wrote:

But doesn't this only work if the state machine doesn't go to an illegal
state? Otherwise, if it goes 2-hot for example, the binary conversion
can't indicate both states, and will be in effect a priority encoder.
Yes, I agree that this works only for legal state transitions, and
that the binary conversion for illegal states is not well defined
(mainly because it depends on how the synthesis tool implements the
said case statement. It's up to the designer to monitor and flag
illegal states some other way, if necessary.
John
 

Welcome to EDABoard.com

Sponsor

Back
Top