Advertisement
Guest User

Untitled

a guest
Oct 6th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.40 KB | None | 0 0
  1.  
  2. library ieee;
  3. use ieee.std_logic_1164.all;
  4. use ieee.std_logic_arith.all;
  5. use ieee.std_logic_unsigned.all;
  6.  
  7. --define adder
  8. entity adder is
  9.  
  10. --wbit adder
  11. generic (w : integer :=16);
  12. port (
  13. a,b : in std_logic_vector (w-1 downto 0);
  14. c : out std_logic_vector (w-1 downto 0)
  15. );
  16.  
  17. end entity;
  18.  
  19. architecture add of adder is
  20.  
  21. begin
  22.  
  23. --Add a+b and output to c
  24. c <= a+b;
  25.  
  26.  
  27.  
  28.  
  29. end architecture;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement