library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity Sensor is Port ( sensor : in STD_LOGIC; cmp_in : in STD_LOGIC; output : out STD_LOGIC); end Sensor; architecture Behavioral of Sensor is begin snsr_op : process ( sensor, cmp_in) begin if (sensor = '1') then output <= cmp_in; else output <= '0'; end if; end process; end Behavioral;