Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3.  
  4. entity BlinkLEDs is
  5. Port ( CLK : in STD_LOGIC;
  6. LED : out STD_LOGIC);
  7. end BlinkLEDs;
  8.  
  9. architecture Behavioral of BlinkLEDs is
  10.  
  11. signal pulse : std_logic := '0';
  12. signal count : integer range 0 to 49999999 := 0;
  13.  
  14. begin
  15.  
  16. counter : process(CLK)
  17. begin
  18. if CLK'event and CLK = '1' then
  19. if count = 4 then
  20. count <= 0;
  21. pulse <= not pulse;
  22. else
  23. count <= count + 1;
  24. end if;
  25. end if;
  26. end process;
  27.  
  28. LED <= pulse;
  29.  
  30.  
  31. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement