You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
537 B

library ieee ;
use ieee.std_logic_1164.all ;
use ieee.numeric_std.all ;
entity counter is
port (
CLK_IN: in std_logic;
RLED: out std_logic_vector(3 downto 0)
);
end counter ;
architecture behav of counter is
signal pres_count, next_count: std_logic_vector(24 downto 0);
begin
RLED <= pres_count(20 downto 17);
sync_count: process(CLK_IN)
begin
if(rising_edge(CLK_IN)) then
pres_count <= pres_count + 1;
end if;
end process sync_count;
end architecture;