S
Steve
Guest
I am trying to implement a simple circuit that counts the number of 1's in a
16 or 32 bit register.
I am fairly new to VHDL and have implemented it the following way
for i in 15 downto 0 loop
if (Reg(i) = '1') then
Bitcount := BitCount + 1;
end if;
end loop;
in synthesizing this code, i found that this generated numerous 16 bit
adders. is there a better way to implement consider the solution can be
stored in only 4 bits?
Steve
16 or 32 bit register.
I am fairly new to VHDL and have implemented it the following way
for i in 15 downto 0 loop
if (Reg(i) = '1') then
Bitcount := BitCount + 1;
end if;
end loop;
in synthesizing this code, i found that this generated numerous 16 bit
adders. is there a better way to implement consider the solution can be
stored in only 4 bits?
Steve