Created
November 14, 2014 20:28
-
-
Save libertylocked/1ea959cb6f959022ebd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library IEEE; | |
use IEEE.STD_LOGIC_1164.ALL; | |
use IEEE.STD_LOGIC_ARITH.ALL; | |
use IEEE.STD_LOGIC_UNSIGNED.ALL; | |
entity Latch4bit is | |
Port ( D : in STD_LOGIC_VECTOR(3 downto 0); | |
E : in STD_LOGIC; | |
Q : out STD_LOGIC_VECTOR(3 downto 0)); | |
end Latch4bit; | |
architecture Behavioral of Latch4bit is | |
begin | |
process (E, D) | |
begin | |
if (E = '1') then | |
Q <= D; | |
end if; | |
end process; | |
end Behavioral; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment