In: Physics
Develop an I/O port decoder, using a PLD, that generates 16-bit I/O strobes for the following 16-bit I/O port addresses: 1000H-1001H, 1002H-103H, 1004H-1005H, 1006H-1007H, 1008H-1009H, 100AH-100BH, 100CH-100DH, and 100EH-100FH.
library ieee;
use ieee.std_logic_1164.all;
entity decoder_16 is
port ( address_io : in std_logic_vector (15 downto 0);
strobe : out std_logic_vector (15 downto 0)
);
end decoder_16;
architecture arch of decoder_16 is
begin
process (address_io)
begin
case (address_io) is
when x"1000" => strobe <= x"8000";
when x"1001" => strobe <= x"4000";
when x"1002" => strobe <= x"2000";
when x"1003" => strobe <= x"1000";
when x"1004" => strobe <= x"0800";
when x"1005" => strobe <= x"0400";
when x"1006" => strobe <= x"0200";
when x"1007" => strobe <= x"0100";
when x"1008" => strobe <= x"0080";
when x"1009" => strobe <= x"0040";
when x"100A" => strobe <= x"0020";
when x"100B" => strobe <= x"0010";
when x"100C" => strobe <= x"0008";
when x"100D" => strobe <= x"0004";
when x"100E" => strobe <= x"0002";
when x"100F" => strobe <= x"0001";
when others => null;
end case;
end process;
end arch;