QMA
Member level 4
dear all
I have designed following code in verilog using Xilinx and it is not giving me the results. i have a 16 bit vector bit_s_row. i want to calculate 1's from index i = 0 up to the index B_addr. Please help me in resolving the issue.
I have designed following code in verilog using Xilinx and it is not giving me the results. i have a 16 bit vector bit_s_row. i want to calculate 1's from index i = 0 up to the index B_addr. Please help me in resolving the issue.
Code:
if(i<B_addr)
begin
if(bits_s_row[i]==1)
pop_count = pop_count +1'b1;
else
pop_count = pop_count;
i=i+1;
end
Last edited by a moderator: