--- /dev/null
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.std_logic_unsigned.all;
+
+entity timer is
+ port (
+ clk :in std_logic; -- Input clock
+ reset :out std_logic -- Output of the counter
+ );
+end timer;
+
+architecture rtl of timer is
+
+ signal count : std_logic_vector (26 downto 0);
+ signal temporal: STD_LOGIC;
+
+begin
+ process (clk) begin
+
+ if (rising_edge(clk)) then
+ count <= count + 1;
+ if (count(26)='1') then
+ temporal <= NOT(temporal);
+ count<=(others=>'0');
+ end if;
+ end if;
+
+ end process;
+ reset <= temporal;
+
+end rtl;