Professional Documents
Culture Documents
Brent Kung Adder 16 Bit Full Code
Brent Kung Adder 16 Bit Full Code
Brent Kung Adder 16 Bit Full Code
Entity pgblock is
Port ( a: in std_logic;
b: in std_logic;
g0 : out std_logic;
p0: out std_logic);
end pgblock;
architecture Behavioral of pgcell is
g0 <=( a and b);
p0 <= (a xor b);
end behavioral;
2. entity blackcell is
port (g0 : in std_logic;
p0 : in std_logic;
g1 : in std_logic;
p1 : in std_logic;
G : out STD_LOGIC;
P : out STD_LOGIC);
end blackcell ;
architecture Behavioral of blackcell is
G <=( g1 or(g0 and p1));
P <= (p0 and p1);
End behavioral;
3. Entity SUMBLOCK is
port ( P: in std_logic;
c: in std_logic
sum : out std_logic);
end sumblock;
architecture Behavioral of sumblock is
sum <= (P xor c);
end behavioral;
4. Entity buffer is
Port ( G : in std_logic;
c : out std_logic);
end buffer;
architecture Behavioral of buffer is
c := G;
end behavioral;
entity Brent_kung is
Port ( a : in STD_LOGIC_VECTOR (15 downto 0);
Component blackcell is
Port ( g0 : in std_logic;
p0 : in std_logic;
g1 : in std_logic;
p1 : in std_logic;
G : out STD_LOGIC;
P : out STD_LOGIC);
end Component;
Component pgblock is
Port ( a : in STD_LOGIC_VECTOR (15 downto 0);
b : in STD_LOGIC_VECTOR (15downto 0);
g0 : out STD_LOGIC_VECTOR (15 downto 0);
p0 : out STD_LOGIC_VECTOR (15 downto 0));
end Component;
component SUMBLOCK is
port ( P: in std_logic;
c: in std_logic
sum : out std_logic);
end component;
begin