1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
library ieee ; use ieee.std_logic_1164.all; use ieee.numeric_std_unsigned.all; entity Inc2 is generic( N : positive := 4 ); port( A : in std_logic_vector(N-1 downto 0); Sum : out std_logic_vector(N downto 0) ); end Inc2; architecture RTL of Inc2 is begin sum <= ('0', A) + 1; end RTL;