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

Subversion Repositories System09

[/] [System09/] [branches/] [mkfiles_rev1/] [rtl/] [Spartan2/] [keymap_rom512_b4.vhd] - Blame information for rev 95

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

Line No. Rev Author Line
1 19 dilbert57
---------------------------------------------------------
2
--
3
-- PS2 Keycode look up table
4
-- converts 7 bit key code to ASCII
5
-- Address bit 7 = CAPS Lock
6
-- Address bit 8 = Shift
7
--
8
-- J.E.Kent
9
-- 18th Oct 2004
10
--
11
library IEEE;
12
use IEEE.STD_LOGIC_1164.ALL;
13
use IEEE.STD_LOGIC_ARITH.ALL;
14
library unisim;
15
        use unisim.all;
16
 
17
entity key_b4 is
18
    Port (
19
       clk   : in  std_logic;
20
                 rst   : in  std_logic;
21
                 cs    : in  std_logic;
22
                 rw    : in  std_logic;
23
       addr  : in  std_logic_vector (8 downto 0);
24
       rdata : out std_logic_vector (7 downto 0);
25
       wdata : in  std_logic_vector (7 downto 0)
26
    );
27
end key_b4;
28
 
29
architecture rtl of key_b4 is
30
 
31
   component RAMB4_S8
32
    generic (
33
      INIT_00, INIT_01, INIT_02, INIT_03,
34
           INIT_04, INIT_05, INIT_06, INIT_07,
35
           INIT_08, INIT_09, INIT_0A, INIT_0B,
36
      INIT_0C, INIT_0D, INIT_0E, INIT_0F : bit_vector (255 downto 0)
37
    );
38
 
39
    port (
40
      clk : in std_logic;
41
                rst : in std_logic;
42
                en : in std_logic;
43
                we : in std_logic;
44
      addr : in std_logic_vector(8 downto 0);
45
      di : in std_logic_vector(7 downto 0);
46
      do : out std_logic_vector(7 downto 0)
47
    );
48
  end component RAMB4_S8;
49
 
50
signal we : std_logic;
51
 
52
begin
53
 
54
  ROM : RAMB4_S8
55
    generic map (
56
    INIT_00 => x"00327761737a0000003171000000000000600900000000000000000000000000",     -- 1F - 00
57
    INIT_01 => x"003837756a6d00000036796768626e0000357274667620000033346564786300",     -- 3F - 20
58
    INIT_02 => x"00005c005d0d000000003d5b00270000002d703b6c2f2e000039306f696b2c00",     -- 5F - 40
59
    INIT_03 => x"0000000000000000001b000000007f0000000000000000000008000000000000",     -- 7F - 60
60
 
61
    INIT_04 => x"00325741535a00000031510000000000007e0900000000000000000000000000",     -- 9F - 80
62
    INIT_05 => x"003837554a4d00000036594748424e0000355254465620000033344544584300",     -- BF - A0
63
    INIT_06 => x"00005c005d0d000000003d5b00270000002d503b4c2f2e000039304f494b2c00",     -- DF - C0
64
    INIT_07 => x"0000000000000000001b000000007f0000000000000000000008000000000000",     -- FF - E0
65
 
66
    INIT_08 => x"00405741535a00000021510000000000007e0900000000000000000000000000",     -- 1F - 00
67
    INIT_09 => x"002a26554a4d0000005e594748424e0000255254465620000023244544584300",     -- 3F - 20
68
    INIT_0A => x"00007c007d0d000000002b7b00220000005f503a4c3f3e000028294f494b3c00",     -- 5F - 40
69
    INIT_0B => x"0000000000000000001b000000007f0000000000000000000008000000000000",     -- 7F - 60
70
 
71
    INIT_0C => x"00407761737a0000002171000000000000600900000000000000000000000000",     -- 9F - 80
72
    INIT_0D => x"002a26756a6d0000005e796768626e0000257274667620000023246564786300",     -- BF - A0
73
    INIT_0E => x"00007c007d0d000000002b7b00220000005f703a6c3f3e000028296f696b3c00",     -- DF - C0
74
    INIT_0F => x"0000000000000000001b000000007f0000000000000000000008000000000000"      -- FF - E0
75
    )
76
 
77
    port map ( clk => clk,
78
                    en => cs,
79
                                   we => we,
80
                                   rst => rst,
81
                                   addr => addr,
82
               di => wdata,
83
                                   do => rdata
84
        );
85
 
86
 
87
my_ram_512 : process ( rw )
88
begin
89
         we    <= not rw;
90
end process;
91
 
92
end architecture rtl;
93
 

powered by: WebSVN 2.1.0

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