Half Adder VHDL Code Using Structrucral Modeling
Half Adder VHDL Code Using Structrucral Modeling
COM/OP2R
entity half_adder is Port ( a, b: in STD_LOGIC; sum ,carry: out STD_LOGIC); end half_adder; --------------------------------------------architecture Behavioral of half_adder is ---------------------------------------------component xor_1 is Port ( o,p : in STD_LOGIC; q : out STD_LOGIC); end component; component and_1 is Port ( x,y : in STD_LOGIC; z : out STD_LOGIC); end component; ----------------------------------------------begin X1: xor_1 port map (a, b, sum); x2: and_1 port map (a, b, carry); end Behavioral; -----------------------------------------------
Entity declaration. a, b: - input port bits (bits to be added) sum, carry: - output port bits
Component (Ex-or, And, Not) declaration. These components are describing the structure view of half adder.
Architecture statements part (Architecture body). Components are port mapped to perform the circuit (adder) operation.
RTL VIEW:-
INFOOP2R.WIX.COM/OP2R