Advertisement
Guest User

Untitled

a guest
Jan 28th, 2020
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. library ieee;
  2. use ieee.std_logic_1164.all;
  3. use ieee.std_logic_unsigned.all;
  4.  
  5. entity DODATNI is
  6. Port(
  7. iCLK: in std_logic;
  8. inRST: in std_logic;
  9. iEN: in std_logic;
  10. iDATA: in std_logic_vector(15 downto 0);
  11. oDATA: out std_logic_vector(15 downto 0)
  12.  
  13. );
  14. end DODATNI;
  15.  
  16. architecture Behavioral of DODATNI is
  17.  
  18. signal spom: std_logic_vector(15 downto 0) := iDATA;
  19.  
  20. begin
  21.  
  22. --sPOM <= Idata;
  23. process(iCLK, inRST) begin
  24.  
  25. if(inRST='0') then
  26. sPOM<=(others=>'0');
  27. elsif(iCLK'event and iCLK='1') then
  28. if(iEN='1') then
  29. if(sPOM(15)='0')then
  30. sPOM <= sPOM(14 downto 0) & '0';
  31. else
  32. sPOM <= sPOM;
  33. end if;
  34. end if;
  35. end if;
  36.  
  37. end process;
  38.  
  39. oDATA<=sPOM;
  40.  
  41. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement