Professional Documents
Culture Documents
Code: -
1. 8:1 Multiplexer
-- 8to1 mux
library ieee;
use ieee.std_logic_1164.all;
entity mux8to1 is
port (d : in std_logic_vector (7 downto 0);
s: in std_logic_vector (2 downto 0);
o : out std_logic);
end mux8to1;
2. 3:8 Decoder
--3 to 8 decoder
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity decoder1 is
Port (
A : in STD_LOGIC_VECTOR (2 downto 0);
Y : out STD_LOGIC_VECTOR (7 downto 0)
);
end decoder1;
Circuit Diagram: -
Waveform: -