Try simulating the two-input multiplexer.
1
www.edaplayground.com/x/4ZGBwww.edaplayground.com/x/4ZGBwww.edaplayground.com/x/4ctJwww.edaplayground.com/x/2GeLd, c, b, a are packed into a vector x(3 downto 0). Single input ports are extracted from the vector. The testbench sets the select bits and asserts the data bit of interest. Then it toggles the inputs, to demonstrate that the unselected inputs do not pass.a <= x(0);
b <= x(1);
c <= x(2);
d <= x(3);
stim_proc: process
begin
s <= "00";
x <= "0001"; wait for T;
x <= not(x); wait for T;
s <= "01";
x <= "0010"; wait for T;
x <= not(x); wait for T;
s <= "10";
x <= "0100"; wait for T;
x <= not(x); wait for T;
s <= "11";
x <= "1000"; wait for T;
x <= not(x); wait for T;
wait;
end process stim_proc;