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

Subversion Repositories eus100lx

[/] [eus100lx/] [trunk/] [fpga/] [picoblaze-asm/] [rom_form.vhd] - Blame information for rev 6

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 freza
ROM_form.vhd
2
 
3
Ken Chapman (Xilinx Ltd) July 2003
4
 
5
This is the VHDL template file for the KCPSM3 assembler.
6
It is used to configure a Spartan-3, Virtex-II or Virtex-IIPRO block RAM to act as
7
a single port program ROM.
8
 
9
This VHDL file is not valid as input directly into a synthesis or simulation tool.
10
The assembler will read this template and insert the data required to complete the
11
definition of program ROM and write it out to a new '.vhd' file associated with the
12
name of the original '.psm' file being assembled.
13
 
14
This template can be modified to define alternative memory definitions such as dual port.
15
However, you are responsible for ensuring the template is correct as the assembler does
16
not perform any checking of the VHDL.
17
 
18
The assembler identifies all text enclosed by {} characters, and replaces these
19
character strings. All templates should include these {} character strings for
20
the assembler to work correctly.
21
 
22
****************************************************************************************
23
 
24
This template defines a block RAM configured in 1024 x 18-bit single port mode and
25
conneceted to act as a single port ROM.
26
 
27
****************************************************************************************
28
 
29
The next line is used to determine where the template actually starts and must exist.
30
{begin template}
31
--
32
-- Definition of a single port ROM for KCPSM3 program defined by {name}.psm
33
--
34
-- Generated by KCPSM3 Assembler {timestamp}. 
35
--
36
-- Standard IEEE libraries
37
--
38
library IEEE;
39
use IEEE.STD_LOGIC_1164.ALL;
40
use IEEE.STD_LOGIC_ARITH.ALL;
41
use IEEE.STD_LOGIC_UNSIGNED.ALL;
42
--
43
-- The Unisim Library is used to define Xilinx primitives. It is also used during
44
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
45
--  
46
library unisim;
47
use unisim.vcomponents.all;
48
--
49
--
50
entity {name} is
51
Port (
52
      BRAM_DATA         : in    std_logic_vector(17 downto 0);
53
      BRAM_ADDR         : in    std_logic_vector(9 downto 0);
54
      BRAM_EN           : in    std_logic;
55
      address           : in    std_logic_vector(9 downto 0);
56
      instruction       : out   std_logic_vector(17 downto 0);
57
      clk               : in    std_logic);
58
End {name};
59
--
60
architecture low_level_definition of {name} is
61
--
62
-- Attributes to define ROM contents during implementation synthesis. 
63
-- The information is repeated in the generic map for functional simulation
64
--
65
attribute INIT_00 : string;
66
attribute INIT_01 : string;
67
attribute INIT_02 : string;
68
attribute INIT_03 : string;
69
attribute INIT_04 : string;
70
attribute INIT_05 : string;
71
attribute INIT_06 : string;
72
attribute INIT_07 : string;
73
attribute INIT_08 : string;
74
attribute INIT_09 : string;
75
attribute INIT_0A : string;
76
attribute INIT_0B : string;
77
attribute INIT_0C : string;
78
attribute INIT_0D : string;
79
attribute INIT_0E : string;
80
attribute INIT_0F : string;
81
attribute INIT_10 : string;
82
attribute INIT_11 : string;
83
attribute INIT_12 : string;
84
attribute INIT_13 : string;
85
attribute INIT_14 : string;
86
attribute INIT_15 : string;
87
attribute INIT_16 : string;
88
attribute INIT_17 : string;
89
attribute INIT_18 : string;
90
attribute INIT_19 : string;
91
attribute INIT_1A : string;
92
attribute INIT_1B : string;
93
attribute INIT_1C : string;
94
attribute INIT_1D : string;
95
attribute INIT_1E : string;
96
attribute INIT_1F : string;
97
attribute INIT_20 : string;
98
attribute INIT_21 : string;
99
attribute INIT_22 : string;
100
attribute INIT_23 : string;
101
attribute INIT_24 : string;
102
attribute INIT_25 : string;
103
attribute INIT_26 : string;
104
attribute INIT_27 : string;
105
attribute INIT_28 : string;
106
attribute INIT_29 : string;
107
attribute INIT_2A : string;
108
attribute INIT_2B : string;
109
attribute INIT_2C : string;
110
attribute INIT_2D : string;
111
attribute INIT_2E : string;
112
attribute INIT_2F : string;
113
attribute INIT_30 : string;
114
attribute INIT_31 : string;
115
attribute INIT_32 : string;
116
attribute INIT_33 : string;
117
attribute INIT_34 : string;
118
attribute INIT_35 : string;
119
attribute INIT_36 : string;
120
attribute INIT_37 : string;
121
attribute INIT_38 : string;
122
attribute INIT_39 : string;
123
attribute INIT_3A : string;
124
attribute INIT_3B : string;
125
attribute INIT_3C : string;
126
attribute INIT_3D : string;
127
attribute INIT_3E : string;
128
attribute INIT_3F : string;
129
attribute INITP_00 : string;
130
attribute INITP_01 : string;
131
attribute INITP_02 : string;
132
attribute INITP_03 : string;
133
attribute INITP_04 : string;
134
attribute INITP_05 : string;
135
attribute INITP_06 : string;
136
attribute INITP_07 : string;
137
--
138
-- Attributes to define ROM contents during implementation synthesis.
139
--
140
attribute INIT_00 of ram_1024_x_18  : label is "{INIT_00}";
141
attribute INIT_01 of ram_1024_x_18  : label is "{INIT_01}";
142
attribute INIT_02 of ram_1024_x_18  : label is "{INIT_02}";
143
attribute INIT_03 of ram_1024_x_18  : label is "{INIT_03}";
144
attribute INIT_04 of ram_1024_x_18  : label is "{INIT_04}";
145
attribute INIT_05 of ram_1024_x_18  : label is "{INIT_05}";
146
attribute INIT_06 of ram_1024_x_18  : label is "{INIT_06}";
147
attribute INIT_07 of ram_1024_x_18  : label is "{INIT_07}";
148
attribute INIT_08 of ram_1024_x_18  : label is "{INIT_08}";
149
attribute INIT_09 of ram_1024_x_18  : label is "{INIT_09}";
150
attribute INIT_0A of ram_1024_x_18  : label is "{INIT_0A}";
151
attribute INIT_0B of ram_1024_x_18  : label is "{INIT_0B}";
152
attribute INIT_0C of ram_1024_x_18  : label is "{INIT_0C}";
153
attribute INIT_0D of ram_1024_x_18  : label is "{INIT_0D}";
154
attribute INIT_0E of ram_1024_x_18  : label is "{INIT_0E}";
155
attribute INIT_0F of ram_1024_x_18  : label is "{INIT_0F}";
156
attribute INIT_10 of ram_1024_x_18  : label is "{INIT_10}";
157
attribute INIT_11 of ram_1024_x_18  : label is "{INIT_11}";
158
attribute INIT_12 of ram_1024_x_18  : label is "{INIT_12}";
159
attribute INIT_13 of ram_1024_x_18  : label is "{INIT_13}";
160
attribute INIT_14 of ram_1024_x_18  : label is "{INIT_14}";
161
attribute INIT_15 of ram_1024_x_18  : label is "{INIT_15}";
162
attribute INIT_16 of ram_1024_x_18  : label is "{INIT_16}";
163
attribute INIT_17 of ram_1024_x_18  : label is "{INIT_17}";
164
attribute INIT_18 of ram_1024_x_18  : label is "{INIT_18}";
165
attribute INIT_19 of ram_1024_x_18  : label is "{INIT_19}";
166
attribute INIT_1A of ram_1024_x_18  : label is "{INIT_1A}";
167
attribute INIT_1B of ram_1024_x_18  : label is "{INIT_1B}";
168
attribute INIT_1C of ram_1024_x_18  : label is "{INIT_1C}";
169
attribute INIT_1D of ram_1024_x_18  : label is "{INIT_1D}";
170
attribute INIT_1E of ram_1024_x_18  : label is "{INIT_1E}";
171
attribute INIT_1F of ram_1024_x_18  : label is "{INIT_1F}";
172
attribute INIT_20 of ram_1024_x_18  : label is "{INIT_20}";
173
attribute INIT_21 of ram_1024_x_18  : label is "{INIT_21}";
174
attribute INIT_22 of ram_1024_x_18  : label is "{INIT_22}";
175
attribute INIT_23 of ram_1024_x_18  : label is "{INIT_23}";
176
attribute INIT_24 of ram_1024_x_18  : label is "{INIT_24}";
177
attribute INIT_25 of ram_1024_x_18  : label is "{INIT_25}";
178
attribute INIT_26 of ram_1024_x_18  : label is "{INIT_26}";
179
attribute INIT_27 of ram_1024_x_18  : label is "{INIT_27}";
180
attribute INIT_28 of ram_1024_x_18  : label is "{INIT_28}";
181
attribute INIT_29 of ram_1024_x_18  : label is "{INIT_29}";
182
attribute INIT_2A of ram_1024_x_18  : label is "{INIT_2A}";
183
attribute INIT_2B of ram_1024_x_18  : label is "{INIT_2B}";
184
attribute INIT_2C of ram_1024_x_18  : label is "{INIT_2C}";
185
attribute INIT_2D of ram_1024_x_18  : label is "{INIT_2D}";
186
attribute INIT_2E of ram_1024_x_18  : label is "{INIT_2E}";
187
attribute INIT_2F of ram_1024_x_18  : label is "{INIT_2F}";
188
attribute INIT_30 of ram_1024_x_18  : label is "{INIT_30}";
189
attribute INIT_31 of ram_1024_x_18  : label is "{INIT_31}";
190
attribute INIT_32 of ram_1024_x_18  : label is "{INIT_32}";
191
attribute INIT_33 of ram_1024_x_18  : label is "{INIT_33}";
192
attribute INIT_34 of ram_1024_x_18  : label is "{INIT_34}";
193
attribute INIT_35 of ram_1024_x_18  : label is "{INIT_35}";
194
attribute INIT_36 of ram_1024_x_18  : label is "{INIT_36}";
195
attribute INIT_37 of ram_1024_x_18  : label is "{INIT_37}";
196
attribute INIT_38 of ram_1024_x_18  : label is "{INIT_38}";
197
attribute INIT_39 of ram_1024_x_18  : label is "{INIT_39}";
198
attribute INIT_3A of ram_1024_x_18  : label is "{INIT_3A}";
199
attribute INIT_3B of ram_1024_x_18  : label is "{INIT_3B}";
200
attribute INIT_3C of ram_1024_x_18  : label is "{INIT_3C}";
201
attribute INIT_3D of ram_1024_x_18  : label is "{INIT_3D}";
202
attribute INIT_3E of ram_1024_x_18  : label is "{INIT_3E}";
203
attribute INIT_3F of ram_1024_x_18  : label is "{INIT_3F}";
204
attribute INITP_00 of ram_1024_x_18 : label is "{INITP_00}";
205
attribute INITP_01 of ram_1024_x_18 : label is "{INITP_01}";
206
attribute INITP_02 of ram_1024_x_18 : label is "{INITP_02}";
207
attribute INITP_03 of ram_1024_x_18 : label is "{INITP_03}";
208
attribute INITP_04 of ram_1024_x_18 : label is "{INITP_04}";
209
attribute INITP_05 of ram_1024_x_18 : label is "{INITP_05}";
210
attribute INITP_06 of ram_1024_x_18 : label is "{INITP_06}";
211
attribute INITP_07 of ram_1024_x_18 : label is "{INITP_07}";
212
--
213
begin
214
--
215
  --Instantiate the Xilinx primitive for a block RAM
