Advertisement
Guest User

Untitled

a guest
Nov 21st, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. ----------------------------------------------------------------------------------
  2.  
  3. --
  4. -- Create Date: 08:51:24 11/21/2019
  5. -- Design Name:
  6. -- Module Name: uklad - Behavioral
  7. -- Project Name:
  8. -- Target Devices:
  9. -- Tool versions:
  10. -- Description:
  11. --
  12. -- Dependencies:
  13. --
  14. -- Revision:
  15. -- Revision 0.01 - File Created
  16. -- Additional Comments:
  17. --
  18. ----------------------------------------------------------------------------------
  19. library IEEE;
  20. use IEEE.STD_LOGIC_1164.ALL;
  21.  
  22. -- Uncomment the following library declaration if using
  23. -- arithmetic functions with Signed or Unsigned values
  24. --use IEEE.NUMERIC_STD.ALL;
  25.  
  26. -- Uncomment the following library declaration if instantiating
  27. -- any Xilinx primitives in this code.
  28. --library UNISIM;
  29. --use UNISIM.VComponents.all;
  30.  
  31. entity uklad is
  32. Port ( x : in STD_LOGIC_VECTOR (2 downto 0);
  33. y : out STD_LOGIC_VECTOR (1 downto 0));
  34. end uklad;
  35.  
  36. architecture Behavioral of uklad is
  37.  
  38. -- y0(x2,x1,x0)=suma(1,2,4,6), y1(x2,x1,x0)=suma(3,5,6,7)
  39. begin
  40. y(0) <= (not x(2) and not x(1) and x(0)) or -- 1
  41. (not x(2) and x(1) and not x(0)) or -- 2
  42. (x(2) and not x(1) and not x(0)) or -- 4
  43. (x(2) and x(1) and x(0)); -- 7
  44.  
  45. y(1) <= (not x(2) and x(1) and x(0)) or -- 3
  46. (x(2) and not x(1) and x(0)) or -- 5
  47. (x(2) and x(1) and not x(0)) or -- 6
  48. (x(2) and x(1) and x(0)); -- 7
  49.  
  50. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement