LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
ENTITY tri2 IS
PORT(ct1:in std_logic_vector(1 downto 0);
datain1,datain2,datain3,datain4: in std_logic_vector(7 downto 0);
qout: out std_logic_vector(7 downto 0)
);
END tri2;
ARCHITECTURE body_tri OF tri2 IS
BEGIN
qout <=datain1 when ct1="00" else (others=>'Z');
qout <=datain2 when ct1="01" else (others=>'Z');
qout <=datain3 when ct1="10" else (others=>'Z');
qout <=datain4 when ct1="11" else (others=>'Z');
END body_tri;