Professional Documents
Culture Documents
Date:12-04-2021
Section: CpE-3105
Laboratory No. 4
Create a VHDL program of the circuit design inside a 3:8 Decoder using the basic logic
gates. Then test the VHDL design program and monitor the designs behavior through
its waveform output.
CODES IN THE EDA PLAYGROUND (DESIGN & TESTBENCH)
Design Code:
library IEEE;
use IEEE.std_logic_1164.all;
entity Alejandro is
port(
a: in std_logic;
b: in std_logic;
c: in std_logic;
end Alejandro;
begin
process(a, b, c) is
begin
end process;
end logic;
Testbench Code:
library IEEE;
use IEEE.std_logic_1164.all;
entity Tolentino is
end Tolentino;
component Alejandro is
port(
a: in std_logic;
b: in std_logic;
c: in std_logic;
end component;
signal a_in, b_in, c_in, x0_out, x1_out, x2_out, x3_out, x4_out, x5_out, x6_out, x7_out:
std_logic;
begin
DUT: Alejandro port map(a_in, b_in, c_in, x0_out, x1_out, x2_out, x3_out, x4_out, x5_out,
x6_out,
x7_out);
process
begin
wait;
end process;
end Ken;
SCREENSHOTS IN EDA PLAYGROUND (CODE & EP WAVE)
Code:
EP Wave:
TRUTH TABLE OF THE EP WAVE
A B C x0 x1 x2 x3 x4 x5 x6 x7
0 0 0 1 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0
0 1 0 0 0 1 0 0 0 0 0
0 1 1 0 0 0 1 0 0 0 0
1 0 0 0 0 0 0 1 0 0 0
1 0 1 0 0 0 0 0 1 0 0
1 1 0 0 0 0 0 0 0 1 0
1 1 1 0 0 0 0 0 0 0 1