C
Colin Beighley
Hello,
I'd like to declare a type like this
type mytype is (-1,1);
However, it appears that enumerated types aren't allowed to be
integers.
Is there a way to create an integer subtype where the values of the
type are constrained to certain hand-picked values, rather than a
range? The workaround for this is to use std_logic and convert it to
signed when you need to, but it seems an integer subtype would work
better.
Colin
I'd like to declare a type like this
type mytype is (-1,1);
However, it appears that enumerated types aren't allowed to be
integers.
Is there a way to create an integer subtype where the values of the
type are constrained to certain hand-picked values, rather than a
range? The workaround for this is to use std_logic and convert it to
signed when you need to, but it seems an integer subtype would work
better.
Colin