Advertisement
Guest User

Untitled

a guest
Apr 30th, 2016
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1.  
  2.  
  3. port (clk_prescaler, enableConditii, rst: in std_logic;
  4. rez : out std_logic_vector(3 downto 0)
  5. );
  6.  
  7. --
  8. signal counter : std_logic_vector(3 downto 0) := (others => '0');
  9. process (clk_prescaler, enableConditii)
  10. begin
  11. if enableConditii = '1' then
  12. if rising_edge(clk_prescaler) then
  13. if rst = '1' then
  14. rez <= "0000";
  15. else
  16. if counter = "1001" then
  17. rez <= "0000";
  18. else counter <= counter + '1';
  19. end if;
  20. end if;
  21. end if;
  22. end if;
  23. end process;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement