R
Richard Nicholas
Hi,
If I have a std_logic_vector:
signal vec : std_logic_vector(0 to N);
I can easily get the OR of all the bits with or_reduce(vec).
What what if I have an array of std_logic_vectors:
type arr_type is array (0 to X) of std_logic_vector(0 to N)
signal my_arr : arr_type;
I want a function that ORs all fo the vectors in the array to produce one result
std_logic_vector(0 to N) where each bit of the result is the OR of all the bits at that
location. I.e. bit 0 of the result is the OR of all the bit 0s of each entry in my_arr?
Does something like this already exist or if not, hopefully someone can sketch out a function
that would be able to do this for variable X and N? I've made some attempts with
for/generate and for/loop but I didn't hit on anything that would compile. Thanks in
advance.
Richard Nicholas
If I have a std_logic_vector:
signal vec : std_logic_vector(0 to N);
I can easily get the OR of all the bits with or_reduce(vec).
What what if I have an array of std_logic_vectors:
type arr_type is array (0 to X) of std_logic_vector(0 to N)
signal my_arr : arr_type;
I want a function that ORs all fo the vectors in the array to produce one result
std_logic_vector(0 to N) where each bit of the result is the OR of all the bits at that
location. I.e. bit 0 of the result is the OR of all the bit 0s of each entry in my_arr?
Does something like this already exist or if not, hopefully someone can sketch out a function
that would be able to do this for variable X and N? I've made some attempts with
for/generate and for/loop but I didn't hit on anything that would compile. Thanks in
advance.
Richard Nicholas