0% found this document useful (0 votes)
49 views1 page

Latch D: Entity Is Port in in Out End Architecture of Is Signal Begin Process Begin If Then

This document describes a latch entity with an input D, enable input Enable, and output Q. The latch uses an internal signal temp to store the value of D when Enable is high, and assigns temp to Q when Enable is low, maintaining the stored value.

Uploaded by

Karl Hummer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Latch D: Entity Is Port in in Out End Architecture of Is Signal Begin Process Begin If Then

This document describes a latch entity with an input D, enable input Enable, and output Q. The latch uses an internal signal temp to store the value of D when Enable is high, and assigns temp to Q when Enable is low, maintaining the stored value.

Uploaded by

Karl Hummer
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 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