blob: 4307b380b168318d7742a63ddb8d5abc9eb6845f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
|
-- Common RAM library package
-- For MIPS specific RAM package: see pkg_ram.
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;
package ram is
-- Unconstrained 16 bit RAM initialization type
type ram16_init_t is array(natural range <>) of
unsigned(15 downto 0);
-- Unconstrained 32 bit RAM initialization type
type ram32_init_t is array(natural range <>) of
unsigned(31 downto 0);
component DPRAM16_init is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 16;
INIT_DATA : ram16_init_t;
SYN_RAMTYPE : string := "block_ram"
);
port (
clk : in std_logic;
-- Port A
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM16_init;
component DPRAM16_init_ce is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 16;
INIT_DATA : ram16_init_t;
SYN_RAMTYPE : string := "block_ram"
);
port (
clk : in std_logic;
-- Port A
a_ce : in std_logic;
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_ce : in std_logic;
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM16_init_ce;
component DPRAM16_init_hex_ce is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 16;
INIT_DATA : string := "mem.hex";
SYN_RAMTYPE : string := "block_ram"
);
port (
-- Port A
a_clk : in std_logic;
a_ce : in std_logic;
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_clk : in std_logic;
b_ce : in std_logic;
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM16_init_hex_ce;
component DPRAM_init_hex is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 32;
INIT_DATA : string := "mem32.hex";
SYN_RAMTYPE : string := "block_ram"
);
port (
clk : in std_logic;
-- Port A
a_ce : in std_logic;
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_ce : in std_logic;
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM_init_hex;
component DPRAM32_init is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 32;
INIT_DATA : ram32_init_t;
SYN_RAMTYPE : string := "block_ram"
);
port (
clk : in std_logic;
-- Port A
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM32_init;
component DPRAM is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 16;
EN_BYPASS : boolean := false;
SYN_RAMTYPE : string := "block_ram"
);
port (
clk : in std_logic;
-- Port A
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component DPRAM;
component DPRAM_clk2
generic(
ADDR_W : natural := 6;
DATA_W : natural := 16;
EN_BYPASS : boolean := true;
SYN_RAMTYPE : string := "block_ram"
);
port(
a_clk : in std_logic;
-- Port A
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_clk : in std_logic;
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0)
);
end component;
component bram_2psync is
generic (
ADDR_W : natural := 6;
DATA_W : natural := 16;
SYN_RAMTYPE : string := "block_ram"
);
port (
-- Port A
a_we : in std_logic;
a_addr : in unsigned(ADDR_W-1 downto 0);
a_write : in unsigned(DATA_W-1 downto 0);
a_read : out unsigned(DATA_W-1 downto 0);
-- Port B
b_we : in std_logic;
b_addr : in unsigned(ADDR_W-1 downto 0);
b_write : in unsigned(DATA_W-1 downto 0);
b_read : out unsigned(DATA_W-1 downto 0);
clk : in std_logic
);
end component bram_2psync;
end package;
|