I guess I wonder why enums aren't more like parameters. A parameter
with no explicit range information is sized to whatever is necessary to
represent its value. Why not the same for enums?
> p.s. By the way, sometimes people don't want the minimum number
> of bits. For example, sometimes instead a one-hot encoding, as --
> ...
> enum [3:0] {RED = 4'b0001, GREEN = 4'b0010, BLUE = 4'b0100,
> YELLOW = 4'b1000 } ;
I'm not saying that you shouldn't be allowed to force an enum to a
particular size. Just that it would be nice to allow the tool to
select a minimal size automatically.
Paul
Received on Fri Oct 29 18:09:28 2004
This archive was generated by hypermail 2.1.8 : Fri Oct 29 2004 - 18:09:36 PDT