Experiment-5: Aim: To Write VHDL Code For 4 To 1 MUX and Observe The Waveform and Synthesize The Code
Experiment-5: Aim: To Write VHDL Code For 4 To 1 MUX and Observe The Waveform and Synthesize The Code
Aim: To write VHDL code for 4 to 1 MUX and observe the waveform and synthesize the code
with technological library with given Constraints.
Apparatus: Modelsim PE Student Edition 10.1 Software.
Theory:
A multiplexer is a circuit that accept many inputs but give only one output. A multiplexer is a
circuit used to select and route any one of the several input signals to a signal output. A simple
example of a non-electronic circuit of a multiplexer is a single pole multiposition switch. The
multiplexer used for digital applications, also called digital multiplexer, is a circuit with many
input but only one output. By applying control signals, we can steer any input to the output. Few
types of multiplexer are 2-to-1, 4-to-1, 8-to-1, 16-to-1 multiplexer.
4-to-1 Multiplexer:
The 4-to-1 multiplexer has 4 input bit, 2 control bits, and 1 output bit. The four input bits are D0,
D1, D2 and D3. only one of this is transmitted to the output Y. The output depends on the value of
S0, S1 which is the control input. The control input determines which of the input data bit is
transmitted to the output.
For instance, as shown in figure 5.1 when S0 and S1 = 00, the upper AND gate is enabled while
all other AND gates are disabled. Therefore, data bit D0 is transmitted to the output, giving Y =
Do. If the control input is changed to S0 S1 =11, all gates are disabled except the bottom AND
gate. In this case, D3 is transmitted to the output and Y = D3.
ENTITY MUX IS
PORT (A,B,C,D: IN STD_LOGIC_VECTOR(3 DOWNTO 0); S: IN STD_LOGIC_VECTOR(1
DOWNTO 0); Y: OUT STD_LOGIC_VECTOR(3 DOWNTO 0));
END MUX;