Ripple Carry Adder VHDL Code Using Structural Modelling
Ripple Carry Adder VHDL Code Using Structural Modelling
COM/OP2R
Library declaration
library IEEE;
Std_logic_1164. package for std_logic (predefined data type).
use IEEE.STD_LOGIC_1164.ALL;
---------------------------------------------------------------------
Entity declaration: -
entity RCA_1 is
Port ( ain,bin : in STD_LOGIC_VECTOR (3 downto 0);
sum: out std_logic_vector(3 downto 0);
carry: out std_logic);
end RCA_1;
Statement parts of
l1: full_adder port map (ain(0),bin(0),carry0,sum(0),carry1);
architecture.
l2: full_adder port map (ain(1),bin(1),carry1,sum(1),carry2);
RTL VIEW:-
INFOOP2R.WIX.COM/OP2R
OUTPUT WAVEFORM: -