source: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp @ 136

Last change on this file since 136 was 136, checked in by rosiere, 15 years ago

1) Add new algo in ifetch queue
2) Add Cancel bit
3) new config

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