
13.30 | Chapter 13
ENTITY MUX_4_1c IS
PORT (S1, S0, I0, I1, I2, I3: IN std_logic;
Z: OUT std_logic);
END MUX_4_1a;
ARCHITECTURE behave_MUX41c OF MUX_4_1c IS
BEGIN
P1: PROCESS (S1, S0, I0, I1, I2, I3)
BEGIN
IF (( NOT S1 AND NOT S0 )= ’1’) THEN
Z <= I0;
ELSIF (( NOT S1 AND S0) = ‘1’) THEN
Z<=I1;
ELSIF ((S1 AND NOT S0) = ’1’) THEN
Z <=I2;
ELSE
Z<=I3;
END IF;
END PROCESS P1;
END behave_MUX41c;
FIGURE 13.25 | VHDL code of 2
2
-to-1 MUX
13.11.2 | CASE Statement
The case statement executes one of several sequences of statements, based on the value of
a single expression. The syntax is given below:
CASE expression is
WHEN choices =>
sequential statements
WHEN choices ...