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

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [sw/] [code/] [kcpsm/] [stack_test/] [ROM_form.vhd] - Blame information for rev 69

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

Line No. Rev Author Line
1 2 ameziti
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 (      address : in std_logic_vector(9 downto 0);
52
            instruction : out std_logic_vector(17 downto 0);
53
                    clk : in std_logic);
54
    end {name};
55
--
56
architecture low_level_definition of {name} is
57
--
58
-- Attributes to define ROM contents during implementation synthesis. 
59
-- The information is repeated in the generic map for functional simulation
60
--
61
attribute INIT_00 : string;
62
attribute INIT_01 : string;
63
attribute INIT_02 : string;
64
attribute INIT_03 : string;
65
attribute INIT_04 : string;
66
attribute INIT_05 : string;
67
attribute INIT_06 : string;
68
attribute INIT_07 : string;
69
attribute INIT_08 : string;
70
attribute INIT_09 : string;
71
attribute INIT_0A : string;
72
attribute INIT_0B : string;
73
attribute INIT_0C : string;
74
attribute INIT_0D : string;
75
attribute INIT_0E : string;
76
attribute INIT_0F : string;
77
attribute INIT_10 : string;
78
attribute INIT_11 : string;
79
attribute INIT_12 : string;
80
attribute INIT_13 : string;
81
attribute INIT_14 : string;
82
attribute INIT_15 : string;
83
attribute INIT_16 : string;
84
attribute INIT_17 : string;
85
attribute INIT_18 : string;
86
attribute INIT_19 : string;
87
attribute INIT_1A : string;
88
attribute INIT_1B : string;
89
attribute INIT_1C : string;
90
attribute INIT_1D : string;
91
attribute INIT_1E : string;
92
attribute INIT_1F : string;
93
attribute INIT_20 : string;
94
attribute INIT_21 : string;
95
attribute INIT_22 : string;
96
attribute INIT_23 : string;
97
attribute INIT_24 : string;
98
attribute INIT_25 : string;
99
attribute INIT_26 : string;
100
attribute INIT_27 : string;
101
attribute INIT_28 : string;
102
attribute INIT_29 : string;
103
attribute INIT_2A : string;
104
attribute INIT_2B : string;
105
attribute INIT_2C : string;
106
attribute INIT_2D : string;
107
attribute INIT_2E : string;
108
attribute INIT_2F : string;
109
attribute INIT_30 : string;
110
attribute INIT_31 : string;
111
attribute INIT_32 : string;
112
attribute INIT_33 : string;
113
attribute INIT_34 : string;
114
attribute INIT_35 : string;
115
attribute INIT_36 : string;
116
attribute INIT_37 : string;
117
attribute INIT_38 : string;
118
attribute INIT_39 : string;
119
attribute INIT_3A : string;
120
attribute INIT_3B : string;
121
attribute INIT_3C : string;
122
attribute INIT_3D : string;
123
attribute INIT_3E : string;
124
attribute INIT_3F : string;
125
attribute INITP_00 : string;
126
attribute INITP_01 : string;
127
attribute INITP_02 : string;
128
attribute INITP_03 : string;
129
attribute INITP_04 : string;
130
attribute INITP_05 : string;
131
attribute INITP_06 : string;
132
attribute INITP_07 : string;
133
--
134
-- Attributes to define ROM contents during implementation synthesis.
135
--
136
attribute INIT_00 of ram_1024_x_18  : label is "{INIT_00}";
137
attribute INIT_01 of ram_1024_x_18  : label is "{INIT_01}";
138
attribute INIT_02 of ram_1024_x_18  : label is "{INIT_02}";
139
attribute INIT_03 of ram_1024_x_18  : label is "{INIT_03}";
140
attribute INIT_04 of ram_1024_x_18  : label is "{INIT_04}";
141
attribute INIT_05 of ram_1024_x_18  : label is "{INIT_05}";
142
attribute INIT_06 of ram_1024_x_18  : label is "{INIT_06}";
143
attribute INIT_07 of ram_1024_x_18  : label is "{INIT_07}";
144
attribute INIT_08 of ram_1024_x_18  : label is "{INIT_08}";
145
attribute INIT_09 of ram_1024_x_18  : label is "{INIT_09}";
146
attribute INIT_0A of ram_1024_x_18  : label is "{INIT_0A}";
147
attribute INIT_0B of ram_1024_x_18  : label is "{INIT_0B}";
148
attribute INIT_0C of ram_1024_x_18  : label is "{INIT_0C}";
149
attribute INIT_0D of ram_1024_x_18  : label is "{INIT_0D}";
150
attribute INIT_0E of ram_1024_x_18  : label is "{INIT_0E}";
151
attribute INIT_0F of ram_1024_x_18  : label is "{INIT_0F}";
152
attribute INIT_10 of ram_1024_x_18  : label is "{INIT_10}";
153
attribute INIT_11 of ram_1024_x_18  : label is "{INIT_11}";
154
attribute INIT_12 of ram_1024_x_18  : label is "{INIT_12}";
155
attribute INIT_13 of ram_1024_x_18  : label is "{INIT_13}";
156
attribute INIT_14 of ram_1024_x_18  : label is "{INIT_14}";
157
attribute INIT_15 of ram_1024_x_18  : label is "{INIT_15}";
158
attribute INIT_16 of ram_1024_x_18  : label is "{INIT_16}";
159
attribute INIT_17 of ram_1024_x_18  : label is "{INIT_17}";
160
attribute INIT_18 of ram_1024_x_18  : label is "{INIT_18}";
161
attribute INIT_19 of ram_1024_x_18  : label is "{INIT_19}";
162
attribute INIT_1A of ram_1024_x_18  : label is "{INIT_1A}";
163
attribute INIT_1B of ram_1024_x_18  : label is "{INIT_1B}";
164
attribute INIT_1C of ram_1024_x_18  : label is "{INIT_1C}";
165
attribute INIT_1D of ram_1024_x_18  : label is "{INIT_1D}";
166
attribute INIT_1E of ram_1024_x_18  : label is "{INIT_1E}";
167
attribute INIT_1F of ram_1024_x_18  : label is "{INIT_1F}";
168
attribute INIT_20 of ram_1024_x_18  : label is "{INIT_20}";
169
attribute INIT_21 of ram_1024_x_18  : label is "{INIT_21}";
170
attribute INIT_22 of ram_1024_x_18  : label is "{INIT_22}";
171
attribute INIT_23 of ram_1024_x_18  : label is "{INIT_23}";
172
attribute INIT_24 of ram_1024_x_18  : label is "{INIT_24}";
173
attribute INIT_25 of ram_1024_x_18  : label is "{INIT_25}";
174
attribute INIT_26 of ram_1024_x_18  : label is "{INIT_26}";
175
attribute INIT_27 of ram_1024_x_18  : label is "{INIT_27}";
176
attribute INIT_28 of ram_1024_x_18  : label is "{INIT_28}";
177
attribute INIT_29 of ram_1024_x_18  : label is "{INIT_29}";
178
attribute INIT_2A of ram_1024_x_18  : label is "{INIT_2A}";
179
attribute INIT_2B of ram_1024_x_18  : label is "{INIT_2B}";
180
attribute INIT_2C of ram_1024_x_18  : label is "{INIT_2C}";
181
attribute INIT_2D of ram_1024_x_18  : label is "{INIT_2D}";
182
attribute INIT_2E of ram_1024_x_18  : label is "{INIT_2E}";
183
attribute INIT_2F of ram_1024_x_18  : label is "{INIT_2F}";
184
attribute INIT_30 of ram_1024_x_18  : label is "{INIT_30}";
185
attribute INIT_31 of ram_1024_x_18  : label is "{INIT_31}";
186
attribute INIT_32 of ram_1024_x_18  : label is "{INIT_32}";
187
attribute INIT_33 of ram_1024_x_18  : label is "{INIT_33}";
188
attribute INIT_34 of ram_1024_x_18  : label is "{INIT_34}";
189
attribute INIT_35 of ram_1024_x_18  : label is "{INIT_35}";
190
attribute INIT_36 of ram_1024_x_18  : label is "{INIT_36}";
191
attribute INIT_37 of ram_1024_x_18  : label is "{INIT_37}";
192
attribute INIT_38 of ram_1024_x_18  : label is "{INIT_38}";
193
attribute INIT_39 of ram_1024_x_18  : label is "{INIT_39}";
194
attribute INIT_3A of ram_1024_x_18  : label is "{INIT_3A}";
195
attribute INIT_3B of ram_1024_x_18  : label is "{INIT_3B}";
196
attribute INIT_3C of ram_1024_x_18  : label is "{INIT_3C}";
197
attribute INIT_3D of ram_1024_x_18  : label is "{INIT_3D}";
198
attribute INIT_3E of ram_1024_x_18  : label is "{INIT_3E}";
199
attribute INIT_3F of ram_1024_x_18  : label is "{INIT_3F}";
200
attribute INITP_00 of ram_1024_x_18 : label is "{INITP_00}";
201
attribute INITP_01 of ram_1024_x_18 : label is "{INITP_01}";
202
attribute INITP_02 of ram_1024_x_18 : label is "{INITP_02}";
203
attribute INITP_03 of ram_1024_x_18 : label is "{INITP_03}";
204
attribute INITP_04 of ram_1024_x_18 : label is "{INITP_04}";
205
attribute INITP_05 of ram_1024_x_18 : label is "{INITP_05}";
206
attribute INITP_06 of ram_1024_x_18 : label is "{INITP_06}";
207
attribute INITP_07 of ram_1024_x_18 : label is "{INITP_07}";
208
--
209
begin
210
--
211
  --Instantiate the Xilinx primitive for a block RAM
