ile <= '1' when (le = '1') and (somereg = '1') else '0';

gatedlatch : process (ile, addr, d) is
begin
    if (ile = '1') and (addr = X"8000") then
        q <= d;
    end if;
end process gatedlatch;