Advertisement
Guest User

Untitled

a guest
May 26th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.numeric_std.all;
  4.  
  5. entity register1 is
  6. port(
  7. rst : in std_logic;
  8. end_data : in std_logic;
  9. clk : in std_logic;
  10. D : in std_logic_vector(7 downto 0);
  11. Q : out std_logic_vector(7 downto 0)
  12. );
  13. end entity register1;
  14.  
  15. architecture RTL of register1 is
  16. begin
  17. process(clk)
  18. begin
  19. if rising_edge(clk) then
  20. if rst = '1' or end_data = '1' then
  21. Q <= "UUUUUUUU";
  22. else
  23. Q <= D;
  24. end if;
  25. end if;
  26. end process;
  27.  
  28. end architecture RTL;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement