PPT ½½¶óÀ̵å
- 4 to 1 Mux (WHEN ELSE±¸¹®)
library ieee;
use ieee.std_logic_1164.all;
entity mux4 is
port (
i0,i1,i2,i3 : in std_logic;
sel : in std_logic_vector(1 downto 0);
y : out std_logic
);
end mux4;
architecture behave_mux4 of mux4 is
begin
y <= i0 when sel = ¡°00¡± else
i1 when sel = ¡°01¡± else
i2 when sel = ¡°10¡± else
i3 when sel = ¡°11¡± else
¡®0¡¯;
end behave_mux4;