I would like to find the array index with its highest value. Is it possible to simply use an vhdl-attribute therefore? If so, how?
TYPE x_Array IS ARRAY (0 TO 3) OF STD_LOGIC_VECTOR(2 DOWNTO 0);
SIGNAL y : x_Array;
Example:
x_Array(0) = "000"
x_Array(1) = "011"
x_Array(2) = "111"
x_Array(3) = "101"
index <= x_Array'high; -- is this correct or..?
Question: How can I get the index of 2 (x_Array(2) has the highest value (7)) in vhdl?
'HIGH. Or do you want to know the index of the element with the highest value? In which case, the answer is: no.