extra keys added to keyboard

This commit is contained in:
byrtolet 2018-10-27 19:56:14 +03:00
parent 7563cdb021
commit 134cd25c65
1 changed files with 35 additions and 2 deletions

View File

@ -27,7 +27,12 @@ port(
PS2DATA : in std_logic;
COL : in std_logic_vector(2 downto 0);
ROWbit : out std_logic_vector(7 downto 0)
ROWbit : out std_logic_vector(7 downto 0) ;
KEY_PG_UP : out std_logic;
KEY_PG_DOWN : out std_logic;
KEY_S_LOCK : out std_logic;
KEY_HOME : out std_logic;
KEY_END : out std_logic
);
end keyboard;
@ -43,6 +48,34 @@ architecture arch of keyboard is
begin
decode: process (CLK)
begin
if RESETn = '0' then
KEY_PG_UP <= '0';
KEY_PG_DOWN <= '0';
KEY_S_LOCK <= '0';
KEY_HOME <= '0';
KEY_END <= '0';
elsif rising_edge(CLK) then
if (MAT_WE = '1') then
if (ROM_A = x"7e") then
KEY_S_LOCK <=not MAT_wVAL;
elsif (ROM_A = x"fd") then
KEY_PG_UP <= not MAT_wVAL;
elsif (ROM_A = x"fa") then
KEY_PG_DOWN <= not MAT_wVAL;
elsif (ROM_A = x"ec") then
KEY_HOME <= not MAT_wVAL;
elsif (ROM_A = x"e9") then
KEY_END <= not MAT_wVAL;
end if;
end if;
end if;
end process;
PS2 : entity work.ps2key port map(
CLK => CLK,
RESETn => RESETn,
@ -82,4 +115,4 @@ begin
rROWbit => ROWbit
);
end arch;
end arch;