| 1 |
2 |
idiolatrie |
--------------------------------------------------------------------------------
|
| 2 |
|
|
-- PS2 Keyboard Controller --
|
| 3 |
|
|
--------------------------------------------------------------------------------
|
| 4 |
|
|
-- The controller does not distinguish extended and normal keys. Most of the --
|
| 5 |
|
|
-- practically relevant keys are without ambiguity. The controller ignores --
|
| 6 |
|
|
-- all unmapped keys (see ascii.vhd). --
|
| 7 |
|
|
-- --
|
| 8 |
|
|
-- REFERENCES --
|
| 9 |
|
|
-- --
|
| 10 |
|
|
-- [1] Chu Pong P., FPGA Prototyping By VHDL Examples, --
|
| 11 |
|
|
-- John Wiley & Sons Inc., Hoboken, New Jersy, 2008, --
|
| 12 |
|
|
-- ISBN: 978-0470185315 --
|
| 13 |
|
|
-- --
|
| 14 |
|
|
-- [2] Z80 System On A Chip --
|
| 15 |
|
|
-- <http://www.opencores.org/?do=project&who=z80soc> --
|
| 16 |
|
|
-- [3] Keyboard Scancode Table --
|
| 17 |
|
|
-- <http://www.computer-engineering.org/ps2keyboard/scancodes2.html> --
|
| 18 |
|
|
-- [4] PS2 Protocol --
|
| 19 |
|
|
-- <http://pcbheaven.com/wikipages/The_PS2_protocol/> --
|
| 20 |
|
|
-- --
|
| 21 |
|
|
--------------------------------------------------------------------------------
|
| 22 |
|
|
-- Copyright (C)2011 Mathias Hörtnagl <mathias.hoertnagl@gmail.comt> --
|
| 23 |
|
|
-- --
|
| 24 |
|
|
-- This program is free software: you can redistribute it and/or modify --
|
| 25 |
|
|
-- it under the terms of the GNU General Public License as published by --
|
| 26 |
|
|
-- the Free Software Foundation, either version 3 of the License, or --
|
| 27 |
|
|
-- (at your option) any later version. --
|
| 28 |
|
|
-- --
|
| 29 |
|
|
-- This program is distributed in the hope that it will be useful, --
|
| 30 |
|
|
-- but WITHOUT ANY WARRANTY; without even the implied warranty of --
|
| 31 |
|
|
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the --
|
| 32 |
|
|
-- GNU General Public License for more details. --
|
| 33 |
|
|
-- --
|
| 34 |
|
|
-- You should have received a copy of the GNU General Public License --
|
| 35 |
|
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>. --
|
| 36 |
|
|
--------------------------------------------------------------------------------
|
| 37 |
|
|
library ieee;
|
| 38 |
|
|
use ieee.std_logic_1164.all;
|
| 39 |
|
|
use ieee.numeric_std.all;
|
| 40 |
|
|
|
| 41 |
|
|
library work;
|
| 42 |
|
|
use work.iwb.all;
|
| 43 |
|
|
|
| 44 |
|
|
package ikeyb is
|
| 45 |
|
|
|
| 46 |
|
|
component keyb is
|
| 47 |
|
|
port(
|
| 48 |
|
|
si : in slave_in_t;
|
| 49 |
|
|
so : out slave_out_t;
|
| 50 |
|
|
-- Non-Wishbone Signals
|
| 51 |
|
|
PS2_CLK : in std_logic;
|
| 52 |
|
|
PS2_DATA : in std_logic;
|
| 53 |
|
|
intr : out std_logic
|
| 54 |
|
|
);
|
| 55 |
|
|
end component;
|
| 56 |
|
|
|
| 57 |
|
|
end ikeyb;
|