8. AkashGera
2:- VHDL Programs For the following and check the Simulation
1) Half Adder
2) Full Adder.
VHDL PROGARM FOR HALF ADDER
Sample WaveFormOutput:-
9. AkashGera
VHDL PROGARM FOR FULL ADDER
LIBRARY IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity fulladder is
port( a, b, cin : in STD_LOGIC;
sum, cout : out STD_LOGIC );
end fulladder;
architecture Behavioral of fulladder is
signal s1,s2,s3: STD_ULOGIC;
constant gate_delay:Time :=100 ps;
begin
s1<=(a xor b) after gate_delay;
s2<=(cin and s1) after gate_delay;
s3<=(a and b) after gate_delay;
sum<=(s1 xor cin) after gate_delay;
cout<=(s2 or s3) after gate_delay;
end Behavioral;
Sample WaveFormOutput:-
10. AkashGera
3:- VHDL Programs For the following and check the Simulation
1. Multiplexer
2. Demultiplexer
VHDL PROGARM FOR MULTIPLEXER(4 X 1)
Sample WaveFormOutput:-