Created
April 7, 2010 20:21
-
-
Save maluta/359393 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
entity mux is | |
port ( | |
din_1 : in bit_vector (7 downto 0); | |
din_2 : in bit_vector (7 downto 0); | |
din_3 : in bit_vector (7 downto 0); | |
din_4 : in bit_vector (7 downto 0); | |
dout : out bit_vector(7 downto 0); | |
sel : in bit_vector (1 downto 0) | |
); | |
end mux; | |
architecture arch of mux is | |
begin | |
with sel select | |
dout <= din_1 when "00", | |
din_2 when "01", | |
din_3 when "10", | |
din_4 when "11"; | |
end arch; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment