LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_UNSIGNED.ALL;
ENTITY even2n IS
PORT
(
inclk : IN STD_LOGIC;
outclk : OUT STD_LOGIC
);
END ENTITY even2n;
ARCHITECTURE a OF even2n IS
SIGNAL clk_temp : STD_LOGIC;
BEGIN
PROCESS(inclk)
VARIABLE count : STD_LOGIC_VECTOR(2 DOWNTO 0);
BEGIN
IF inclk'event AND inclk='1' THEN
IF count="100" THEN
count:="000";
clk_temp <=NOT clk_temp;
ELSE count:=count+1;
END IF;
outclk <=clk_temp;
END IF;
END PROCESS;
-- outclk <=clk_temp;
END a;