Advertisement
redsees

Untitled

Nov 16th, 2013
112
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. -- Uncomment the following lines to use the declarations that are
  6. -- provided for instantiating Xilinx primitive components.
  7. --library UNISIM;
  8. --use UNISIM.VComponents.all;
  9. -- add the off directive right after the ieee libraries and before the Xilinx CoreLib
  10. -- synopsys translate_off
  11.  
  12. Library XilinxCoreLib;
  13.  
  14. -- add the on directive right before the entity declaration
  15. -- synopsys translate_on
  16.  
  17. entity MUX_2_1 is
  18. Port (
  19. a,b,S : in std_logic;
  20. O : out std_logic;
  21. );
  22. end MUX_2_1;
  23.  
  24. architecture Behavioral of MUX_2_1 is
  25. begin
  26. if S = '0' then
  27.           O <= a;
  28. else
  29.     O <= b;
  30. end if;
  31. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement