ONLINE PLATFORM FOR PROGRAMMING AND RESEARCH (OP2R)
FULL ADDER VHDL CODE USING DATA FLOW MODELING
Library declaration
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
--------------------------------------------
entity full_adder is
Port ( a, b, c: in STD_LOGIC;
sum ,carry: out STD_LOGIC);
end full_adder;
---------------------------------------------
Std_logic_1164; package for std_logic (predefined data type).
Entity declaration.
a, b, c :- input port bits (bits to be
added)
Sum, carry: - output port bits.
architecture Behavioral_FA of full_adder is
begin
-------------------------------------------------------sum<= a xor b xor c;
carry<= ((a and b) or ( b and c) or (c and a));
------------------------------------------------------end Behavioral_HA;
RTL VIEW:-
INFOOP2R.WIX.COM/OP2R
OUT PUT WAVEFORMS:
Concurrent statements.
These are the circuit expressions which
are formed by k-map or Boolean
function.