library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity top is
Port (
a,b : in bit_vector(3 downto 0);
y : out bit_vector(3 downto 0)
 );
end top;

architecture Behavioral of top is

begin

y <= a or b;

end Behavioral;
--------------------------------
--1_ Include all the libraries present in the DUT
--2) Do not add any port to TB
--3_ Use same datatype for input and output port equivalent signal
--4) Initialize signal representing input to zero or any other specific value



--------------------------------Testbench Code-----------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity toptb is 
end toptb;

architecture toptb2 of toptb is

component top is
Port (
a,b : in bit_vector(3 downto 0);
y : out bit_vector(3 downto 0)
 );
end component;


signal a,b : bit_vector(3 downto 0) := "0000";
signal y : bit_vector(3 downto 0);

begin

T1 : top port map (a => a, b => b, y => y);


--a <= "0110" after 10ns, "1010" after 20 ns, "0100" after 30 ns;
--b <= "1111" after 10ns, "0110" after 20 ns, "1000" after 30 ns;

process
begin
wait for 10 ns;
a <= "0110";
b <= "1010";
wait for 10 ns;
a <= "1010";
b <= "0110";
wait for 10 ns;
a <= "0100";
b <= "1000";
wait for 10 ns;
wait;
end process;

end toptb2;