OpenCores
URL https://opencores.org/ocsvn/System09/System09/trunk

Subversion Repositories System09

[/] [System09/] [rev_86/] [rtl/] [Spartan2/] [keymap_rom_slice.vhd] - Blame information for rev 200

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 19 dilbert57
---------------------------------------------------------
2
-- keymap_rom_slice.vhd
3
--
4
-- PS2 Keycode look up table
5
-- converts 7 bit key code to ASCII
6
-- Address bit 7 = CAPS Lock
7
-- Address bit 8 = Shift
8
--
9
-- J.E.Kent
10
-- 18th Oct 2004
11
-- 28th Jan 2007 - made entity compatible with block RAM versions.
12
--      3rd Feb 2007 - initialized with Bit_vector
13
--
14
library IEEE;
15
use ieee.std_logic_1164.all;
16
use ieee.std_logic_arith.all;
17
use ieee.std_logic_unsigned.all;
18
 
19
entity keymap_rom is
20
    Port (
21
       clk   : in  std_logic;
22
       rst   : in  std_logic;
23
       cs    : in  std_logic;
24
       rw    : in  std_logic;
25
       addr  : in  std_logic_vector (8 downto 0);
26
       rdata : out std_logic_vector (7 downto 0);
27
       wdata : in  std_logic_vector (7 downto 0)
28
    );
29
end keymap_rom;
30
 
31
architecture rtl of keymap_rom is
32
  constant width   : integer := 8;
33
  constant memsize : integer := 512;
34
  signal rvect : std_logic_vector(255 downto 0);
35
 
36
  type rom_array is array(0 to 15) of std_logic_vector (255 downto 0);
37
 
38
  constant rom_data : rom_array :=
39
  (
40
    x"00327761737a0000003171000000000000600900000000000000000000000000",        -- 1F - 00
41
    x"003837756a6d00000036796768626e0000357274667620000033346564786300",        -- 3F - 20
42
    x"00005c005d0d000000003d5b00270000002d703b6c2f2e000039306f696b2c00",        -- 5F - 40
43
    x"0000000000000000001b000000007f0000000000000000000008000000000000",        -- 7F - 60
44
 
45
    x"00325741535a00000031510000000000007e0900000000000000000000000000",        -- 9F - 80
46
    x"003837554a4d00000036594748424e0000355254465620000033344544584300",        -- BF - A0
47
    x"00005c005d0d000000003d5b00270000002d503b4c2f2e000039304f494b2c00",        -- DF - C0
48
    x"0000000000000000001b000000007f0000000000000000000008000000000000",        -- FF - E0
49
 
50
    x"00405741535a00000021510000000000007e0900000000000000000000000000",        -- 1F - 00
51
    x"002a26554a4d0000005e594748424e0000255254465620000023244544584300",        -- 3F - 20
52
    x"00007c007d0d000000002b7b00220000005f503a4c3f3e000028294f494b3c00",        -- 5F - 40
53
    x"0000000000000000001b000000007f0000000000000000000008000000000000",        -- 7F - 60
54
 
55
    x"00407761737a0000002171000000000000600900000000000000000000000000",        -- 9F - 80
56
    x"002a26756a6d0000005e796768626e0000257274667620000023246564786300",        -- BF - A0
57
    x"00007c007d0d000000002b7b00220000005f703a6c3f3e000028296f696b3c00",        -- DF - C0
58
    x"0000000000000000001b000000007f0000000000000000000008000000000000"    -- FF - E0
59
  );
60
begin
61
 
62
   rvect <= rom_data(conv_integer(addr(8 downto 5)));
63
        rdata <= rvect( conv_integer(addr(4 downto 0))*8+7 downto conv_integer(addr(4 downto 0))*8);
64
end architecture rtl;
65
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.