R
rickman
Guest
Maybe I am being a little dense, but I can't find anything on this in my
VHDL books and the LRM is pretty esoteric in this section.
I am writing some code to help me simplify simulation data display and I
want to have some SLV constants in an array. These constants relate to
defined states of a combination of signals and have names associated
with them. To get the names to show up in the simulation, I want to use
an enumerated type which then corresponds to the index of the constant
array.
Can I directly use this enumerated type as the index? I am still a day
or so from having some code to try. Am I barking up the wrong tree with
this? Should I convert my enum variable to an int and use that as the
array index?
subtype ALUSLV is SLV07;
subtype ALUTyp is (AD, ADC, SU, SUC, CM, CMC, AN, LOR, LXR, SR, SC,
AER);
type ALUstyles is array (ALUTyp) of ALUSLV := (
"00100XX", ...
--
Rick "rickman" Collins
rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.
Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design URL http://www.arius.com
4 King Ave 301-682-7772 Voice
Frederick, MD 21701-3110 301-682-7666 FAX
VHDL books and the LRM is pretty esoteric in this section.
I am writing some code to help me simplify simulation data display and I
want to have some SLV constants in an array. These constants relate to
defined states of a combination of signals and have names associated
with them. To get the names to show up in the simulation, I want to use
an enumerated type which then corresponds to the index of the constant
array.
Can I directly use this enumerated type as the index? I am still a day
or so from having some code to try. Am I barking up the wrong tree with
this? Should I convert my enum variable to an int and use that as the
array index?
subtype ALUSLV is SLV07;
subtype ALUTyp is (AD, ADC, SU, SUC, CM, CMC, AN, LOR, LXR, SR, SC,
AER);
type ALUstyles is array (ALUTyp) of ALUSLV := (
"00100XX", ...
--
Rick "rickman" Collins
rick.collins@XYarius.com
Ignore the reply address. To email me use the above address with the XY
removed.
Arius - A Signal Processing Solutions Company
Specializing in DSP and FPGA design URL http://www.arius.com
4 King Ave 301-682-7772 Voice
Frederick, MD 21701-3110 301-682-7666 FAX