Altera_Forum
Honored Contributor
13 years agoAddition Sum of Array
Hey @ all,
i'm new here and i have some questions about the Sum of an array (VHDL), that contains a lot of 8 bit value's of std_logic_vector. For example i have declared the array as follow:type table is Array (natural range <>) of std_logic_vector (7 downto 0);
constant vec_value: table := ("00000000","00000001","00000010","00000010","00000010","00000110","00010010"); Now i woult like to calculate the Sum of all elements of the array. Is it possible to realize it with a for loop, because i need the index later to calculate some features, for example the maximum and minimum and it's position or something like this? And this code should be synthesizable. I hope somebody can help me. I am very grateful for this.