Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library ieee;
- use ieee.std_logic_1164.all;
- use ieee.std_logic_unsigned.all;
- entity DODATNI is
- Port(
- iCLK: in std_logic;
- inRST: in std_logic;
- iEN: in std_logic;
- iDATA: in std_logic_vector(15 downto 0);
- oDATA: out std_logic_vector(15 downto 0)
- );
- end DODATNI;
- architecture Behavioral of DODATNI is
- signal spom: std_logic_vector(15 downto 0) := iDATA;
- begin
- --sPOM <= Idata;
- process(iCLK, inRST) begin
- if(inRST='0') then
- sPOM<=(others=>'0');
- elsif(iCLK'event and iCLK='1') then
- if(iEN='1') then
- if(sPOM(15)='0')then
- sPOM <= sPOM(14 downto 0) & '0';
- else
- sPOM <= sPOM;
- end if;
- end if;
- end if;
- end process;
- oDATA<=sPOM;
- end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement