C
Charlie
Guest
This might be a silly question but hopefully it can be easily answered.
I have defined an enumeration
type MODE_typ is (CLR_RST, OPEN_LOOP, POS_COM, RATE_COM, TRQ_DRIVE_CAL,
AtoD_CAL, NORMAL, WRITE_DD);
It is only 8 values, so I would imagine that it would snythesize to be
a 3 bit std_logic_vector. In the future, I might add more values to
this type, I could end up needing 5 bits to define them all.
I am also using a schematic based design tool for the structural level
of my design where I have to explicitly define the number of pins on
each module. So, what I want to do is force that MODE_typ to be a 5
bit std_logic_value. I don't care what each specific value synthesizes
to, I just want to make sure that it is five bits wide. I don't want
to explicitly set each value because I would like it to do the
optimization for me. How can I accomplish this?
I have defined an enumeration
type MODE_typ is (CLR_RST, OPEN_LOOP, POS_COM, RATE_COM, TRQ_DRIVE_CAL,
AtoD_CAL, NORMAL, WRITE_DD);
It is only 8 values, so I would imagine that it would snythesize to be
a 3 bit std_logic_vector. In the future, I might add more values to
this type, I could end up needing 5 bits to define them all.
I am also using a schematic based design tool for the structural level
of my design where I have to explicitly define the number of pins on
each module. So, what I want to do is force that MODE_typ to be a 5
bit std_logic_value. I don't care what each specific value synthesizes
to, I just want to make sure that it is five bits wide. I don't want
to explicitly set each value because I would like it to do the
optimization for me. How can I accomplish this?