216
  ram_1024_x_18: RAMB16_S18_S18
217
  --synthesis translate_off
218
  --INIT values repeated to define contents for functional simulation
219
  generic map ( INIT_00 => X"{INIT_00}",
220
                INIT_01 => X"{INIT_01}",
221
                INIT_02 => X"{INIT_02}",
222
                INIT_03 => X"{INIT_03}",
223
                INIT_04 => X"{INIT_04}",
224
                INIT_05 => X"{INIT_05}",
225
                INIT_06 => X"{INIT_06}",
226
                INIT_07 => X"{INIT_07}",
227
                INIT_08 => X"{INIT_08}",
228
                INIT_09 => X"{INIT_09}",
229
                INIT_0A => X"{INIT_0A}",
230
                INIT_0B => X"{INIT_0B}",
231
                INIT_0C => X"{INIT_0C}",
232
                INIT_0D => X"{INIT_0D}",
233
                INIT_0E => X"{INIT_0E}",
234
                INIT_0F => X"{INIT_0F}",
235
                INIT_10 => X"{INIT_10}",
236
                INIT_11 => X"{INIT_11}",
237
                INIT_12 => X"{INIT_12}",
238
                INIT_13 => X"{INIT_13}",
239
                INIT_14 => X"{INIT_14}",
240
                INIT_15 => X"{INIT_15}",
241
                INIT_16 => X"{INIT_16}",
242
                INIT_17 => X"{INIT_17}",
243
                INIT_18 => X"{INIT_18}",
244
                INIT_19 => X"{INIT_19}",
245
                INIT_1A => X"{INIT_1A}",
246
                INIT_1B => X"{INIT_1B}",
247
                INIT_1C => X"{INIT_1C}",
248
                INIT_1D => X"{INIT_1D}",
249
                INIT_1E => X"{INIT_1E}",
250
                INIT_1F => X"{INIT_1F}",
251
                INIT_20 => X"{INIT_20}",
252
                INIT_21 => X"{INIT_21}",
253
                INIT_22 => X"{INIT_22}",
254
                INIT_23 => X"{INIT_23}",
255
                INIT_24 => X"{INIT_24}",
256
                INIT_25 => X"{INIT_25}",
257
                INIT_26 => X"{INIT_26}",
258
                INIT_27 => X"{INIT_27}",
259
                INIT_28 => X"{INIT_28}",
260
                INIT_29 => X"{INIT_29}",
261
                INIT_2A => X"{INIT_2A}",
262
                INIT_2B => X"{INIT_2B}",
263
                INIT_2C => X"{INIT_2C}",
264
                INIT_2D => X"{INIT_2D}",
265
                INIT_2E => X"{INIT_2E}",
266
                INIT_2F => X"{INIT_2F}",
267
                INIT_30 => X"{INIT_30}",
268
                INIT_31 => X"{INIT_31}",
269
                INIT_32 => X"{INIT_32}",
270
                INIT_33 => X"{INIT_33}",
271
                INIT_34 => X"{INIT_34}",
272
                INIT_35 => X"{INIT_35}",
273
                INIT_36 => X"{INIT_36}",
274
                INIT_37 => X"{INIT_37}",
275
                INIT_38 => X"{INIT_38}",
276
                INIT_39 => X"{INIT_39}",
277
                INIT_3A => X"{INIT_3A}",
278
                INIT_3B => X"{INIT_3B}",
279
                INIT_3C => X"{INIT_3C}",
280
                INIT_3D => X"{INIT_3D}",
281
                INIT_3E => X"{INIT_3E}",
282
                INIT_3F => X"{INIT_3F}",
283
               INITP_00 => X"{INITP_00}",
284
               INITP_01 => X"{INITP_01}",
285
               INITP_02 => X"{INITP_02}",
286
               INITP_03 => X"{INITP_03}",
287
               INITP_04 => X"{INITP_04}",
288
               INITP_05 => X"{INITP_05}",
289
               INITP_06 => X"{INITP_06}",
290
               INITP_07 => X"{INITP_07}")
291
  --synthesis translate_on
292
  port map(  DIA     => "0000000000000000",
293
             DIPA    => "00",
294
             ENA     => '1',
295
             WEA     => '0',
296
             SSRA    => '0',
297
             CLKA    => clk,
298
             ADDRA   => address,
299
             DOA     => instruction(15 downto 0),
300
             DOPA    => instruction(17 downto 16),
301
--
302
             DIB     =>  BRAM_DATA(15 downto 0),
303
             DIPB    =>  BRAM_DATA(17 downto 16),
304
             ADDRB   =>  BRAM_ADDR,
305
             ENB     =>  BRAM_EN,
306
             WEB     =>  '1',
307
             SSRB    =>  '0',
308
             CLKB    =>  clk,
309
             DOB     =>  open,
310
             DOPB    =>  open);
311
--
312
end low_level_definition;
313
--
314
------------------------------------------------------------------------------------
315
--
316
-- END OF FILE {name}.vhd
317
--
318
------------------------------------------------------------------------------------
319
 

powered by: WebSVN 2.1.0

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