1 | /* |
---|
2 | * $Id: Register_unit_Glue.cpp 131 2009-07-08 18:40:08Z rosiere $ |
---|
3 | * |
---|
4 | * [ Description ] |
---|
5 | * |
---|
6 | */ |
---|
7 | |
---|
8 | #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/include/Register_unit_Glue.h" |
---|
9 | |
---|
10 | namespace morpheo { |
---|
11 | namespace behavioural { |
---|
12 | namespace core { |
---|
13 | namespace multi_execute_loop { |
---|
14 | namespace execute_loop { |
---|
15 | namespace register_unit { |
---|
16 | namespace register_unit_glue { |
---|
17 | |
---|
18 | |
---|
19 | #undef FUNCTION |
---|
20 | #define FUNCTION "Register_unit_Glue::Register_unit_Glue" |
---|
21 | Register_unit_Glue::Register_unit_Glue |
---|
22 | ( |
---|
23 | #ifdef SYSTEMC |
---|
24 | sc_module_name name, |
---|
25 | #else |
---|
26 | std::string name, |
---|
27 | #endif |
---|
28 | #ifdef STATISTICS |
---|
29 | morpheo::behavioural::Parameters_Statistics * param_statistics, |
---|
30 | #endif |
---|
31 | morpheo::behavioural::core::multi_execute_loop::execute_loop::register_unit::register_unit_glue::Parameters * param, |
---|
32 | morpheo::behavioural::Tusage_t usage |
---|
33 | ): |
---|
34 | _name (name) |
---|
35 | ,_param (param) |
---|
36 | ,_usage (usage) |
---|
37 | { |
---|
38 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
39 | |
---|
40 | // #if DEBUG_Register_unit_Glue == true |
---|
41 | // log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str()); |
---|
42 | |
---|
43 | // std::cout << *param << std::endl; |
---|
44 | // #endif |
---|
45 | |
---|
46 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation"); |
---|
47 | allocation (); |
---|
48 | |
---|
49 | #ifdef STATISTICS |
---|
50 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
51 | { |
---|
52 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Allocation of statistics"); |
---|
53 | |
---|
54 | // Allocation of statistics |
---|
55 | statistics_declaration(param_statistics); |
---|
56 | } |
---|
57 | #endif |
---|
58 | |
---|
59 | #ifdef VHDL |
---|
60 | if (usage_is_set(_usage,USE_VHDL)) |
---|
61 | { |
---|
62 | // generate the vhdl |
---|
63 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate the vhdl"); |
---|
64 | |
---|
65 | vhdl(); |
---|
66 | } |
---|
67 | #endif |
---|
68 | |
---|
69 | #ifdef SYSTEMC |
---|
70 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
71 | { |
---|
72 | #ifdef SYSTEMCASS_SPECIFIC |
---|
73 | constant(); |
---|
74 | #else |
---|
75 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - constant"); |
---|
76 | |
---|
77 | SC_METHOD (constant); |
---|
78 | // dont_initialize (); |
---|
79 | |
---|
80 | #ifdef SYSTEMCASS_SPECIFIC |
---|
81 | // List dependency information |
---|
82 | #endif |
---|
83 | #endif |
---|
84 | |
---|
85 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition"); |
---|
86 | |
---|
87 | SC_METHOD (transition); |
---|
88 | dont_initialize (); |
---|
89 | sensitive << (*(in_CLOCK)).pos(); |
---|
90 | |
---|
91 | #ifdef SYSTEMCASS_SPECIFIC |
---|
92 | // List dependency information |
---|
93 | #endif |
---|
94 | |
---|
95 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read"); |
---|
96 | |
---|
97 | SC_METHOD (genMealy_gpr_read); |
---|
98 | dont_initialize (); |
---|
99 | // sensitive << (*(in_CLOCK)).neg(); |
---|
100 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
101 | { |
---|
102 | if (_param->_have_port_ooo_engine_id == true) |
---|
103 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
104 | |
---|
105 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
106 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]) |
---|
107 | << *(in_GPR_READ_REGISTERFILE_DATA [i][j]) |
---|
108 | << *(in_GPR_READ_STATUS_ACK [i][j]) |
---|
109 | << *(in_GPR_READ_STATUS_DATA_VAL [i][j]); |
---|
110 | } |
---|
111 | |
---|
112 | #ifdef SYSTEMCASS_SPECIFIC |
---|
113 | // List dependency information |
---|
114 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
115 | { |
---|
116 | if (_param->_have_port_ooo_engine_id == true) |
---|
117 | { |
---|
118 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
119 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
120 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
121 | } |
---|
122 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
123 | { |
---|
124 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
125 | (*(out_GPR_READ_ACK [j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
126 | (*(out_GPR_READ_DATA [j])) (*( in_GPR_READ_REGISTERFILE_DATA [i][j])); |
---|
127 | (*(out_GPR_READ_DATA_VAL [j])) (*( in_GPR_READ_STATUS_DATA_VAL [i][j])); |
---|
128 | } |
---|
129 | } |
---|
130 | #endif |
---|
131 | |
---|
132 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_status"); |
---|
133 | |
---|
134 | SC_METHOD (genMealy_gpr_read_status); |
---|
135 | dont_initialize (); |
---|
136 | // sensitive << (*(in_CLOCK)).neg(); |
---|
137 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
138 | { |
---|
139 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
140 | if (_param->_have_port_ooo_engine_id == true) |
---|
141 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
142 | |
---|
143 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
144 | sensitive << *(in_GPR_READ_REGISTERFILE_ACK [i][j]); |
---|
145 | } |
---|
146 | |
---|
147 | #ifdef SYSTEMCASS_SPECIFIC |
---|
148 | // List dependency information |
---|
149 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
150 | { |
---|
151 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
152 | { |
---|
153 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
154 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_REGISTERFILE_ACK [i][j])); |
---|
155 | if (_param->_have_port_ooo_engine_id == true) |
---|
156 | (*(out_GPR_READ_STATUS_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
157 | } |
---|
158 | } |
---|
159 | #endif |
---|
160 | |
---|
161 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_registerfile"); |
---|
162 | |
---|
163 | SC_METHOD (genMealy_gpr_read_registerfile); |
---|
164 | dont_initialize (); |
---|
165 | // sensitive << (*(in_CLOCK)).neg(); |
---|
166 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
167 | { |
---|
168 | sensitive << *(in_GPR_READ_VAL [j]); |
---|
169 | if (_param->_have_port_ooo_engine_id == true) |
---|
170 | sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]); |
---|
171 | |
---|
172 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
173 | sensitive << *(in_GPR_READ_STATUS_ACK [i][j]); |
---|
174 | } |
---|
175 | |
---|
176 | #ifdef SYSTEMCASS_SPECIFIC |
---|
177 | // List dependency information |
---|
178 | for (uint32_t j=0; j<_param->_nb_gpr_read; j++) |
---|
179 | { |
---|
180 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
181 | { |
---|
182 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_VAL [j])); |
---|
183 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_STATUS_ACK [i][j])); |
---|
184 | if (_param->_have_port_ooo_engine_id == true) |
---|
185 | (*(out_GPR_READ_REGISTERFILE_VAL [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID [j])); |
---|
186 | } |
---|
187 | } |
---|
188 | #endif |
---|
189 | |
---|
190 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write"); |
---|
191 | |
---|
192 | SC_METHOD (genMealy_gpr_write); |
---|
193 | dont_initialize (); |
---|
194 | // sensitive << (*(in_CLOCK)).neg(); |
---|
195 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
196 | { |
---|
197 | if (_param->_have_port_ooo_engine_id == true) |
---|
198 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
199 | |
---|
200 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
201 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
202 | << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
203 | } |
---|
204 | |
---|
205 | #ifdef SYSTEMCASS_SPECIFIC |
---|
206 | // List dependency information |
---|
207 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
208 | { |
---|
209 | if (_param->_have_port_ooo_engine_id == true) |
---|
210 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
211 | |
---|
212 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
213 | { |
---|
214 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
215 | (*(out_GPR_WRITE_ACK [j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
216 | } |
---|
217 | } |
---|
218 | #endif |
---|
219 | |
---|
220 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_status"); |
---|
221 | |
---|
222 | SC_METHOD (genMealy_gpr_write_status); |
---|
223 | dont_initialize (); |
---|
224 | // sensitive << (*(in_CLOCK)).neg(); |
---|
225 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
226 | { |
---|
227 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
228 | if (_param->_have_port_ooo_engine_id == true) |
---|
229 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
230 | |
---|
231 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
232 | sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
233 | } |
---|
234 | |
---|
235 | #ifdef SYSTEMCASS_SPECIFIC |
---|
236 | // List dependency information |
---|
237 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
238 | { |
---|
239 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
240 | { |
---|
241 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
242 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
243 | if (_param->_have_port_ooo_engine_id == true) |
---|
244 | (*(out_GPR_WRITE_STATUS_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
245 | } |
---|
246 | } |
---|
247 | #endif |
---|
248 | |
---|
249 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_registerfile"); |
---|
250 | |
---|
251 | SC_METHOD (genMealy_gpr_write_registerfile); |
---|
252 | dont_initialize (); |
---|
253 | // sensitive << (*(in_CLOCK)).neg(); |
---|
254 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
255 | { |
---|
256 | sensitive << *(in_GPR_WRITE_VAL [j]); |
---|
257 | if (_param->_have_port_ooo_engine_id == true) |
---|
258 | sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]); |
---|
259 | |
---|
260 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
261 | sensitive << *(in_GPR_WRITE_STATUS_ACK [i][j]); |
---|
262 | } |
---|
263 | |
---|
264 | #ifdef SYSTEMCASS_SPECIFIC |
---|
265 | // List dependency information |
---|
266 | for (uint32_t j=0; j<_param->_nb_gpr_write; j++) |
---|
267 | { |
---|
268 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
269 | { |
---|
270 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_VAL [j])); |
---|
271 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_STATUS_ACK [i][j])); |
---|
272 | if (_param->_have_port_ooo_engine_id == true) |
---|
273 | (*(out_GPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID [j])); |
---|
274 | } |
---|
275 | } |
---|
276 | #endif |
---|
277 | |
---|
278 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read"); |
---|
279 | |
---|
280 | SC_METHOD (genMealy_spr_read); |
---|
281 | dont_initialize (); |
---|
282 | // sensitive << (*(in_CLOCK)).neg(); |
---|
283 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
284 | { |
---|
285 | if (_param->_have_port_ooo_engine_id == true) |
---|
286 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
287 | |
---|
288 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
289 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]) |
---|
290 | << *(in_SPR_READ_REGISTERFILE_DATA [i][j]) |
---|
291 | << *(in_SPR_READ_STATUS_ACK [i][j]) |
---|
292 | << *(in_SPR_READ_STATUS_DATA_VAL [i][j]); |
---|
293 | } |
---|
294 | |
---|
295 | #ifdef SYSTEMCASS_SPECIFIC |
---|
296 | // List dependency information |
---|
297 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
298 | { |
---|
299 | if (_param->_have_port_ooo_engine_id == true) |
---|
300 | { |
---|
301 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
302 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
303 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
304 | } |
---|
305 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
306 | { |
---|
307 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
308 | (*(out_SPR_READ_ACK [j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
309 | (*(out_SPR_READ_DATA [j])) (*( in_SPR_READ_REGISTERFILE_DATA [i][j])); |
---|
310 | (*(out_SPR_READ_DATA_VAL [j])) (*( in_SPR_READ_STATUS_DATA_VAL [i][j])); |
---|
311 | } |
---|
312 | } |
---|
313 | #endif |
---|
314 | |
---|
315 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_status"); |
---|
316 | |
---|
317 | SC_METHOD (genMealy_spr_read_status); |
---|
318 | dont_initialize (); |
---|
319 | // sensitive << (*(in_CLOCK)).neg(); |
---|
320 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
321 | { |
---|
322 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
323 | if (_param->_have_port_ooo_engine_id == true) |
---|
324 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
325 | |
---|
326 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
327 | sensitive << *(in_SPR_READ_REGISTERFILE_ACK [i][j]); |
---|
328 | } |
---|
329 | |
---|
330 | #ifdef SYSTEMCASS_SPECIFIC |
---|
331 | // List dependency information |
---|
332 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
333 | { |
---|
334 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
335 | { |
---|
336 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
337 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_REGISTERFILE_ACK [i][j])); |
---|
338 | if (_param->_have_port_ooo_engine_id == true) |
---|
339 | (*(out_SPR_READ_STATUS_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
340 | } |
---|
341 | } |
---|
342 | #endif |
---|
343 | |
---|
344 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_registerfile"); |
---|
345 | |
---|
346 | SC_METHOD (genMealy_spr_read_registerfile); |
---|
347 | dont_initialize (); |
---|
348 | // sensitive << (*(in_CLOCK)).neg(); |
---|
349 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
350 | { |
---|
351 | sensitive << *(in_SPR_READ_VAL [j]); |
---|
352 | if (_param->_have_port_ooo_engine_id == true) |
---|
353 | sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]); |
---|
354 | |
---|
355 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
356 | sensitive << *(in_SPR_READ_STATUS_ACK [i][j]); |
---|
357 | } |
---|
358 | |
---|
359 | #ifdef SYSTEMCASS_SPECIFIC |
---|
360 | // List dependency information |
---|
361 | for (uint32_t j=0; j<_param->_nb_spr_read; j++) |
---|
362 | { |
---|
363 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
364 | { |
---|
365 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_VAL [j])); |
---|
366 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_STATUS_ACK [i][j])); |
---|
367 | if (_param->_have_port_ooo_engine_id == true) |
---|
368 | (*(out_SPR_READ_REGISTERFILE_VAL [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID [j])); |
---|
369 | } |
---|
370 | } |
---|
371 | #endif |
---|
372 | |
---|
373 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write"); |
---|
374 | |
---|
375 | SC_METHOD (genMealy_spr_write); |
---|
376 | dont_initialize (); |
---|
377 | // sensitive << (*(in_CLOCK)).neg(); |
---|
378 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
379 | { |
---|
380 | if (_param->_have_port_ooo_engine_id == true) |
---|
381 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
382 | |
---|
383 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
384 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]) |
---|
385 | << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
386 | } |
---|
387 | |
---|
388 | #ifdef SYSTEMCASS_SPECIFIC |
---|
389 | // List dependency information |
---|
390 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
391 | { |
---|
392 | if (_param->_have_port_ooo_engine_id == true) |
---|
393 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
394 | |
---|
395 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
396 | { |
---|
397 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
398 | (*(out_SPR_WRITE_ACK [j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
399 | } |
---|
400 | } |
---|
401 | #endif |
---|
402 | |
---|
403 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_status"); |
---|
404 | |
---|
405 | SC_METHOD (genMealy_spr_write_status); |
---|
406 | dont_initialize (); |
---|
407 | // sensitive << (*(in_CLOCK)).neg(); |
---|
408 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
409 | { |
---|
410 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
411 | if (_param->_have_port_ooo_engine_id == true) |
---|
412 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
413 | |
---|
414 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
415 | sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK [i][j]); |
---|
416 | } |
---|
417 | |
---|
418 | #ifdef SYSTEMCASS_SPECIFIC |
---|
419 | // List dependency information |
---|
420 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
421 | { |
---|
422 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
423 | { |
---|
424 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
425 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_REGISTERFILE_ACK [i][j])); |
---|
426 | if (_param->_have_port_ooo_engine_id == true) |
---|
427 | (*(out_SPR_WRITE_STATUS_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
428 | } |
---|
429 | } |
---|
430 | #endif |
---|
431 | |
---|
432 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_registerfile"); |
---|
433 | |
---|
434 | SC_METHOD (genMealy_spr_write_registerfile); |
---|
435 | dont_initialize (); |
---|
436 | // sensitive << (*(in_CLOCK)).neg(); |
---|
437 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
438 | { |
---|
439 | sensitive << *(in_SPR_WRITE_VAL [j]); |
---|
440 | if (_param->_have_port_ooo_engine_id == true) |
---|
441 | sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]); |
---|
442 | |
---|
443 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
444 | sensitive << *(in_SPR_WRITE_STATUS_ACK [i][j]); |
---|
445 | } |
---|
446 | |
---|
447 | #ifdef SYSTEMCASS_SPECIFIC |
---|
448 | // List dependency information |
---|
449 | for (uint32_t j=0; j<_param->_nb_spr_write; j++) |
---|
450 | { |
---|
451 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
452 | { |
---|
453 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_VAL [j])); |
---|
454 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_STATUS_ACK [i][j])); |
---|
455 | if (_param->_have_port_ooo_engine_id == true) |
---|
456 | (*(out_SPR_WRITE_REGISTERFILE_VAL [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID [j])); |
---|
457 | } |
---|
458 | } |
---|
459 | #endif |
---|
460 | |
---|
461 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_insert"); |
---|
462 | |
---|
463 | SC_METHOD (genMealy_insert); |
---|
464 | dont_initialize (); |
---|
465 | // sensitive << (*(in_CLOCK)).neg(); |
---|
466 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
467 | { |
---|
468 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
469 | for (uint32_t j=0; j<x; j++) |
---|
470 | sensitive << *( in_INSERT_ROB_VAL [i][j]) |
---|
471 | << *( in_INSERT_ROB_RD_USE [i][j]) |
---|
472 | << *( in_INSERT_ROB_RE_USE [i][j]) |
---|
473 | << *( in_INSERT_ROB_GPR_STATUS_ACK [i][j]) |
---|
474 | << *( in_INSERT_ROB_SPR_STATUS_ACK [i][j]); |
---|
475 | } |
---|
476 | #ifdef SYSTEMCASS_SPECIFIC |
---|
477 | // List dependency information |
---|
478 | for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
479 | { |
---|
480 | uint32_t x=_param->_nb_inst_insert_rob [i]; |
---|
481 | for (uint32_t j=0; j<x; j++) |
---|
482 | { |
---|
483 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
484 | (*(out_INSERT_ROB_ACK [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
485 | |
---|
486 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
487 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RD_USE [i][j])); |
---|
488 | (*(out_INSERT_ROB_GPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_SPR_STATUS_ACK [i][j])); |
---|
489 | |
---|
490 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_VAL [i][j])); |
---|
491 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_RE_USE [i][j])); |
---|
492 | (*(out_INSERT_ROB_SPR_STATUS_VAL [i][j]))(*( in_INSERT_ROB_GPR_STATUS_ACK [i][j])); |
---|
493 | } |
---|
494 | } |
---|
495 | #endif |
---|
496 | |
---|
497 | // log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_retire"); |
---|
498 | |
---|
499 | // SC_METHOD (genMealy_retire); |
---|
500 | // dont_initialize (); |
---|
501 | // // sensitive << (*(in_CLOCK)).neg(); |
---|
502 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
503 | // { |
---|
504 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
505 | // for (uint32_t j=0; j<x; j++) |
---|
506 | // sensitive << *( in_RETIRE_ROB_VAL [i][j]) |
---|
507 | // << *( in_RETIRE_ROB_RD_OLD_USE [i][j]) |
---|
508 | // << *( in_RETIRE_ROB_RD_NEW_USE [i][j]) |
---|
509 | // << *( in_RETIRE_ROB_RE_OLD_USE [i][j]) |
---|
510 | // << *( in_RETIRE_ROB_RE_NEW_USE [i][j]) |
---|
511 | // << *( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j]) |
---|
512 | // << *( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j]) |
---|
513 | // << *( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j]) |
---|
514 | // << *( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j]); |
---|
515 | // } |
---|
516 | // #ifdef SYSTEMCASS_SPECIFIC |
---|
517 | // // List dependency information |
---|
518 | // for (uint32_t i=0; i<_param->_nb_ooo_engine; i++) |
---|
519 | // { |
---|
520 | // uint32_t x=_param->_nb_inst_retire_rob [i]; |
---|
521 | // for (uint32_t j=0; j<x; j++) |
---|
522 | // { |
---|
523 | // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
524 | // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
525 | // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
526 | // (*(out_RETIRE_ROB_ACK [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
527 | |
---|
528 | // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
529 | // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RD_OLD_USE [i][j])); |
---|
530 | // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
531 | // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
532 | // (*(out_RETIRE_ROB_GPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
533 | |
---|
534 | // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
535 | // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RD_NEW_USE [i][j])); |
---|
536 | // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
537 | // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
538 | // (*(out_RETIRE_ROB_GPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
539 | |
---|
540 | // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
541 | // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_RE_OLD_USE [i][j])); |
---|
542 | // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
543 | // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
544 | // (*(out_RETIRE_ROB_SPR_STATUS_OLD_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_NEW_ACK [i][j])); |
---|
545 | |
---|
546 | // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_VAL [i][j])); |
---|
547 | // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_RE_NEW_USE [i][j])); |
---|
548 | // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_NEW_ACK [i][j])); |
---|
549 | // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_GPR_STATUS_OLD_ACK [i][j])); |
---|
550 | // (*(out_RETIRE_ROB_SPR_STATUS_NEW_VAL [i][j]))(*( in_RETIRE_ROB_SPR_STATUS_OLD_ACK [i][j])); |
---|
551 | // } |
---|
552 | // } |
---|
553 | // #endif |
---|
554 | } |
---|
555 | #endif |
---|
556 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
557 | }; |
---|
558 | |
---|
559 | #undef FUNCTION |
---|
560 | #define FUNCTION "Register_unit_Glue::~Register_unit_Glue" |
---|
561 | Register_unit_Glue::~Register_unit_Glue (void) |
---|
562 | { |
---|
563 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"Begin"); |
---|
564 | |
---|
565 | #ifdef STATISTICS |
---|
566 | if (usage_is_set(_usage,USE_STATISTICS)) |
---|
567 | { |
---|
568 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Generate Statistics file"); |
---|
569 | |
---|
570 | delete _stat; |
---|
571 | } |
---|
572 | #endif |
---|
573 | |
---|
574 | log_printf(INFO,Register_unit_Glue,FUNCTION,"Deallocation"); |
---|
575 | deallocation (); |
---|
576 | |
---|
577 | log_printf(FUNC,Register_unit_Glue,FUNCTION,"End"); |
---|
578 | }; |
---|
579 | |
---|
580 | }; // end namespace register_unit_glue |
---|
581 | }; // end namespace register_unit |
---|
582 | }; // end namespace execute_loop |
---|
583 | }; // end namespace multi_execute_loop |
---|
584 | }; // end namespace core |
---|
585 | |
---|
586 | }; // end namespace behavioural |
---|
587 | }; // end namespace morpheo |
---|
588 | |
---|
589 | |
---|
590 | |
---|