clearable_latch : process(le, clr, d) is
begin
    if (clr = '1') then
        q <= '0';
    else if (le = '1') then
        q <= d;
    end if;
end process clearable_latch;