Professional Documents
Culture Documents
RAIPUR, CHHATTISGARH
VLSI (LAB)
NAME: SOUMYA CHOUBEY
TELECOMMUNICATION (2016-2020)
EXPERIMENT 6
Design 16:1 Mux using Generator Statement
Raipur, Chhattisgarh
1.OBJECT: To Design 16:1 Multiplexer Using Generate Statement and Implementation
in FPGA.
3. THEORY :
Multiplexer is a combinational circuit that has maximum of 2n data inputs, ‘n’ selection
lines and single output line. One of these data inputs will be connected to the output
based on the values of selection lines.Since there are ‘n’ selection lines, there will be
2n possible combinations of zeros and ones. So, each combination will select only one
data input. Multiplexer is also called as Mux.
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Mux_16 is
port
(
Data_In :in std_logic_vector(15 downto 0);
Select_In :in std_logic_vector(3 downto 0);
Data_Out :out std_logic
);
end Mux_16;
--Stage 1 Mapping
--Stage 2 Mapping
U_Mux_4_2:Mux_4
port map
(
Data_In => S_Data_Out,
Select_In => Select_In(3 Downto 2),
Data_Out => Data_Out
);
end Behavioral;
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity Mux_4 is
port
(
Data_In :in std_logic_vector(3 downto 0);
Select_In :in std_logic_vector(1 downto 0);
Data_Out :out std_logic
);
end Mux_4;
begin
--------------------------------------------------------------------
--Data Out is implemented using basic principle of the Mux as Shown
-- Select line | Data_Out
-- 00 | Data_In(3)
-- 01 | Data_In(2)
-- 10 | Data_In(1)
-- 11 | Data_In(0)
--------------------------------------------------------------------
end Behavioral;
5. SCHEMATIC VIEW
6. CONCLUSION:
Hence, we got designed the 16:1 multiplexer using generator statement which give the
designer the ability to create replicated structures, or select between multiple
representations of a model. Here we used four 4:1 mux to implement 16:1 mux and hence
due to replication of 4:1 mux model we used the Generator statement for the ease to design
16:1 and shorten the code for the program and make it efficient