Synthesis of De-Multiplexers using VHDL VHDL Lab by Ravinder Nath Rajotiya - August 11, 2019August 11, 20190 Share on Facebook Share Send email Mail Print Print Table of Contents Toggle Write VHDL programs for synthesizing of DeMultiplexer Objective:Theory:Dataflow Modelingbehavioural Modeling Write VHDL programs for synthesizing of DeMultiplexer Objective: To learn the VHDL coding for Demultiplexer To understand the behavior of Demultiplexer To synthesize and simulate Demultiplexer Theory: A de-multiplexer is a combinational circuit that behavior opposite to a multiplexer. It has a single input, ‘S’ control inputs and 2S as output lines. Only one of the output will be activated by the control / selection lines and the input I will be transferred on the selected output line. Figure below shows the block diagram of the demultiplexer Figure:- Symbol of DeMultiplexer Output equations: Y0 = I.(S1’.S0’ ) Y1 = I.(S1’.S0) Y2 = I.(S1.S0’ ) Y3 = I.(S1.S0 ) VHDL Code using different styles of Modelling Dataflow Modeling entity DeMux is Port ( I : in STD_LOGIC; S : in STD_LOGIC_VECTOR (1 downto 0); Y : out STD_LOGIC_VECTOR (3 downto 0) ); end DeMux; architecture dataflow of DeMux is begin Y(0) <= I and (not S(1) ) and (not s(0)); Y(1) <= I and (not S(1) ) and (s(0)); Y(2) <= I and (S(1) ) and (not s(0)); Y(3) <= I and (S(1) ) and (s(0)); end dataflow; TEST BENCH LIBRARY ieee; USE ieee.std_logic_1164.ALL; ENTITY DeMux_tb IS END DeMux_tb; ARCHITECTURE behavior OF DeMux_tb IS — Component Declaration for the Unit Under Test (UUT) COMPONENT DeMux PORT( I : IN std_logic; S : IN std_logic_vector(1 downto 0); Y : OUT std_logic_vector(3 downto 0) ); END COMPONENT; –Inputs signal I : std_logic := ‘0’; signal S : std_logic_vector(1 downto 0) := (others => ‘0’); –Outputs signal Y : std_logic_vector(3 downto 0); BEGIN — Instantiate the Unit Under Test (UUT) uut: DeMux PORT MAP ( I => I, S => S, Y => Y ); — Stimulus process stim_proc: process begin — insert stimulus here wait for 100 ns; I <= ‘0’; S<= “00”; wait for 100 ns; I <= ‘1’; S<= “01”; wait for 100 ns; I <= ‘0’; S<= “10”; wait for 100 ns; I <= ‘1’; S<= “11”; wait; end process; END; Simulation Figure: Simulation behavioural Modeling Behavioural Modelling of De-Mux VHDL CODE library IEEE; use IEEE.STD_LOGIC_1164.ALL; entity DeMux is Port ( I : in STD_LOGIC; S : in STD_LOGIC_VECTOR (1 downto 0); Y : out STD_LOGIC_VECTOR (3 downto 0) ); end DeMux; architecture Behavioral of DeMux is begin process(S,I) begin if (S=”00″) then Y <= “000”&I; elsif (S=”01″) then Y <= “00”&I&’0′; elsif (S=”10″) then Y <= ‘0’&I&”00″; else Y<= I&”000″; end if; end process; end Behavioral; SIMMULATION using ISIM Figure: Simulation of DeMux Share on Facebook Share Send email Mail Print Print