Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

LATCH D

entity latchd is
Port ( D : in STD_LOGIC;
Enable : in STD_LOGIC;
Q : out STD_LOGIC);
end latchd;

architecture Behavioral of latchd is

signal temp : STD_LOGIC;

begin

process (D, Enable)


begin
if (Enable = '1') then
q <= d;
temp <= d;
else
q <= temp;
end if;
end process;

end Behavioral;

You might also like