D
Doug Miller
Guest
If you are using ISE 6.1, also check the "Clock Information:" section of
your SYR (Synthesis) file. In some cases, it (erroneously) generates
additional clocks from combinatorial logic. From some of my own experience,
I've noticed this sometimes this can be cured by making sure that all
possible states are defined in your combinatorial logic.
Example - Extra clocks will be generated if the two commented lines below
are left commented, but will not be generated if they are uncommented.
if (currentState = IDLE) then
if (someTrigger = '1') then
nextState <= SOME_OTHER_STATE;
-- else
-- nextState <= IDLE;
end if;
end if;
"Jerker Hammarberg (DST)" <jerkerNO@SPAMdst.se> wrote in message
news:40ec3825_4@read01.nntp.se.dataphone.net...
your SYR (Synthesis) file. In some cases, it (erroneously) generates
additional clocks from combinatorial logic. From some of my own experience,
I've noticed this sometimes this can be cured by making sure that all
possible states are defined in your combinatorial logic.
Example - Extra clocks will be generated if the two commented lines below
are left commented, but will not be generated if they are uncommented.
if (currentState = IDLE) then
if (someTrigger = '1') then
nextState <= SOME_OTHER_STATE;
-- else
-- nextState <= IDLE;
end if;
end if;
"Jerker Hammarberg (DST)" <jerkerNO@SPAMdst.se> wrote in message
news:40ec3825_4@read01.nntp.se.dataphone.net...
Hi all! I'd like to once again bring up the subject of state machines
running into illegal states (illegal in the sense that the state vector
does
not correspond to any of the states defined in the VHDL code), because
despite having spent half a day googling and reading related threads, I'm
still left with a couple of questions:
1. Most discussions cover how to recover from illegal states, but few
cover
how it actually happens. What are the (I presume) electrical reasons to
that
a state machine runs into an illegal state in the first place? Is there
anything one can do to reduce the risk? Assume all FSM inputs connected to
I/O pins are synchronized with one FF each, and the whole design is
synchronous. Does anyone know of a good tutorial on this issue? I could
add
that in my case, the transition into an illegal state almost always happen
immediately upon startup of the system, if it happens.
2. How can I force Xilinx XST (6.2 SP3) to produce a safe FSM that
recovers
from an illegal state? A "when others => state <= IDLE;" clause doesn't
seem
to help (which I think is stupid, isn't this problem so well known that
they
should make XST recognize it instead of optimizing it away?). I realize
that
changing coding style to "Binary" will reduce the number of illegal state
and thus the risk for it to happen, but it's not completely safe, unless
the
number of states is a power of two. What's more, binary coding style seems
to increase slice utilization for the whole design by up to 10%.
Thanks in advance!
/Jerker