Sum of element array

V

VHDL_HELP

Guest
hi every body ,

please how to calculate the sum of array elements .
for example an array of 5 elements with type std_logic_vector(3 down
to 0) .
thank you
 
On Mar 13, 5:47 pm, "VHDL_HELP" <abai...@gmail.com> wrote:
hi every body ,

please how to calculate the sum of array elements .
for example an array of 5 elements with type std_logic_vector(3 down
to 0) .
thank you
How about this?

sum<= array(0) + array(1) + array(2) + array(3)+array(4);

regards
Anupam Jain
 

Welcome to EDABoard.com

Sponsor

Back
Top