Beruflich Dokumente
Kultur Dokumente
ECE240-Advanced Digital IC
begin
process (CLK)
begin
for i in 0 to 15 loop
if INA(i)=’1’ then
count_bit := count_bit + 1;
end if;
end loop;
end if;
num_bit:=0;
end process;
end Behavioral;
architecture Behavioral of Arithmetic_Div_Mod is
begin
process (CLK)
begin
if conv_integer(INB) = 0 then
EF <= ‘1’;
answer := 0;
else
EF <= ‘0’;
answer := conv_integer(INA)/conv_integer(INB);
endif;
else
if conv_integer(INB) = 0 then
EF <= ‘1’;
answer := 0;
else
EF <= ‘0’;
endif;
endif;
endif;
end process;
end Behavioral;