Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp	(revision 60)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Register_unit/Register_unit_Glue/src/Register_unit_Glue.cpp	(revision 61)
@@ -66,6 +66,4 @@
     PORT_WRITE(out_CONST_1 ,1);
 
-//#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
-
     log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - transition");
 
@@ -73,5 +71,4 @@
     dont_initialize ();
     sensitive_pos << *(in_CLOCK);
-//#endif
 
 #ifdef SYSTEMCASS_SPECIFIC
@@ -83,8 +80,7 @@
     SC_METHOD (genMealy_gpr_read);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
       {
-	sensitive << *(in_GPR_READ_VAL           [j]);
 	if (_param->_have_port_ooo_engine_id == true)
 	  sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]);
@@ -96,5 +92,4 @@
 		    << *(in_GPR_READ_STATUS_DATA_VAL   [i][j]);
       }
-//#endif
 
 #ifdef SYSTEMCASS_SPECIFIC
@@ -114,14 +109,62 @@
 	    (*(out_GPR_READ_DATA                 [j])) (*( in_GPR_READ_REGISTERFILE_DATA [i][j]));
 	    (*(out_GPR_READ_DATA_VAL             [j])) (*( in_GPR_READ_STATUS_DATA_VAL   [i][j]));	
-
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_status");
+
+    SC_METHOD (genMealy_gpr_read_status);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
+      {
+	sensitive << *(in_GPR_READ_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_GPR_READ_REGISTERFILE_ACK  [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
+	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_VAL                  [j]));
+	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_REGISTERFILE_ACK  [i][j]));
+	    if (_param->_have_port_ooo_engine_id == true)
+	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID        [j]));
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_read_registerfile");
+
+    SC_METHOD (genMealy_gpr_read_registerfile);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
+      {
+	sensitive << *(in_GPR_READ_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_GPR_READ_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_GPR_READ_STATUS_ACK        [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_gpr_read; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
 	    (*(out_GPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_GPR_READ_VAL                  [j]));
 	    (*(out_GPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_GPR_READ_STATUS_ACK        [i][j]));
 	    if (_param->_have_port_ooo_engine_id == true)
 	    (*(out_GPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID        [j]));
-
-	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_VAL                  [j]));
-	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_REGISTERFILE_ACK  [i][j]));
-	    if (_param->_have_port_ooo_engine_id == true)
-	    (*(out_GPR_READ_STATUS_VAL        [i][j])) (*( in_GPR_READ_OOO_ENGINE_ID        [j]));
 	  }
       }
@@ -132,8 +175,7 @@
     SC_METHOD (genMealy_gpr_write);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
       {
-	sensitive << *(in_GPR_WRITE_VAL           [j]);
 	if (_param->_have_port_ooo_engine_id == true)
 	  sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]);
@@ -143,5 +185,4 @@
 		    << *(in_GPR_WRITE_STATUS_ACK        [i][j]);
       }
-//#endif
 
 #ifdef SYSTEMCASS_SPECIFIC
@@ -156,47 +197,65 @@
 	    (*(out_GPR_WRITE_ACK                  [j])) (*( in_GPR_WRITE_REGISTERFILE_ACK  [i][j]));
 	    (*(out_GPR_WRITE_ACK                  [j])) (*( in_GPR_WRITE_STATUS_ACK        [i][j]));
-
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_status");
+
+    SC_METHOD (genMealy_gpr_write_status);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
+      {
+	sensitive << *(in_GPR_WRITE_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK  [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
+	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_VAL                  [j]));
+	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK  [i][j]));
+	    if (_param->_have_port_ooo_engine_id == true)
+	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID        [j]));
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_registerfile");
+
+    SC_METHOD (genMealy_gpr_write_registerfile);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
+      {
+	sensitive << *(in_GPR_WRITE_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_GPR_WRITE_STATUS_ACK        [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
 	    (*(out_GPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_GPR_WRITE_VAL                  [j]));
 	    (*(out_GPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_GPR_WRITE_STATUS_ACK        [i][j]));
 	    if (_param->_have_port_ooo_engine_id == true)
 	    (*(out_GPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID        [j]));
-	    
-	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_VAL                  [j]));
-	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK  [i][j]));
-	    if (_param->_have_port_ooo_engine_id == true)
-	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID        [j]));
-	  }
-      }
-#endif    
-
-//     log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_gpr_write_status");
-
-//     SC_METHOD (genMealy_gpr_write_status);
-//     dont_initialize ();
-//     sensitive_neg << *(in_CLOCK);
-//     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
-//       {
-// 	sensitive << *(in_GPR_WRITE_VAL           [j]);
-// 	if (_param->_have_port_ooo_engine_id == true)
-// 	  sensitive << *(in_GPR_WRITE_OOO_ENGINE_ID [j]);
-
-// 	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
-// 	  sensitive << *(in_GPR_WRITE_REGISTERFILE_ACK  [i][j]);
-//       }
-// //#endif
-
-// #ifdef SYSTEMCASS_SPECIFIC
-//     // List dependency information
-//     for (uint32_t j=0; j<_param->_nb_gpr_write; j++)
-//       {
-// 	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
-// 	  {
-// 	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_VAL                  [j]));
-// 	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_REGISTERFILE_ACK  [i][j]));
-// 	    if (_param->_have_port_ooo_engine_id == true)
-// 	    (*(out_GPR_WRITE_STATUS_VAL        [i][j])) (*( in_GPR_WRITE_OOO_ENGINE_ID        [j]));
-// 	  }
-//       }
-// #endif    
+	  }
+      }
+#endif    
 
     log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read");
