Created
November 14, 2014 20:28
-
-
Save libertylocked/f9c2a6e69cb7e102b84a 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 Mux4to1 is | |
Port ( S : in STD_LOGIC; | |
A : in STD_LOGIC_VECTOR(3 downto 0); | |
B : in STD_LOGIC_VECTOR(3 downto 0); | |
Y : out STD_LOGIC_VECTOR(3 downto 0)); | |
end Mux4to1; | |
architecture Behavioral of Mux4to1 is | |
begin | |
Mux1: process (S, A, B) | |
begin | |
if (S = '0') then | |
Y <= A; | |
else | |
Y <= B; | |
end if; | |
end process; | |
end Behavioral; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment