Eric Smith wrote:
> Paul Uiterlinden <> writes:
>> For synthesis this is different: the state variable/signal will be
>> mapped to a vector, giving 2**n possible states. So here you _must_
>> use a "when others" choice, to prevent hang-up situations if the state
>> vector ever gets one of those unused states.
>
> Note that VHDL semantics only define "when others" to affect the other
> legal values of the type. For instance, if you have an enumeration with
> three values, FOO, BAR, and BAZ, which will synthesize to a two bit
> vector, a "when others" clause does not cover the fourth possible state
> of the vector.
You should allways expand your enumerations to 2**n states (foo, bar, baz,
unused) to avoid this problem.
BTW when using synplify, you should replace each enumeration type with
constant declarations, if you like to have a determistic result, that
didn't mess up you equivalence check.
bye Thomas
--
Emailantworten bitte an thomas[at]obige_domain.
Usenet_10 ist für Viren und Spam reserviert
|