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

Last change on this file 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
RevLine 
[60]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
[75]26   std::string name,
[60]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  {
[136]38    log_printf(FUNC,Register_unit_Glue,FUNCTION,_("<%s> Begin"),_name.c_str());
[60]39
[123]40// #if DEBUG_Register_unit_Glue == true
41//     log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Parameters"),_name.c_str());
[88]42
[123]43//     std::cout << *param << std::endl;
44// #endif   
[88]45
[136]46    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Allocation"),_name.c_str());
[60]47    allocation ();
48
49#ifdef STATISTICS
[88]50    if (usage_is_set(_usage,USE_STATISTICS))
51      {
[136]52        log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Allocation of statistics"),_name.c_str());
[88]53       
54        // Allocation of statistics
55        statistics_declaration(param_statistics);
56      }
[60]57#endif
58
59#ifdef VHDL
[88]60    if (usage_is_set(_usage,USE_VHDL))
61      {
62        // generate the vhdl
[136]63        log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Generate the vhdl"),_name.c_str());
[88]64       
65        vhdl();
66      }
[60]67#endif
68
69#ifdef SYSTEMC
[88]70    if (usage_is_set(_usage,USE_SYSTEMC))
71      {
[131]72#ifdef SYSTEMCASS_SPECIFIC
73        constant();
74#else
[136]75    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - constant"),_name.c_str());
[60]76
[131]77    SC_METHOD (constant);
78//     dont_initialize ();
[60]79
[131]80#ifdef SYSTEMCASS_SPECIFIC
81    // List dependency information
82#endif   
83#endif
84
[136]85    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - transition"),_name.c_str());
[60]86
87    SC_METHOD (transition);
88    dont_initialize ();
[131]89    sensitive << (*(in_CLOCK)).pos();
[60]90
91#ifdef SYSTEMCASS_SPECIFIC
92    // List dependency information
93#endif   
94
[136]95    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_read"),_name.c_str());
[60]96
97    SC_METHOD (genMealy_gpr_read);
98    dont_initialize ();
[131]99//     sensitive << (*(in_CLOCK)).neg();
[132]100    sensitive << (*(in_NRESET));
[60]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]));     
[61]129          }
130      }
131#endif   
[60]132
[136]133    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_read_status"),_name.c_str());
[60]134
[61]135    SC_METHOD (genMealy_gpr_read_status);
136    dont_initialize ();
[131]137//     sensitive << (*(in_CLOCK)).neg();
[132]138    sensitive << (*(in_NRESET));
[61]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          {
[60]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
[136]163    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_read_registerfile"),_name.c_str());
[61]164
165    SC_METHOD (genMealy_gpr_read_registerfile);
166    dont_initialize ();
[131]167//     sensitive << (*(in_CLOCK)).neg();
[132]168    sensitive << (*(in_NRESET));
[61]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
[136]193    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_write"),_name.c_str());
[60]194
195    SC_METHOD (genMealy_gpr_write);
196    dont_initialize ();
[131]197//     sensitive << (*(in_CLOCK)).neg();
[132]198    sensitive << (*(in_NRESET));
[60]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]));
[61]220          }
221      }
222#endif   
[60]223
[136]224    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_write_status"),_name.c_str());
[61]225
226    SC_METHOD (genMealy_gpr_write_status);
227    dont_initialize ();
[131]228//     sensitive << (*(in_CLOCK)).neg();
[132]229    sensitive << (*(in_NRESET));
[61]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          {
[60]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
[136]254    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_gpr_write_registerfile"),_name.c_str());
[60]255
[61]256    SC_METHOD (genMealy_gpr_write_registerfile);
257    dont_initialize ();
[131]258//     sensitive << (*(in_CLOCK)).neg();
[132]259    sensitive << (*(in_NRESET));
[61]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]);
[60]265
[61]266        for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
267          sensitive << *(in_GPR_WRITE_STATUS_ACK        [i][j]);
268      }
[60]269
[61]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   
[60]283
[136]284    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_read"),_name.c_str());
[60]285
286    SC_METHOD (genMealy_spr_read);
287    dont_initialize ();
[131]288//     sensitive << (*(in_CLOCK)).neg();
[132]289    sensitive << (*(in_NRESET));
[60]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]));     
[61]318          }
319      }
320#endif   
[60]321
[136]322    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_read_status"),_name.c_str());
[61]323
324    SC_METHOD (genMealy_spr_read_status);
325    dont_initialize ();
[131]326//     sensitive << (*(in_CLOCK)).neg();
[132]327    sensitive << (*(in_NRESET));
[61]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          {
[60]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
[136]352    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_read_registerfile"),_name.c_str());
[61]353
354    SC_METHOD (genMealy_spr_read_registerfile);
355    dont_initialize ();
[131]356//     sensitive << (*(in_CLOCK)).neg();
[132]357    sensitive << (*(in_NRESET));
[61]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
[136]382    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_write"),_name.c_str());
[60]383
384    SC_METHOD (genMealy_spr_write);
385    dont_initialize ();
[131]386//     sensitive << (*(in_CLOCK)).neg();
[132]387    sensitive << (*(in_NRESET));
[60]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]));
[61]409          }
410      }
411#endif   
[60]412
[136]413    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_write_status"),_name.c_str());
[61]414
415    SC_METHOD (genMealy_spr_write_status);
416    dont_initialize ();
[131]417//     sensitive << (*(in_CLOCK)).neg();
[132]418    sensitive << (*(in_NRESET));
[61]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          {
[60]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
[136]443    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_spr_write_registerfile"),_name.c_str());
[61]444
445    SC_METHOD (genMealy_spr_write_registerfile);
446    dont_initialize ();
[131]447//     sensitive << (*(in_CLOCK)).neg();
[132]448    sensitive << (*(in_NRESET));
[61]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
[136]473    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_insert"),_name.c_str());
[60]474
475    SC_METHOD (genMealy_insert);
476    dont_initialize ();
[131]477//     sensitive << (*(in_CLOCK)).neg();
[132]478    sensitive << (*(in_NRESET));
[136]479    for (uint32_t i=0; i<_param->_nb_inst_issue; i++)
[60]480      {
[136]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]);
[60]491      }
[136]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//       }
[60]503#ifdef SYSTEMCASS_SPECIFIC
[136]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]));
[60]512
[136]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]));
[60]516
[136]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//       }
[60]522#endif   
523
[136]524//     log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Method - genMealy_retire"),_name.c_str());
[60]525
[88]526//     SC_METHOD (genMealy_retire);
527//     dont_initialize ();
[131]528// //     sensitive << (*(in_CLOCK)).neg();
[88]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]));
[60]554
[88]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]));
[60]560
[88]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]));
[60]566
[88]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]));
[60]572
[88]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   
[60]581      }
582#endif
[136]583    log_printf(FUNC,Register_unit_Glue,FUNCTION,_("<%s> End"),_name.c_str());
[60]584  };
585 
586#undef  FUNCTION
587#define FUNCTION "Register_unit_Glue::~Register_unit_Glue"
588  Register_unit_Glue::~Register_unit_Glue (void)
589  {
[136]590    log_printf(FUNC,Register_unit_Glue,FUNCTION,_("<%s> Begin"),_name.c_str());
[60]591
592#ifdef STATISTICS
[88]593    if (usage_is_set(_usage,USE_STATISTICS))
594      {
[136]595        log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Generate Statistics file"),_name.c_str());
[88]596       
597        delete _stat;
598      }
[60]599#endif
600
[136]601    log_printf(INFO,Register_unit_Glue,FUNCTION,_("<%s> Deallocation"),_name.c_str());
[60]602    deallocation ();
603
[136]604    log_printf(FUNC,Register_unit_Glue,FUNCTION,_("<%s> End"),_name.c_str());
[60]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             
[61]615
616
617
Note: See TracBrowser for help on using the repository browser.