Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2017
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 1.25 KB | None | 0 0
  1. ----------------------------------------------------------------------------------
  2. -- Company:
  3. -- Engineer:
  4. --
  5. -- Create Date:    08:48:18 02/23/2017
  6. -- Design Name:
  7. -- Module Name:    SumatorBinar8biti - Behavioral
  8. -- Project Name:
  9. -- Target Devices:
  10. -- Tool versions:
  11. -- Description:
  12. --
  13. -- Dependencies:
  14. --
  15. -- Revision:
  16. -- Revision 0.01 - File Created
  17. -- Additional Comments:
  18. --
  19. ----------------------------------------------------------------------------------
  20. library IEEE;
  21. use IEEE.STD_LOGIC_1164.ALL;
  22. use IEEE.STD_LOGIC_ARITH.ALL;
  23. use IEEE.STD_LOGIC_UNSIGNED.ALL;
  24.  
  25. ---- Uncomment the following library declaration if instantiating
  26. ---- any Xilinx primitives in this code.
  27. --library UNISIM;
  28. --use UNISIM.VComponents.all;
  29.  
  30. entity SumatorBinar8biti is
  31.     Port ( iaY : in  STD_LOGIC_VECTOR (7 downto 0);
  32.            iaX : in  STD_LOGIC_VECTOR (7 downto 0);
  33.            oaS : out  STD_LOGIC_VECTOR (7 downto 0);
  34.               iCin : in STD_LOGIC;
  35.               oCout : out STD_LOGIC
  36.               );
  37. end SumatorBinar8biti;
  38.  
  39. architecture Behavioral of SumatorBinar8biti is
  40.  
  41. signal saTemp : STD_LOGIC_VECTOR (8 downto 0);
  42.  
  43. begin
  44.  
  45.  
  46. saTemp <= ('0' & iaX) + ('0' & iaY) + iCin;
  47. oaS <= saTemp (7 downto 0);
  48. oCout <= saTemp(8);
  49.  
  50.  
  51. end Behavioral;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement