Question:

VHDL Program to implement 1:4 DeMultiplexer using If-Else statement.

Posted by Saradwata Bandyopadhyay on 01-03-2025

Tags : 1:4 demultiplexer Dataflow Modeling Model Sim if else program VHDL

Answer:

Here is the solution for the above question =>

                                      library IEEE;
use IEEE.STD_LOGIC_1164.all;
entity demultiplexer1_4 is
port(
din : in STD_LOGIC;
sel : in STD_LOGIC_VECTOR(1 downto 0);
dout : out STD_LOGIC_VECTOR (3 downto 0)
);
end demultiplexer1_4;
architecture demultiplexer1_4_arc of demultiplexer1_4 is
begin
demux : process (din,sel) is
begin
if (sel="00") then
dout <= din & "000";
elsif (sel="01") then
dout <= '0' & din & "00";
elsif (sel="10") then
dout <= "00" & din & '0';
else
dout <= "000" & din;
end if;
end process demux;
end demultiplexer1_4_arc;

You can directly download the Source Code and the Model Sim application from the links below =>

Add a Comment

Please Login to Comment.