@@ -204,8 +263,7 @@
     SC_METHOD (genMealy_spr_read);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t j=0; j<_param->_nb_spr_read; j++)
       {
-	sensitive << *(in_SPR_READ_VAL           [j]);
 	if (_param->_have_port_ooo_engine_id == true)
 	  sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]);
@@ -217,5 +275,4 @@
 		    << *(in_SPR_READ_STATUS_DATA_VAL   [i][j]);
       }
-//#endif
 
 #ifdef SYSTEMCASS_SPECIFIC
@@ -235,14 +292,62 @@
 	    (*(out_SPR_READ_DATA                 [j])) (*( in_SPR_READ_REGISTERFILE_DATA [i][j]));
 	    (*(out_SPR_READ_DATA_VAL             [j])) (*( in_SPR_READ_STATUS_DATA_VAL   [i][j]));	
-
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_status");
+
+    SC_METHOD (genMealy_spr_read_status);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_spr_read; j++)
+      {
+	sensitive << *(in_SPR_READ_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_SPR_READ_REGISTERFILE_ACK  [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_spr_read; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
+	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_VAL                  [j]));
+	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_REGISTERFILE_ACK  [i][j]));
+	    if (_param->_have_port_ooo_engine_id == true)
+	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID        [j]));
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_read_registerfile");
+
+    SC_METHOD (genMealy_spr_read_registerfile);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_spr_read; j++)
+      {
+	sensitive << *(in_SPR_READ_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_SPR_READ_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_SPR_READ_STATUS_ACK        [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_spr_read; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
 	    (*(out_SPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_SPR_READ_VAL                  [j]));
 	    (*(out_SPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_SPR_READ_STATUS_ACK        [i][j]));
 	    if (_param->_have_port_ooo_engine_id == true)
 	    (*(out_SPR_READ_REGISTERFILE_VAL  [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID        [j]));
-	    
-	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_VAL                  [j]));
-	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_REGISTERFILE_ACK  [i][j]));
-	    if (_param->_have_port_ooo_engine_id == true)
-	    (*(out_SPR_READ_STATUS_VAL        [i][j])) (*( in_SPR_READ_OOO_ENGINE_ID        [j]));
 	  }
       }
@@ -253,8 +358,7 @@
     SC_METHOD (genMealy_spr_write);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t j=0; j<_param->_nb_spr_write; j++)
       {
-	sensitive << *(in_SPR_WRITE_VAL           [j]);
 	if (_param->_have_port_ooo_engine_id == true)
 	  sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]);
@@ -264,5 +368,4 @@
 		    << *(in_SPR_WRITE_STATUS_ACK        [i][j]);
       }
-//#endif
 
 #ifdef SYSTEMCASS_SPECIFIC
@@ -277,14 +380,62 @@
 	    (*(out_SPR_WRITE_ACK                  [j])) (*( in_SPR_WRITE_REGISTERFILE_ACK  [i][j]));
 	    (*(out_SPR_WRITE_ACK                  [j])) (*( in_SPR_WRITE_STATUS_ACK        [i][j]));
-
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_status");
+
+    SC_METHOD (genMealy_spr_write_status);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_spr_write; j++)
+      {
+	sensitive << *(in_SPR_WRITE_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_SPR_WRITE_REGISTERFILE_ACK  [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_spr_write; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
+	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_VAL                  [j]));
+	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_REGISTERFILE_ACK  [i][j]));
+	    if (_param->_have_port_ooo_engine_id == true)
+	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID        [j]));
+	  }
+      }
+#endif    
+
+    log_printf(INFO,Register_unit_Glue,FUNCTION,"Method - genMealy_spr_write_registerfile");
+
+    SC_METHOD (genMealy_spr_write_registerfile);
+    dont_initialize ();
+//     sensitive_neg << *(in_CLOCK);
+    for (uint32_t j=0; j<_param->_nb_spr_write; j++)
+      {
+	sensitive << *(in_SPR_WRITE_VAL           [j]);
+	if (_param->_have_port_ooo_engine_id == true)
+	  sensitive << *(in_SPR_WRITE_OOO_ENGINE_ID [j]);
+
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  sensitive << *(in_SPR_WRITE_STATUS_ACK        [i][j]);
+      }
+
+#ifdef SYSTEMCASS_SPECIFIC
+    // List dependency information
+    for (uint32_t j=0; j<_param->_nb_spr_write; j++)
+      {
+	for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
+	  {
 	    (*(out_SPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_SPR_WRITE_VAL                  [j]));
 	    (*(out_SPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_SPR_WRITE_STATUS_ACK        [i][j]));
 	    if (_param->_have_port_ooo_engine_id == true)
 	    (*(out_SPR_WRITE_REGISTERFILE_VAL  [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID        [j]));
-	    
-	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_VAL                  [j]));
-	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_REGISTERFILE_ACK  [i][j]));
-	    if (_param->_have_port_ooo_engine_id == true)
-	    (*(out_SPR_WRITE_STATUS_VAL        [i][j])) (*( in_SPR_WRITE_OOO_ENGINE_ID        [j]));
 	  }
       }
@@ -295,5 +446,5 @@
     SC_METHOD (genMealy_insert);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
       {
@@ -331,5 +482,5 @@
     SC_METHOD (genMealy_retire);
     dont_initialize ();
-    sensitive_neg << *(in_CLOCK);
+//     sensitive_neg << *(in_CLOCK);
     for (uint32_t i=0; i<_param->_nb_ooo_engine; i++)
       {
@@ -416,2 +567,5 @@
 }; // end namespace behavioural
 }; // end namespace morpheo              
+
+
+
