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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [Cyclone2/] [ram_2k.vhd] - Blame information for rev 123

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

Line No. Rev Author Line
1 116 dilbert57
library ieee;
2
use ieee.std_logic_1164.all;
3
use ieee.numeric_std.all;
4
 
5
entity ram_2k is
6
    Port (
7
       clk      : in  std_logic;
8
       rst      : in  std_logic;
9
       cs       : in  std_logic;
10
       rw       : in  std_logic;
11
       addr     : in  std_logic_vector (10 downto 0);
12
       data_in  : in  std_logic_vector (7 downto 0);
13
       data_out : out std_logic_vector (7 downto 0)
14
    );
15
end ram_2k;
16
 
17
architecture SYN of ram_2k is
18
signal we       : std_logic;
19
 
20
begin
21
 
22
        we <= cs and (not rw) and (not rst);
23
 
24
        ram_inst : entity work.spram
25
                generic map
26
                (
27
                        INIT_FILE => "char_rom.mif",
28
                        WORD_COUNT => 2048,
29
                        ADDR_WIDTH => 11
30
                )
31
                port map
32
                (
33
                        clk                     => clk,
34
                        addr            => addr,
35
                        wren            => we,
36
                        data_in         => data_in,
37
                        data_out        => data_out
38
                );
39
 
40
end SYN;

powered by: WebSVN 2.1.0

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