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

Subversion Repositories copyblaze

[/] [copyblaze/] [trunk/] [copyblaze/] [sw/] [tools/] [asm/] [pBlazASM/] [pBlazMRG/] [template.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 ameziti
 
2
 
3
{begin template}
4
--
5
-- Definition of a dual port ROM for KCPSM3 program defined by {name}.psm
6
--
7
-- Generated by {tool} at {timestamp}. 
8
--
9
-- Standard IEEE libraries
10
--
11
library IEEE;
12
use IEEE.STD_LOGIC_1164.ALL;
13
use IEEE.STD_LOGIC_ARITH.ALL;
14
use IEEE.STD_LOGIC_UNSIGNED.ALL;
15
 
16
-- The Unisim Library is used to define Xilinx primitives. It is also used during
17
-- simulation. The source can be viewed at %XILINX%\vhdl\src\unisims\unisim_VCOMP.vhd
18
 
19
library unisim;
20
use unisim.vcomponents.all;
21
 
22
entity {name} is
23
        port (
24
                clk : in std_logic ;
25
 
26
                address : in std_logic_vector( 9 downto 0 ) ;
27
                instruction : out std_logic_vector( 17 downto 0 ) ;
28
 
29
                scrpad_address : in std_logic_vector( 7 downto 0 ) ;
30
                scrpad_rdata : out std_logic_vector( 7 downto 0 ) ;
31
                scrpad_wdata : in std_logic_vector( 7 downto 0 ) ;
32
                scr_pad_we : in std_logic
33
        ) ;
34
end {name} ;
35
 
36
architecture structural of {name} is
37
--
38
-- Attributes to define ROM contents during implementation synthesis. 
39
-- The information is repeated in the generic map for functional simulation
40
--
41
        attribute INIT_00 : string;
42
        attribute INIT_01 : string;
43
        attribute INIT_02 : string;
44
        attribute INIT_03 : string;
45
        attribute INIT_04 : string;
46
        attribute INIT_05 : string;
47
        attribute INIT_06 : string;
48
        attribute INIT_07 : string;
49
        attribute INIT_08 : string;
50
        attribute INIT_09 : string;
51
        attribute INIT_0A : string;
52
        attribute INIT_0B : string;
53
        attribute INIT_0C : string;
54
        attribute INIT_0D : string;
55
        attribute INIT_0E : string;
56
        attribute INIT_0F : string;
57
        attribute INIT_10 : string;
58
        attribute INIT_11 : string;
59
        attribute INIT_12 : string;
60
        attribute INIT_13 : string;
61
        attribute INIT_14 : string;
62
        attribute INIT_15 : string;
63
        attribute INIT_16 : string;
64
        attribute INIT_17 : string;
65
        attribute INIT_18 : string;
66
        attribute INIT_19 : string;
67
        attribute INIT_1A : string;
68
        attribute INIT_1B : string;
69
        attribute INIT_1C : string;
70
        attribute INIT_1D : string;
71
        attribute INIT_1E : string;
72
        attribute INIT_1F : string;
73
        attribute INIT_20 : string;
74
        attribute INIT_21 : string;
75
        attribute INIT_22 : string;
76
        attribute INIT_23 : string;
77
        attribute INIT_24 : string;
78
        attribute INIT_25 : string;
79
        attribute INIT_26 : string;
80
        attribute INIT_27 : string;
81
        attribute INIT_28 : string;
82
        attribute INIT_29 : string;
83
        attribute INIT_2A : string;
84
        attribute INIT_2B : string;
85
        attribute INIT_2C : string;
86
        attribute INIT_2D : string;
87
        attribute INIT_2E : string;
88
        attribute INIT_2F : string;
89
        attribute INIT_30 : string;
90
        attribute INIT_31 : string;
91
        attribute INIT_32 : string;
92
        attribute INIT_33 : string;
93
        attribute INIT_34 : string;
94
        attribute INIT_35 : string;
95
        attribute INIT_36 : string;
96
        attribute INIT_37 : string;
97
        attribute INIT_38 : string;
98
        attribute INIT_39 : string;
99
        attribute INIT_3A : string;
100
        attribute INIT_3B : string;
101
        attribute INIT_3C : string;
102
        attribute INIT_3D : string;
103
        attribute INIT_3E : string;
104
        attribute INIT_3F : string;
105
        attribute INITP_00 : string;
106
        attribute INITP_01 : string;
107
        attribute INITP_02 : string;
108
        attribute INITP_03 : string;
109
        attribute INITP_04 : string;
110
        attribute INITP_05 : string;
111
        attribute INITP_06 : string;
112
        attribute INITP_07 : string;
113
--
114
-- Attributes to define ROM contents during implementation synthesis.
115
--
116
        attribute INIT_00 of Code_ROM  : label is "{INIT_00}";
117
        attribute INIT_01 of Code_ROM  : label is "{INIT_01}";
118
        attribute INIT_02 of Code_ROM  : label is "{INIT_02}";
119
        attribute INIT_03 of Code_ROM  : label is "{INIT_03}";
120
        attribute INIT_04 of Code_ROM  : label is "{INIT_04}";
121
        attribute INIT_05 of Code_ROM  : label is "{INIT_05}";
122
        attribute INIT_06 of Code_ROM  : label is "{INIT_06}";
123
        attribute INIT_07 of Code_ROM  : label is "{INIT_07}";
124
        attribute INIT_08 of Code_ROM  : label is "{INIT_08}";
125
        attribute INIT_09 of Code_ROM  : label is "{INIT_09}";
126
        attribute INIT_0A of Code_ROM  : label is "{INIT_0A}";
127
        attribute INIT_0B of Code_ROM  : label is "{INIT_0B}";
128
        attribute INIT_0C of Code_ROM  : label is "{INIT_0C}";
129
        attribute INIT_0D of Code_ROM  : label is "{INIT_0D}";
130
        attribute INIT_0E of Code_ROM  : label is "{INIT_0E}";
131
        attribute INIT_0F of Code_ROM  : label is "{INIT_0F}";
132
        attribute INIT_10 of Code_ROM  : label is "{INIT_10}";
133
        attribute INIT_11 of Code_ROM  : label is "{INIT_11}";
134
        attribute INIT_12 of Code_ROM  : label is "{INIT_12}";
135
        attribute INIT_13 of Code_ROM  : label is "{INIT_13}";
136
        attribute INIT_14 of Code_ROM  : label is "{INIT_14}";
137
        attribute INIT_15 of Code_ROM  : label is "{INIT_15}";
138
        attribute INIT_16 of Code_ROM  : label is "{INIT_16}";
139
        attribute INIT_17 of Code_ROM  : label is "{INIT_17}";
140
        attribute INIT_18 of Code_ROM  : label is "{INIT_18}";
141
        attribute INIT_19 of Code_ROM  : label is "{INIT_19}";
142
        attribute INIT_1A of Code_ROM  : label is "{INIT_1A}";
143
        attribute INIT_1B of Code_ROM  : label is "{INIT_1B}";
144
        attribute INIT_1C of Code_ROM  : label is "{INIT_1C}";
145
        attribute INIT_1D of Code_ROM  : label is "{INIT_1D}";
146
        attribute INIT_1E of Code_ROM  : label is "{INIT_1E}";
147
        attribute INIT_1F of Code_ROM  : label is "{INIT_1F}";
148
        attribute INIT_20 of Code_ROM  : label is "{INIT_20}";
149
        attribute INIT_21 of Code_ROM  : label is "{INIT_21}";
150
        attribute INIT_22 of Code_ROM  : label is "{INIT_22}";
151
        attribute INIT_23 of Code_ROM  : label is "{INIT_23}";
152
        attribute INIT_24 of Code_ROM  : label is "{INIT_24}";
153
        attribute INIT_25 of Code_ROM  : label is "{INIT_25}";
154
        attribute INIT_26 of Code_ROM  : label is "{INIT_26}";
155
        attribute INIT_27 of Code_ROM  : label is "{INIT_27}";
156
        attribute INIT_28 of Code_ROM  : label is "{INIT_28}";
157
        attribute INIT_29 of Code_ROM  : label is "{INIT_29}";
158
        attribute INIT_2A of Code_ROM  : label is "{INIT_2A}";
159
        attribute INIT_2B of Code_ROM  : label is "{INIT_2B}";
160
        attribute INIT_2C of Code_ROM  : label is "{INIT_2C}";
161
        attribute INIT_2D of Code_ROM  : label is "{INIT_2D}";
162
        attribute INIT_2E of Code_ROM  : label is "{INIT_2E}";
163
        attribute INIT_2F of Code_ROM  : label is "{INIT_2F}";
164
        attribute INIT_30 of Code_ROM  : label is "{INIT_30}";
165
        attribute INIT_31 of Code_ROM  : label is "{INIT_31}";
166
        attribute INIT_32 of Code_ROM  : label is "{INIT_32}";
167
        attribute INIT_33 of Code_ROM  : label is "{INIT_33}";
168
        attribute INIT_34 of Code_ROM  : label is "{INIT_34}";
169
        attribute INIT_35 of Code_ROM  : label is "{INIT_35}";
170
        attribute INIT_36 of Code_ROM  : label is "{INIT_36}";
171
        attribute INIT_37 of Code_ROM  : label is "{INIT_37}";
172
        attribute INIT_38 of Code_ROM  : label is "{INIT_38}";
173
        attribute INIT_39 of Code_ROM  : label is "{INIT_39}";
174
        attribute INIT_3A of Code_ROM  : label is "{INIT_3A}";
175
        attribute INIT_3B of Code_ROM  : label is "{INIT_3B}";
176
        attribute INIT_3C of Code_ROM  : label is "{INIT_3C}";
177
        attribute INIT_3D of Code_ROM  : label is "{INIT_3D}";
178
        attribute INIT_3E of Code_ROM  : label is "{INIT_3E}";
179
        attribute INIT_3F of Code_ROM  : label is "{INIT_3F}";
180
        attribute INITP_00 of Code_ROM : label is "{INITP_00}";
181
        attribute INITP_01 of Code_ROM : label is "{INITP_01}";
182
        attribute INITP_02 of Code_ROM : label is "{INITP_02}";
183
        attribute INITP_03 of Code_ROM : label is "{INITP_03}";
184
        attribute INITP_04 of Code_ROM : label is "{INITP_04}";
185
        attribute INITP_05 of Code_ROM : label is "{INITP_05}";
186
        attribute INITP_06 of Code_ROM : label is "{INITP_06}";
187
        attribute INITP_07 of Code_ROM : label is "{INITP_07}";
188
 
189
        signal addra : std_logic_vector( 10 downto 0 ) ;
190
begin
191
        --Instantiate the Xilinx primitive for a block RAM
192
        Code_ROM: RAMB16_S9_S18
193
                --synthesis translate_off
194
                generic map (
195
                        INIT_00 => X"{INIT_00}",
196
                        INIT_01 => X"{INIT_01}",
197
                        INIT_02 => X"{INIT_02}",
198
                        INIT_03 => X"{INIT_03}",
199
                        INIT_04 => X"{INIT_04}",
200
                        INIT_05 => X"{INIT_05}",
201
                        INIT_06 => X"{INIT_06}",
202
                        INIT_07 => X"{INIT_07}",
203
                        INIT_08 => X"{INIT_08}",
204
                        INIT_09 => X"{INIT_09}",
205
                        INIT_0A => X"{INIT_0A}",
206
                        INIT_0B => X"{INIT_0B}",
207
                        INIT_0C => X"{INIT_0C}",
208
                        INIT_0D => X"{INIT_0D}",
209
                        INIT_0E => X"{INIT_0E}",
210
                        INIT_0F => X"{INIT_0F}",
211
                        INIT_10 => X"{INIT_10}",
212
                        INIT_11 => X"{INIT_11}",
213
                        INIT_12 => X"{INIT_12}",
214
                        INIT_13 => X"{INIT_13}",
215
                        INIT_14 => X"{INIT_14}",
216
                        INIT_15 => X"{INIT_15}",
217
                        INIT_16 => X"{INIT_16}",
218
                        INIT_17 => X"{INIT_17}",
219
                        INIT_18 => X"{INIT_18}",
220
                        INIT_19 => X"{INIT_19}",
221
                        INIT_1A => X"{INIT_1A}",
222
                        INIT_1B => X"{INIT_1B}",
223
                        INIT_1C => X"{INIT_1C}",
224
                        INIT_1D => X"{INIT_1D}",
225
                        INIT_1E => X"{INIT_1E}",
226
                        INIT_1F => X"{INIT_1F}",
227
                        INIT_20 => X"{INIT_20}",
228
                        INIT_21 => X"{INIT_21}",
229
                        INIT_22 => X"{INIT_22}",
230
                        INIT_23 => X"{INIT_23}",
231
                        INIT_24 => X"{INIT_24}",
232
                        INIT_25 => X"{INIT_25}",
233
                        INIT_26 => X"{INIT_26}",
234
                        INIT_27 => X"{INIT_27}",
235
                        INIT_28 => X"{INIT_28}",
236
                        INIT_29 => X"{INIT_29}",
237
                        INIT_2A => X"{INIT_2A}",
238
                        INIT_2B => X"{INIT_2B}",
239
                        INIT_2C => X"{INIT_2C}",
240
                        INIT_2D => X"{INIT_2D}",
241
                        INIT_2E => X"{INIT_2E}",
242
                        INIT_2F => X"{INIT_2F}",
243
                        INIT_30 => X"{INIT_30}",
244
                        INIT_31 => X"{INIT_31}",
245
                        INIT_32 => X"{INIT_32}",
246
                        INIT_33 => X"{INIT_33}",
247
                        INIT_34 => X"{INIT_34}",
248
                        INIT_35 => X"{INIT_35}",
249
                        INIT_36 => X"{INIT_36}",
250
                        INIT_37 => X"{INIT_37}",
251
                        INIT_38 => X"{INIT_38}",
252
                        INIT_39 => X"{INIT_39}",
253
                        INIT_3A => X"{INIT_3A}",
254
                        INIT_3B => X"{INIT_3B}",
255
                        INIT_3C => X"{INIT_3C}",
256
                        INIT_3D => X"{INIT_3D}",
257
                        INIT_3E => X"{INIT_3E}",
258
                        INIT_3F => X"{INIT_3F}",
259
                        INITP_00 => X"{INITP_00}",
260
                        INITP_01 => X"{INITP_01}",
261
                        INITP_02 => X"{INITP_02}",
262
                        INITP_03 => X"{INITP_03}",
263
                        INITP_04 => X"{INITP_04}",
264
                        INITP_05 => X"{INITP_05}",
265
                        INITP_06 => X"{INITP_06}",
266
                        INITP_07 => X"{INITP_07}"
267
                )
268
                --synthesis translate_on
269
 
270
                port map (
271
                        -- instruction ROM size
272
                        DIB => "0000000000000000",
273
                        DIPB => "00",
274
 
275
                        DOB => instruction( 15 downto 0 ),
276
                        DOPB => instruction( 17 downto 16 ),
277
 
278
                        ADDRB => address,
279
 
280
                        ENB => '1',
281
                        WEB => '0',
282
                        SSRB => '0',
283
                        CLKB => clk,
284
 
285
                        -- scratch pad size
286
                        DIA => scrpad_wdata,
287
                        DIPA => "0",
288
 
289
                        DOA => scrpad_rdata,
290
                        DOPA => open,
291
 
292
                        ADDRA => addra,
293
 
294
                        ENA => '1',
295
                        WEA => scr_pad_we,
296
                        SSRA => '0',
297
                        CLKA => clk
298
                ) ;
299
        addra <= "111" & scrpad_address ;
300
end structural ;
301
 
302
 

powered by: WebSVN 2.1.0

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