212
  ram_1024_x_18: RAMB16_S18
213
  --synthesis translate_off
214
  --INIT values repeated to define contents for functional simulation
215
  generic map ( INIT_00 => X"{INIT_00}",
216
                INIT_01 => X"{INIT_01}",
217
                INIT_02 => X"{INIT_02}",
218
                INIT_03 => X"{INIT_03}",
219
                INIT_04 => X"{INIT_04}",
220
                INIT_05 => X"{INIT_05}",
221
                INIT_06 => X"{INIT_06}",
222
                INIT_07 => X"{INIT_07}",
223
                INIT_08 => X"{INIT_08}",
224
                INIT_09 => X"{INIT_09}",
225
                INIT_0A => X"{INIT_0A}",
226
                INIT_0B => X"{INIT_0B}",
227
                INIT_0C => X"{INIT_0C}",
228
                INIT_0D => X"{INIT_0D}",
229
                INIT_0E => X"{INIT_0E}",
230
                INIT_0F => X"{INIT_0F}",
231
                INIT_10 => X"{INIT_10}",
232
                INIT_11 => X"{INIT_11}",
233
                INIT_12 => X"{INIT_12}",
234
                INIT_13 => X"{INIT_13}",
235
                INIT_14 => X"{INIT_14}",
236
                INIT_15 => X"{INIT_15}",
237
                INIT_16 => X"{INIT_16}",
238
                INIT_17 => X"{INIT_17}",
239
                INIT_18 => X"{INIT_18}",
240
                INIT_19 => X"{INIT_19}",
241
                INIT_1A => X"{INIT_1A}",
242
                INIT_1B => X"{INIT_1B}",
243
                INIT_1C => X"{INIT_1C}",
244
                INIT_1D => X"{INIT_1D}",
245
                INIT_1E => X"{INIT_1E}",
246
                INIT_1F => X"{INIT_1F}",
247
                INIT_20 => X"{INIT_20}",
248
                INIT_21 => X"{INIT_21}",
249
                INIT_22 => X"{INIT_22}",
250
                INIT_23 => X"{INIT_23}",
251
                INIT_24 => X"{INIT_24}",
252
                INIT_25 => X"{INIT_25}",
253
                INIT_26 => X"{INIT_26}",
254
                INIT_27 => X"{INIT_27}",
255
                INIT_28 => X"{INIT_28}",
256
                INIT_29 => X"{INIT_29}",
257
                INIT_2A => X"{INIT_2A}",
258
                INIT_2B => X"{INIT_2B}",
259
                INIT_2C => X"{INIT_2C}",
260
                INIT_2D => X"{INIT_2D}",
261
                INIT_2E => X"{INIT_2E}",
262
                INIT_2F => X"{INIT_2F}",
263
                INIT_30 => X"{INIT_30}",
264
                INIT_31 => X"{INIT_31}",
265
                INIT_32 => X"{INIT_32}",
266
                INIT_33 => X"{INIT_33}",
267
                INIT_34 => X"{INIT_34}",
268
                INIT_35 => X"{INIT_35}",
269
                INIT_36 => X"{INIT_36}",
270
                INIT_37 => X"{INIT_37}",
271
                INIT_38 => X"{INIT_38}",
272
                INIT_39 => X"{INIT_39}",
273
                INIT_3A => X"{INIT_3A}",
274
                INIT_3B => X"{INIT_3B}",
275
                INIT_3C => X"{INIT_3C}",
276
                INIT_3D => X"{INIT_3D}",
277
                INIT_3E => X"{INIT_3E}",
278
                INIT_3F => X"{INIT_3F}",
279
               INITP_00 => X"{INITP_00}",
280
               INITP_01 => X"{INITP_01}",
281
               INITP_02 => X"{INITP_02}",
282
               INITP_03 => X"{INITP_03}",
283
               INITP_04 => X"{INITP_04}",
284
               INITP_05 => X"{INITP_05}",
285
               INITP_06 => X"{INITP_06}",
286
               INITP_07 => X"{INITP_07}")
287
  --synthesis translate_on
288
  port map(    DI => "0000000000000000",
289
              DIP => "00",
290
               EN => '1',
291
               WE => '0',
292
              SSR => '0',
293
              CLK => clk,
294
             ADDR => address,
295
               DO => instruction(15 downto 0),
296
              DOP => instruction(17 downto 16));
297
--
298
end low_level_definition;
299
--
300
------------------------------------------------------------------------------------
301
--
302
-- END OF FILE {name}.vhd
303
--
304
------------------------------------------------------------------------------------
305
 

powered by: WebSVN 2.1.0

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