Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity taktteiler is
  6.  
  7.  
  8. port (
  9. clk : in std_logic; --50 MHz
  10. clk_10Hz : out std_logic
  11.  
  12. );
  13. end entity taktteiler;
  14.  
  15. architecture arch of taktteiler is
  16. signal counter : std_logic_vector(22 downto 0);
  17.  
  18. begin
  19. process(clk)
  20. begin
  21.  
  22. if(clk ='1' and clk'event) then counter <= std_logic_vector(unsigned(counter) + 1);
  23. end if;
  24. if (counter = 010011000100101101000000) then
  25. clk_10Hz <= not(clk_10Hz);
  26. counter <= '0';
  27. end if;
  28.  
  29. end process;
  30.  
  31.  
  32.  
  33.  
  34. end architecture arch;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement