Digital System Design
Digital System Design
Practical Examination(2020)
EE-330-F
library ieee;
use ieee.std_logic_1164.all;
entity MUX4_1 is
port ( Sel0,Sel1 : in std_logic;
A, B, C, D : in std_logic;
Y : out std_logic );
end MUX4_1;
component and3
port (a0,a1,a2: in std_logic;
aout:out std_logic);
end component;
component or4
port (r0,r1,r2,r3:in std_logic;
rout:out std_logic);
end component;
library IEEE;
use IEEE.std_logic_1164.all;
entity bejoy_1x4 is
port(s1,s2,data_in : in std_logic;
d1,d2,d3,d4 : out std_logic);
end bejoy_1x4;
component dmux
port(sx1,sx2,d : in std_logic;
z1,z2 : out std_logic);
end component;
begin
dmux1 : dmux port map(s1, s2, data_in, d1, d2);
dmux2 : dmux port map(not s1, s2, data_in, d3, d4);
end arc;
1:4 DEMUX (Behavioral style modelling)
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity DEMUX_SOURCE is
Port ( I : in STD_LOGIC;
S : in STD_LOGIC_VECTOR (1 downto 0);
Y : out STD_LOGIC_VECTOR (3 downto 0));
end DEMUX_SOURCE;
architecture Behavioral of DEMUX_SOURCE is
begin
process (I, S)
begin
if (S <= "00") then
Y(0) <= I ;
elsif (S <= "01") then
Y(1) <= I ;
elsif (S <= "10") then
Y(2) <= I ;
else
Y(3) <= I ;
end if;
end process; end Behavioral;
Thank You