I am designing a 4:1 Mux using VHDL. I am using the Behavioral Style as the Architecture Body. What would my 'else' statement be ? My 4 'If' statements will choose the output as one of the inputs depending on the value of select lines.
Your code should be like this for a pure combinatorical mux :
pMux : process (A,B,C,D,Sel)
begin
case Sel is
when "00" => out <= A;
when "01" => out <= B;
when "10" => out <= C;
when others => out <= D;
end case;
end process pMux;
A,B,C,D and out can be either what but should be of the same
type.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.