JayBawankar

dcfm synchronuos counter

Jul 20th, 2017
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.44 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.std_logic_arith.all;
  4. use ieee.std_logic_unsigned.all;
  5. entity c1 is
  6. port(c:in std_logic_vector(3 downto 0);
  7.      clk:in std_logic_vector(0 downto 0);
  8.      q:out std_logic_vector(3 downto 0));
  9. end c1;
  10. architecture bev of c1 is
  11. begin
  12. process(c,clk)
  13. begin
  14. if(clk ="1") then
  15. case c is
  16. when "1111"=>q<= "0000";
  17. when others =>q<= c + "0001";
  18. end case;
  19. end if;
  20. end process;
  21. end bev;
Add Comment
Please, Sign In to add comment