Creating Counters Using VHDL
process (CLK, CLEAR)
begin
if CLEAR='1' then
end process; COUNT <= 0;
elsif CLK='1' and CLK'event then
if LOAD='1' then
end if; COUNT <= DIN;
else
if CE='1' then
end if; if UP='1' then
end if; COUNT <= COUNT + 1;
else
COUNT <= COUNT - 1;
end if;