Glaas2

Compuertas

Feb 28th, 2013
322
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.82 KB | None | 0 0
  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 compuertas is
  7.  Port (a, b : in STD_LOGIC;
  8.        
  9.     not_a : out STD_LOGIC;
  10.     a_and_b : out STD_LOGIC;
  11.     a_or_b : out STD_LOGIC;
  12.     a_xor_b : out STD_LOGIC;
  13.     a_nor_b : out STD_LOGIC;
  14.     a_nand_b : out STD_LOGIC);
  15.  
  16. ATTRIBUTE LOC : string;
  17. ATTRIBUTE LOC OF not_a : SIGNAL IS "23";
  18. ATTRIBUTE LOC OF a_and_b : SIGNAL IS "22";
  19. ATTRIBUTE LOC OF a_or_b : SIGNAL IS "21";
  20. ATTRIBUTE LOC OF a_xor_b : SIGNAL IS "20";
  21. ATTRIBUTE LOC OF a_nor_b : SIGNAL IS "19";
  22. ATTRIBUTE LOC OF a_nand_b : SIGNAL IS "18";
  23.  
  24. end compuertas;
  25.  
  26.  
  27. architecture behavioral of compuertas is
  28. begin
  29.  
  30. a_and_b <= a and b;
  31. not_a <= not a;
  32. a_or_b <= a or b;
  33.  
  34. a_xor_b <= a xor b;
  35. a_nor_b <=a nor b;
  36. a_nand_b<= a nand b;
  37.  
  38. end behavioral;
Advertisement
Add Comment
Please, Sign In to add comment