-- Código latch
Entity latch is port

( d, e:in bit;
q:out bit);

end;
Architecture func of latch is
begin

process (d, e)
begin

if e='1' then q <= d after 0.5 ns;
end if;

end process;

end;


WcN - Joan Oliver. Diseño de circuitos digitales con VHDL