Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 118)
@@ -342,5 +342,5 @@
       if (_param->_have_thread [i])
         {
-          std::string filename = MORPHEO_LOG+"/"+toString(getpid())+"-Instruction_flow-thread_"+toString(i)+"-"+toString(getpid())+".log";
+          std::string filename = MORPHEO_LOG+"/"+toString(getpid())+"-Instruction_flow-thread_"+toString(i)+".log";
           
           instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp	(revision 118)
@@ -28,12 +28,18 @@
     // ===================================================================
     {
+      log_printf(TRACE,Commit_unit,FUNCTION,"  * REEXECUTE [0]");
+
       // Store instruction comming Out Of Order in Load Store Unit. 
       // Must be executed in no speculative mode. Also, send a signal when an Store is in head of ROB
 
-      Tcontrol_t val = false;
-
-      if (not _rob[reg_NUM_BANK_HEAD].empty())
-	{
-	  entry_t    * entry = _rob [reg_NUM_BANK_HEAD].front();
+      Tcontrol_t val      = false;
+      uint32_t   num_bank = reg_NUM_BANK_HEAD;
+
+      if (not _rob[num_bank].empty())
+	{
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB is not empty");
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank      : %d",num_bank);
+
+          entry_t    * entry = _rob [num_bank].front();
 	  rob_state_t  state = entry->state;
 
@@ -41,7 +47,12 @@
 	  val   = ((state == ROB_STORE_HEAD_OK) or
 		   (state == ROB_STORE_HEAD_KO));
-	  
+
+          log_printf(TRACE,Commit_unit,FUNCTION,"    * val           : %d",val);
 	  if (val)
 	    {
+              Tpacket_t packet_id = ((entry->ptr << _param->_shift_num_slot) | num_bank);
+
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * packet_id     : %d",packet_id);
+	  
               // Reexecute store
 	      if (_param->_have_port_context_id)
@@ -50,5 +61,5 @@
   	      PORT_WRITE(out_REEXECUTE_FRONT_END_ID          [0], entry->front_end_id         );
 	      if (_param->_have_port_rob_ptr  )
-  	      PORT_WRITE(out_REEXECUTE_PACKET_ID             [0], entry->ptr                  );
+  	      PORT_WRITE(out_REEXECUTE_PACKET_ID             [0], packet_id                   );
 	      PORT_WRITE(out_REEXECUTE_TYPE                  [0], entry->type                 );
 	      PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_WRITE [0], entry->store_queue_ptr_write);
@@ -58,5 +69,5 @@
  
       internal_REEXECUTE_VAL      [0] = val;
-      internal_REEXECUTE_NUM_BANK [0] = reg_NUM_BANK_HEAD;
+      internal_REEXECUTE_NUM_BANK [0] = num_bank;
       
       PORT_WRITE(out_REEXECUTE_VAL[0], internal_REEXECUTE_VAL [0]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_reexecute.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_reexecute.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_reexecute.cpp	(revision 118)
@@ -34,4 +34,6 @@
 	Tcontrol_t ack;
 
+        log_printf(TRACE,Reexecute_unit,FUNCTION,"  * REEXECUTE[%d]",i);
+
 	if (not _reexecute_queue [i].empty() and (_reexecute_queue [i].front()->state == STATE_REEXECUTE))
 	  {
@@ -40,4 +42,8 @@
 
 	    entry_t * entry = _reexecute_queue [i].front();
+            Tpacket_t packet_id = (_param->_have_port_rob_ptr)?entry->packet_id:0;
+
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * From Reexecute_queue");
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * packet_id : %d",packet_id);
 
 	    if (_param->_have_port_context_id)
@@ -46,5 +52,5 @@
 	    PORT_WRITE(out_REEXECUTE_FRONT_END_ID          [i],entry->front_end_id  );
 	    if (_param->_have_port_rob_ptr  )
-	    PORT_WRITE(out_REEXECUTE_PACKET_ID             [i],entry->packet_id     );
+	    PORT_WRITE(out_REEXECUTE_PACKET_ID             [i],       packet_id     );
 	    PORT_WRITE(out_REEXECUTE_OPERATION             [i],entry->operation     );
 	    PORT_WRITE(out_REEXECUTE_TYPE                  [i],entry->type          );
@@ -60,4 +66,11 @@
 	    ack = PORT_READ(in_REEXECUTE_ACK     [i]);
 
+            Tpacket_t packet_id = (_param->_have_port_rob_ptr)?PORT_READ(in_REEXECUTE_ROB_PACKET_ID [i]):0;
+
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * From ROB");
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * val & ack : %d",val and ack);
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * have ??   : %d",_param->_have_port_rob_ptr);
+            log_printf(TRACE,Reexecute_unit,FUNCTION,"    * packet_id : %d",packet_id);
+
 	    if (_param->_have_port_context_id)
 	    PORT_WRITE(out_REEXECUTE_CONTEXT_ID            [i], PORT_READ(in_REEXECUTE_ROB_CONTEXT_ID              [i]));
@@ -65,5 +78,5 @@
 	    PORT_WRITE(out_REEXECUTE_FRONT_END_ID          [i], PORT_READ(in_REEXECUTE_ROB_FRONT_END_ID            [i]));
 	    if (_param->_have_port_rob_ptr  )
-	    PORT_WRITE(out_REEXECUTE_PACKET_ID             [i], PORT_READ(in_REEXECUTE_ROB_PACKET_ID               [i]));
+	    PORT_WRITE(out_REEXECUTE_PACKET_ID             [i],                            packet_id                   );
 	    PORT_WRITE(out_REEXECUTE_OPERATION             [i], PORT_READ(in_REEXECUTE_ROB_OPERATION               [i]));
 	    PORT_WRITE(out_REEXECUTE_TYPE                  [i], PORT_READ(in_REEXECUTE_ROB_TYPE                    [i]));
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h	(revision 118)
@@ -121,6 +121,8 @@
   private   : Tcontrol_t                    * internal_PUSH_GPR_VAL     ;//[nb_reg_free]
   private   : uint32_t                      * internal_PUSH_GPR_NUM_BANK;//[nb_reg_free]
+  private   : uint32_t                      * internal_PUSH_GPR_NUM_REG ;//[nb_reg_free]
   private   : Tcontrol_t                    * internal_PUSH_SPR_VAL     ;//[nb_reg_free]
   private   : uint32_t                      * internal_PUSH_SPR_NUM_BANK;//[nb_reg_free]
+  private   : uint32_t                      * internal_PUSH_SPR_NUM_REG ;//[nb_reg_free]
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_allocation.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_allocation.cpp	(revision 118)
@@ -134,6 +134,8 @@
      ALLOC1(internal_PUSH_GPR_VAL     ,Tcontrol_t,_param->_nb_reg_free);
      ALLOC1(internal_PUSH_GPR_NUM_BANK,uint32_t  ,_param->_nb_reg_free);
+     ALLOC1(internal_PUSH_GPR_NUM_REG ,uint32_t  ,_param->_nb_reg_free);
      ALLOC1(internal_PUSH_SPR_VAL     ,Tcontrol_t,_param->_nb_reg_free);
      ALLOC1(internal_PUSH_SPR_NUM_BANK,uint32_t  ,_param->_nb_reg_free);
+     ALLOC1(internal_PUSH_SPR_NUM_REG ,uint32_t  ,_param->_nb_reg_free);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_deallocation.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_deallocation.cpp	(revision 118)
@@ -77,6 +77,8 @@
         DELETE1(internal_PUSH_GPR_VAL     ,_param->_nb_reg_free);
         DELETE1(internal_PUSH_GPR_NUM_BANK,_param->_nb_reg_free);
+        DELETE1(internal_PUSH_GPR_NUM_REG ,_param->_nb_reg_free);
         DELETE1(internal_PUSH_SPR_VAL     ,_param->_nb_reg_free);
         DELETE1(internal_PUSH_SPR_NUM_BANK,_param->_nb_reg_free);
+        DELETE1(internal_PUSH_SPR_NUM_REG ,_param->_nb_reg_free);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_genMoore.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_genMoore.cpp	(revision 118)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/include/Stat_List_unit.h"
+#include <set>
 
 namespace morpheo                    {
@@ -18,4 +19,5 @@
 namespace stat_list_unit {
 
+#define STAT_LIST_SCAN_ALL
 
 #undef  FUNCTION
@@ -26,23 +28,56 @@
     log_function(Stat_List_unit,FUNCTION,_name.c_str());
 
-    uint32_t gpr_ptr = reg_GPR_PTR_FREE;
-    uint32_t spr_ptr = reg_SPR_PTR_FREE;
+    uint32_t  gpr_ptr = reg_GPR_PTR_FREE;
+    uint32_t  spr_ptr = reg_SPR_PTR_FREE;
+#ifdef STAT_LIST_SCAN_ALL
+    std::set<Tgeneral_address_t> list_gpr_free;
+    std::set<Tspecial_address_t> list_spr_free;
+#endif
 
     for (uint32_t i=0; i<_param->_nb_reg_free; i++)
       {
+        log_printf(TRACE,Stat_List_unit,FUNCTION,"  * PUSH [%d]",i);
+          
 	uint32_t offset  = i*_param->_nb_bank_by_port_free;
 
 	// PUSH_GPR
 	{
-	  uint32_t bank_gpr;
-	  
-	  for (bank_gpr=offset; bank_gpr<offset+_param->_nb_bank_by_port_free; bank_gpr++)
-	    if (gpr_stat_list[bank_gpr][gpr_ptr].can_free())
-	      break;
-	  
-	  bool val = (bank_gpr != offset+_param->_nb_bank_by_port_free);
-	  
+	  bool     val      = false;
+	  uint32_t bank_gpr = offset;
+
+#ifdef STAT_LIST_SCAN_ALL
+          for (uint32_t _gpr_ptr=0;  _gpr_ptr<_param->_nb_general_register_by_bank; ++_gpr_ptr)
+            {
+              gpr_ptr = (gpr_ptr+1)%_param->_nb_general_register_by_bank;
+#endif	  
+              for (bank_gpr = offset; bank_gpr<offset+_param->_nb_bank_by_port_free; bank_gpr++)
+                if (gpr_stat_list[bank_gpr][gpr_ptr].can_free())
+                  {
+#ifdef STAT_LIST_SCAN_ALL
+                    Tgeneral_address_t num_reg = ((bank_gpr<<_param->_shift_gpr) | gpr_ptr);
+                    if (list_gpr_free.find(num_reg) == list_gpr_free.end())
+                      {
+                        list_gpr_free.insert(num_reg);
+#endif
+                        val = true;
+                        break;
+#ifdef STAT_LIST_SCAN_ALL
+                      }
+#endif
+                  }
+#ifdef STAT_LIST_SCAN_ALL
+              if (val)
+                break;
+            }
+#endif	  
+
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * val      : %d",val);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * bank_gpr : %d",bank_gpr);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * gpr_ptr  : %d",gpr_ptr);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * num_reg  : %d",((bank_gpr<<_param->_shift_gpr) | gpr_ptr));
+
 	  internal_PUSH_GPR_VAL      [i] = val;
 	  internal_PUSH_GPR_NUM_BANK [i] = bank_gpr;
+	  internal_PUSH_GPR_NUM_REG  [i] = gpr_ptr ;
 
 	  PORT_WRITE(out_PUSH_GPR_VAL [i], val);
@@ -53,14 +88,41 @@
 	// PUSH_SPR
 	{
-	  uint32_t bank_spr;
-	  
-	  for (bank_spr=offset; bank_spr<offset+_param->_nb_bank_by_port_free; bank_spr++)
-	    if (spr_stat_list[bank_spr][spr_ptr].can_free())
-	      break;
+	  bool     val      = false;
+	  uint32_t bank_spr = offset;
 
-	  bool val = (bank_spr != (offset+_param->_nb_bank_by_port_free));
-	  
+#ifdef STAT_LIST_SCAN_ALL
+          for (uint32_t _spr_ptr=0;  _spr_ptr<_param->_nb_special_register_by_bank; ++_spr_ptr)
+            {
+              spr_ptr = (spr_ptr+1)%_param->_nb_special_register_by_bank;
+#endif	  
+              for (bank_spr = offset; bank_spr<offset+_param->_nb_bank_by_port_free; bank_spr++)
+                if (spr_stat_list[bank_spr][spr_ptr].can_free())
+                  {
+#ifdef STAT_LIST_SCAN_ALL
+                    Tspecial_address_t num_reg = ((bank_spr<<_param->_shift_spr) | spr_ptr);
+                    if (list_spr_free.find(num_reg) == list_spr_free.end())
+                      {
+                        list_spr_free.insert(num_reg);
+#endif
+                        val = true;
+                        break;
+#ifdef STAT_LIST_SCAN_ALL
+                      }
+#endif
+                  }
+#ifdef STAT_LIST_SCAN_ALL
+              if (val)
+                break;
+            }
+#endif	  
+
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * val      : %d",val);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * bank_spr : %d",bank_spr);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * spr_ptr  : %d",spr_ptr);
+          log_printf(TRACE,Stat_List_unit,FUNCTION,"    * num_reg  : %d",((bank_spr<<_param->_shift_spr) | spr_ptr));
+
 	  internal_PUSH_SPR_VAL      [i] = val;
 	  internal_PUSH_SPR_NUM_BANK [i] = bank_spr;
+	  internal_PUSH_SPR_NUM_REG  [i] = spr_ptr ;
 
 	  PORT_WRITE(out_PUSH_SPR_VAL [i], val);
@@ -68,4 +130,6 @@
 	    PORT_WRITE(out_PUSH_SPR_NUM_REG[i], ((bank_spr<<_param->_shift_spr) | spr_ptr));
 	}
+
+
       }
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Stat_List_unit/src/Stat_List_unit_transition.cpp	(revision 118)
@@ -233,5 +233,5 @@
 	    // =====================================================
 	    if (internal_PUSH_GPR_VAL [i] and PORT_READ(in_PUSH_GPR_ACK [i]))
-	      gpr_stat_list[internal_PUSH_GPR_NUM_BANK [i]][reg_GPR_PTR_FREE].free();
+	      gpr_stat_list[internal_PUSH_GPR_NUM_BANK [i]][internal_PUSH_GPR_NUM_REG [i]].free();
 	    
 	    // =====================================================
@@ -239,5 +239,5 @@
 	    // =====================================================
 	    if (internal_PUSH_SPR_VAL [i] and PORT_READ(in_PUSH_SPR_ACK [i]))
-	      spr_stat_list[internal_PUSH_SPR_NUM_BANK [i]][reg_SPR_PTR_FREE].free();
+	      spr_stat_list[internal_PUSH_SPR_NUM_BANK [i]][internal_PUSH_SPR_NUM_REG [i]].free();
 	  }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_transition.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Special_Register_unit/src/Special_Register_unit_transition.cpp	(revision 118)
@@ -133,4 +133,21 @@
                 }
             }
+
+#if (DEBUG >= DEBUG_TRACE) and (DEBUG_Special_Register_unit == true)
+        {
+          log_printf(TRACE,Special_Register_unit,FUNCTION,"  * Dump SPR");
+
+          for (uint32_t i=0; i<_param->_nb_front_end; i++)
+            for (uint32_t j=0; j<_param->_nb_context[i]; j++)
+              {
+                log_printf(TRACE,Special_Register_unit,FUNCTION,"    * SR        [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_SYSTEM_AND_CONTROL][SPR_SR          ]->read());
+                log_printf(TRACE,Special_Register_unit,FUNCTION,"    * CID       [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_SYSTEM_AND_CONTROL][SPR_CID         ]->read());
+                log_printf(TRACE,Special_Register_unit,FUNCTION,"    * TID       [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_SYSTEM_AND_CONTROL][SPR_TID         ]->read());
+                log_printf(TRACE,Special_Register_unit,FUNCTION,"    * TSR       [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_SYSTEM_AND_CONTROL][SPR_TSR         ]->read());
+//                 log_printf(TRACE,Special_Register_unit,FUNCTION,"    * MACLO     [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_MAC               ][SPR_MACLO      ]->read());
+//                 log_printf(TRACE,Special_Register_unit,FUNCTION,"    * MACHI     [%d][%d] : %.8x",i,j,_spr [i][j][GROUP_MAC               ][SPR_MACHI      ]->read());
+              }
+        }
+#endif
       }
 
