Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 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.  
  6. entity SIPO is
  7. port
  8. (clk,x: in std_logic;
  9. q : out std_logic_vector(3 downto 0)
  10. );
  11. end SIPO;
  12.  
  13. architecture Behavioral of SIPO is
  14. signal q1: std_logic_vector(3 downto 0):="0000";
  15.  
  16. begin
  17. process(clk)
  18. begin
  19. if clk'event and clk='1' then
  20. q1(3)<=q1(2);
  21. q1(2)<=q1(1);
  22. q1(1)<=q1(0);
  23. q1(0)<=x;
  24. end if;
  25. end process;
  26. q<=q1;
  27. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement