Professional Documents
Culture Documents
code :
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_ARITH.ALL;
use IEEE.STD_LOGIC_UNSIGNED.ALL;
entity Decoder_1_16 is
Port (
input : in STD_LOGIC_VECTOR(3 downto 0);
enable : in STD_LOGIC;
outputs : out STD_LOGIC_VECTOR(15 downto 0)
);
end entity Decoder_1_16;
entity Decoder_1_16_TB is
end entity Decoder_1_16_TB;
component Decoder_1_16 is
Port (
input : in STD_LOGIC_VECTOR(3 downto 0);
enable : in STD_LOGIC;
outputs : out STD_LOGIC_VECTOR(15 downto 0)
);
end component;
begin
UUT: Decoder_1_16 port map (input, enable, outputs);
process
begin
-- Test case 1: Enable = '0'
input <= "1101";
enable <= '0';
wait for 10 ns;
-- End simulation
wait;
end process;
end architecture Behavioral;
bài 5
*code: