Advertisement
redsees

Untitled

Nov 16th, 2013
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. library IEEE;
  2. use IEEE.STD_LOGIC_1164.ALL;
  3. use IEEE.STD_LOGIC_ARITH.ALL;
  4. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  5.  
  6. entity MUX_2_1 is
  7. Port ( a,b,S : in std_logic;
  8. O : out std_logic;
  9. end MUX_2_1;
  10.  
  11. architecture Behavioral of MUX_2_1 is
  12. P1: process (a, b, S)
  13.    begin
  14. if (S = '0' ) then
  15.           O <= a;
  16. else
  17.     O <= b;
  18. end if;
  19.  
  20.    end process P1;
  21.  
  22. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement