Mux Lab
Mux Lab
In VHDL, the process statement contains sequential statements. Processes are only permitted inside an architecture. The
statements within processes execute sequentially, not concurrently. Processes can be written in a variety of ways
------------------------------------------------- --
Code:
library ieee;
use ieee.std_logic_1164.all;
-------------------------------------------------
entity mx22 is
);
end mx22;
-------------------------------------------------
process(I3,I2,I1,I0)
begin
case S is
end case;
end process;
end behv1;
use ieee.std_logic_1164.all;
entity mx22 is
A, B, C, D : in std_logic;
Y : out std_logic );
end mx22;
begin
process (Sel, A, B, C, D)
begin
end if ;
end process ;
end behavior1;
library ieee;
use ieee.std_logic_1164.all;
entity mx22 is
port (Sel : in std_logic_vector(1 downto 0);
A, B, C, D : in std_logic;
Y : out std_logic );
end mx22;
begin
process (Sel, A, B, C, D)
begin
case Sel is
end case ;
end process ;
end behavior2;
---------------------------------------------------------------------------------------------------------------
3-- Using conditional signal assignment :
library ieee;
use ieee.std_logic_1164.all;
entity mx22 is
A, B, C, D : in std_logic;
Y : out std_logic );
end mx22;
begin
end behavior3;
library ieee;
use ieee.std_logic_1164.all;
entity mx22 is
A, B, C, D : in std_logic;
Y : out std_logic );
end mx22;
B when "01",
C when "10",
D when "11",
A when others;
end behavior4;