Guest User

Untitled

a guest
May 24th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. entity registrador is
  2.  
  3. port ( clk,enable,reset,set : in bit;
  4. d : in bit_vector (7 downto 0);
  5. q : out bit_vector (7 downto 0)
  6.  
  7. );
  8.  
  9. end registrador;
  10.  
  11. architecture registro of registrador is
  12.  
  13. begin
  14.  
  15. process(clk,reset,set)
  16.  
  17. begin
  18.  
  19. if (reset='1') then q <= (others => '0');
  20. elsif (set='1') then q <= (others => '1');
  21. elsif (clk'EVENT and clk = '1') then
  22. if (enable ='1') then q <=d;
  23.  
  24. end if;
  25. end if;
  26. end process;
  27. end registro;
Add Comment
Please, Sign In to add comment