Decade Counter
Decade Counter
--Counter VHDL
use IEEE.std_logic_1164.all;
use IEEE.std_logic_unsigned.all;
port (
clk:in std_logic;
reset: in std_logic;
);
end Counter;
begin
begin
if reset='1' then
else
if qtemp<9 then
qtemp:=qtemp+1; -- Counter increase
else
end if;
end if;
q<=qtemp; -- Output
end if;