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

Subversion Repositories mips_enhanced

[/] [mips_enhanced/] [trunk/] [grlib-gpl-1.0.19-b3188/] [lib/] [tech/] [eclipsee/] [simprims/] [eclipse.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 dimamali
 
2
library ieee;
3
use ieee.std_logic_1164.all;
4
 
5
package eclipse_components is
6
 
7
  component RAM128X18_25um is
8
   port (WA, RA : in std_logic_vector (6 downto 0);
9
         WD : in std_logic_vector (17 downto 0);
10
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
11
         RD : out std_logic_vector (17 downto 0) );
12
  end component;
13
 
14
  component RAM256X9_25um is
15
   port (WA, RA : in std_logic_vector (7 downto 0);
16
         WD : in std_logic_vector (8 downto 0);
17
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
18
         RD : out std_logic_vector (8 downto 0) );
19
  end component;
20
 
21
  component RAM512X4_25um
22
   port (WA, RA : in std_logic_vector (8 downto 0);
23
         WD : in std_logic_vector (3 downto 0);
24
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
25
         RD : out std_logic_vector (3 downto 0));
26
  end component;
27
 
28
  component RAM1024X2_25um is
29
  port (WA, RA : in std_logic_vector (9 downto 0);
30
        WD : in std_logic_vector (1 downto 0);
31
        WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
32
        RD : out std_logic_vector (1 downto 0) );
33
  end component;
34
 
35
end eclipse_components;
36
 
37
library ieee;
38
use ieee.std_logic_1164.all;
39
library grlib;
40
use grlib.stdlib.all;
41
 
42
entity eclipse_sim_ram is
43
   generic (abits : integer := 8; dbits : integer := 16);
44
   port (WA, RA : in std_logic_vector (abits-1 downto 0);
45
         WD : in std_logic_vector (dbits-1 downto 0);
46
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
47
         RD : out std_logic_vector (dbits-1 downto 0) );
48
end;
49
 
50
architecture arch of eclipse_sim_ram is
51
  type dregtype is array (0 to 2**abits - 1)
52
        of std_logic_vector(dbits -1 downto 0);
53
begin
54
 
55
  rp : process(rclk, wclk, re, ra, asyncrd)
56
  variable rfd : dregtype;
57
  begin
58
    if rising_edge(wclk) then
59
      if we = '1' then rfd(conv_integer(wa)) := WD; end if;
60
    end if;
61
    if (re = '1') and (ASYNCRD = '1') then
62
        RD <= rfd(conv_integer(ra));
63
    end if;
64
    if rising_edge(rclk) and (re = '1') and (ASYNCRD = '0') then
65
        RD <= rfd(conv_integer(ra));
66
    end if;
67
  end process;
68
 
69
end arch;
70
 
71
library ieee;
72
use ieee.std_logic_1164.all;
73
 
74
entity RAM128X18_25um is
75
   port (WA, RA : in std_logic_vector (6 downto 0);
76
         WD : in std_logic_vector (17 downto 0);
77
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
78
         RD : out std_logic_vector (17 downto 0) );
79
end RAM128X18_25um;
80
 
81
architecture arch of RAM128X18_25um is
82
begin
83
  x : entity work.eclipse_sim_ram generic map (7, 18)
84
      port map (wa, ra, wd, we, re, wclk, rclk, asyncrd, rd);
85
end arch;
86
 
87
library ieee;
88
use ieee.std_logic_1164.all;
89
 
90
entity RAM256X9_25um is
91
   port (WA, RA : in std_logic_vector (7 downto 0);
92
         WD : in std_logic_vector (8 downto 0);
93
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
94
         RD : out std_logic_vector (8 downto 0) );
95
end RAM256X9_25um;
96
 
97
architecture arch of RAM256X9_25um is
98
begin
99
  x : entity work.eclipse_sim_ram generic map (8, 9)
100
      port map (wa, ra, wd, we, re, wclk, rclk, asyncrd, rd);
101
end arch;
102
 
103
library ieee;
104
use ieee.std_logic_1164.all;
105
 
106
entity RAM512X4_25um is
107
   port (WA, RA : in std_logic_vector (8 downto 0);
108
         WD : in std_logic_vector (3 downto 0);
109
         WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
110
         RD : out std_logic_vector (3 downto 0));
111
end RAM512X4_25um;
112
 
113
architecture arch of RAM512X4_25um is
114
begin
115
  x : entity work.eclipse_sim_ram generic map (9, 4)
116
      port map (wa, ra, wd, we, re, wclk, rclk, asyncrd, rd);
117
end arch;
118
 
119
library ieee;
120
use ieee.std_logic_1164.all;
121
 
122
entity RAM1024X2_25um is
123
  port (WA, RA : in std_logic_vector (9 downto 0);
124
        WD : in std_logic_vector (1 downto 0);
125
        WE, RE, WCLK, RCLK, ASYNCRD : in std_logic;
126
        RD : out std_logic_vector (1 downto 0) );
127
end RAM1024X2_25um;
128
 
129
architecture arch of RAM1024X2_25um is
130
begin
131
  x : entity work.eclipse_sim_ram generic map (10, 2)
132
      port map (wa, ra, wd, we, re, wclk, rclk, asyncrd, rd);
133
end arch;

powered by: WebSVN 2.1.0

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