Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit.cpp	(revision 110)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h"
+#include "Behavioural/include/Simulation.h"
 
 namespace morpheo                    {
@@ -260,4 +261,8 @@
 	
 #endif
+
+        // Init stop condition
+        while (_simulation_nb_instruction_commited.size() < _param->_nb_thread)
+          _simulation_nb_instruction_commited.push_back(0);
       }
     log_end(Commit_unit,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp	(revision 110)
@@ -57,7 +57,8 @@
         }
     // Scan Top of each bank
+    internal_BANK_RETIRE_HEAD = reg_NUM_BANK_HEAD;
     for (uint32_t i=0; i<_param->_nb_bank; i++)
       {
-	uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
+	uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
 
 	if (not _rob[num_bank].empty())
@@ -167,4 +168,9 @@
 		    PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_OLD    [x][y], entry->num_reg_re_phy_old   );
 		    PORT_WRITE(out_RETIRE_NUM_REG_RE_PHY_NEW    [x][y], entry->num_reg_re_phy_new   );
+
+                    // Event -> rob must be manage this event
+                    if ((state == ROB_END_BRANCH_MISS) or
+                        (state == ROB_END_LOAD_MISS))
+                      can_retire [x] = false;
 		  }
 	      }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp	(revision 110)
@@ -28,43 +28,88 @@
 
     _stat_nb_inst_insert                = new counter_t * [_param->_nb_rename_unit];
-    _stat_nb_inst_retire_ok             = new counter_t * [_param->_nb_rename_unit];
-    _stat_nb_inst_retire_ko             = new counter_t * [_param->_nb_rename_unit];
+    _stat_nb_inst_retire                = new counter_t * [_param->_nb_rename_unit];
+    _stat_nb_inst_retire_ok             = new counter_t * [_param->_nb_thread];
+    _stat_nb_inst_retire_ko             = new counter_t * [_param->_nb_thread];
+    _stat_nb_inst_type                  = new counter_t * [_param->_nb_type];
     _stat_bank_nb_inst                  = new counter_t * [_param->_nb_bank];
     
     {
       std::string sum_nb_inst_insert    = "0";
-      std::string sum_nb_inst_retire_ok = "0";
-      std::string sum_nb_inst_retire_ko = "0";
+      std::string sum_nb_inst_retire    = "0";
 
       for (uint32_t i=0; i<_param->_nb_rename_unit; i++)
 	{
 	  _stat_nb_inst_insert    [i] = _stat->create_variable("nb_inst_insert_"   +toString(i));
-	  _stat_nb_inst_retire_ok [i] = _stat->create_variable("nb_inst_retire_ok_"+toString(i));
-	  _stat_nb_inst_retire_ko [i] = _stat->create_variable("nb_inst_retire_ko_"+toString(i));
+	  _stat_nb_inst_retire    [i] = _stat->create_variable("nb_inst_retire_"   +toString(i));
 	  
 	  _stat->create_expr_average_by_cycle("average_use_interface_insert_"+toString(i), "nb_inst_insert_"+toString(i), "", toString(_("Average instruction by cycle on insert interface (rename_unit %d)"),i));
-	  _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "+ nb_inst_retire_ok_"+toString(i)+" nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));
+	  _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "nb_inst_retire_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));
 	  _stat->create_expr_percent         ("percent_use_interface_insert_"+toString(i) , "average_use_interface_insert_"+toString(i), toString(_param->_nb_inst_insert [i]), toString(_("Percent usage of insert interface (rename_unit %d)"),i));
 	  _stat->create_expr_percent         ("percent_use_interface_retire_"+toString(i) , "average_use_interface_retire_"+toString(i), toString(_param->_nb_inst_retire [i]), toString(_("Percent usage of retire interface (rename_unit %d)"),i));
 
           sum_nb_inst_insert    = "+ nb_inst_insert_"+   toString(i) + " " +sum_nb_inst_insert;
-          sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok;
-          sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko;
-	}
+          sum_nb_inst_retire    = "+ nb_inst_retire_"+   toString(i) + " " +sum_nb_inst_retire;
+        }
 
       _stat->create_expr_average_by_cycle("average_inst_insert"   , sum_nb_inst_insert   , "", _("Average instruction insert by cycle"));
-      _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (IPC)"));
-      _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle"));
-      _stat->create_expr_average_by_cycle("average_inst_retire"   , "+ "+sum_nb_inst_retire_ok+" "+sum_nb_inst_retire_ko, "", _("Average instruction retire by cycle"));
+      _stat->create_expr_average_by_cycle("average_inst_retire"   , sum_nb_inst_retire   , "", _("Average instruction retire by cycle"));
+    }
 
-      _stat->create_expr                 ("IPC_ok" , "average_inst_retire_ok", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)");
+    {
+      std::string sum_nb_inst_retire_ok = "0";
+      std::string sum_nb_inst_retire_ko = "0";
+
+      for (uint32_t i=0; i<_param->_nb_thread; i++)
+        if (_param->_have_thread [i])
+          {
+            _stat_nb_inst_retire_ok [i] = _stat->create_variable("nb_inst_retire_ok_"+toString(i));
+            _stat_nb_inst_retire_ko [i] = _stat->create_variable("nb_inst_retire_ko_"+toString(i));
+            
+            sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok;
+            sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko;
+            
+            _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i), sum_nb_inst_retire_ok, "", toString(_("Average instruction retire ok by cycle (IPC) (thread %d)"),i));
+            _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i), sum_nb_inst_retire_ko, "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i));
+            
+            _stat->create_expr                 ("IPC_ok_"+toString(i) , "average_inst_retire_ok_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok) (thread %d)",i));
+            _stat->create_expr                 ("CPI_ok_"+toString(i) , "/ 1 IPC_ok_"+toString(i)            , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok) (thread %d)",i));
+            
+            _stat->create_expr                 ("IPC_ko_"+toString(i) , "average_inst_retire_ko_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ko) (thread %d)",i));
+            _stat->create_expr                 ("CPI_ko_"+toString(i) , "/ 1 IPC_ko_"+toString(i)            , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ko) (thread %d)",i));
+            
+            _stat->create_expr                 ("IPC_all_"+toString(i), "+ IPC_ok_"+toString(i)+" IPC_ko_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok and Ko) (thread %d)",i));
+            _stat->create_expr                 ("CPI_all_"+toString(i), "/ 1 IPC_all_"+toString(i)           , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok and Ko) (thread %d)",i));
+          }
+
+      _stat->create_expr                 ("IPC_ok" , "/ "+sum_nb_inst_retire_ok+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)");
       _stat->create_expr                 ("CPI_ok" , "/ 1 IPC_ok"            , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)");
 
-      _stat->create_expr                 ("IPC_ko" , "average_inst_retire_ko", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ko)");
+      _stat->create_expr                 ("IPC_ko" , "/ "+sum_nb_inst_retire_ko+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ko)");
       _stat->create_expr                 ("CPI_ko" , "/ 1 IPC_ko"            , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ko)");
 
-      _stat->create_expr                 ("IPC_all", "average_inst_retire"   , TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok and Ko)");
+      _stat->create_expr                 ("IPC_all", "+ IPC_ok IPC_ko"       , TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok and Ko)");
       _stat->create_expr                 ("CPI_all", "/ 1 IPC_all"           , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok and Ko)");
     }
+
+    {
+      std::string sum_nb_inst_type = "0";
+
+      for (uint32_t i=0; i<_param->_nb_type; i++)
+        if (is_type_valid(i))
+          {
+            _stat_nb_inst_type [i] = _stat->create_variable("nb_inst_type_"+toString(i));
+            
+            sum_nb_inst_type = "+ nb_inst_type_"+toString(i) + " " +sum_nb_inst_type;
+          }
+ 
+      for (uint32_t i=0; i<_param->_nb_type; i++)
+        if (is_type_valid(i))
+          {
+            std::string name = toString(static_cast<type_t>(i)).c_str();
+//          _stat->create_expr_average_by_cycle("average_inst_type_"+toString(name), "nb_inst_type_"+toString(i), "", toString(_("Average instruction retire ok by cycle (type %s)"),name.c_str()));
+            _stat->create_expr_percent         ("percent_inst_type_"+toString(name), "nb_inst_type_"+toString(i), sum_nb_inst_type, toString(_("Percent instruction retire ok by cycle (type %s)"),name.c_str()));
+          }
+    }
+
 
     _stat_nb_inst_commit = _stat->create_variable("nb_inst_commit");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp	(revision 110)
@@ -28,6 +28,8 @@
 
     delete [] _stat_nb_inst_insert;
+    delete [] _stat_nb_inst_retire;
     delete [] _stat_nb_inst_retire_ok;
     delete [] _stat_nb_inst_retire_ko;
+    delete [] _stat_nb_inst_type;
     delete [] _stat_bank_nb_inst;
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 110)
@@ -8,4 +8,5 @@
 
 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h"
+#include "Behavioural/include/Simulation.h"
 
 namespace morpheo                    {
@@ -114,9 +115,4 @@
 		{
 		  log_printf(TRACE,Commit_unit,FUNCTION,"  * INSERT            [%d][%d]",x,y);
-
-#ifdef STATISTICS
-                  if (usage_is_set(_usage,USE_STATISTICS))
-                    (*_stat_nb_inst_insert [x]) ++;
-#endif
 
                   // get information
@@ -219,4 +215,9 @@
                         }
                     }
+
+#ifdef STATISTICS
+                  if (usage_is_set(_usage,USE_STATISTICS))
+                    (*_stat_nb_inst_insert [x]) ++;
+#endif
 
                   // Push in rob
@@ -346,71 +347,96 @@
 	// ===================================================================
 	for (uint32_t i=0; i<_param->_nb_bank; i++)
-	  if (internal_BANK_RETIRE_VAL [i])
-	    {
-	      uint32_t x = internal_BANK_RETIRE_NUM_RENAME_UNIT [i];
-	      uint32_t y = internal_BANK_RETIRE_NUM_INST        [i];
-
-	      log_printf(TRACE,Commit_unit,FUNCTION,"  * RETIRE            [%d][%d]",x,y);
-
+          {
+            uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
+            
+            if (internal_BANK_RETIRE_VAL [num_bank])
+              {
+                uint32_t x = internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank];
+                uint32_t y = internal_BANK_RETIRE_NUM_INST        [num_bank];
+                
+                log_printf(TRACE,Commit_unit,FUNCTION,"  * RETIRE            [%d][%d]",x,y);
+                
 #ifdef DEBUG_TEST
-	      if (not PORT_READ(in_RETIRE_ACK [x][y]))
-		throw ERRORMORPHEO(FUNCTION,_("Retire : retire_ack must be set.\n"));
-#endif
-
-	      entry_t *  entry        =  _rob [i].front();
-              rob_state_t state = entry->state;
-              
-#ifdef STATISTICS
-              if (usage_is_set(_usage,USE_STATISTICS))
-                {
-                  if (state == ROB_END_OK)
-                    (*_stat_nb_inst_retire_ok [x]) ++;
-                  else
-                    (*_stat_nb_inst_retire_ko [x]) ++;
-                }
-#endif
-
-	      Tcontext_t front_end_id = entry->front_end_id;
-	      Tcontext_t context_id   = entry->context_id  ;
-	      Ttype_t    type         = entry->type        ;
-
-              if ((state == ROB_END_OK         ) or
-// 		  (state == ROB_END_KO         ) or 
-		  (state == ROB_END_BRANCH_MISS) or 
- 		  (state == ROB_END_LOAD_MISS  )//  or 
-// 		  (state == ROB_END_MISS       ) or 
-// 		  (state == ROB_END_EXCEPTION  )
-		  )
-                {
-//                reg_PC_PREVIOUS           [front_end_id][context_id] = reg_PC_CURRENT [front_end_id][context_id];
-                  reg_PC_CURRENT            [front_end_id][context_id] = reg_PC_NEXT    [front_end_id][context_id];
-                  reg_PC_CURRENT_IS_DS      [front_end_id][context_id] = entry->type == TYPE_BRANCH;
-                  reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id] = entry->no_sequence;
-                  reg_PC_NEXT               [front_end_id][context_id] = (entry->no_sequence)?(entry->address_next):(reg_PC_CURRENT [front_end_id][context_id]+1);
+                if (not PORT_READ(in_RETIRE_ACK [x][y]))
+                  throw ERRORMORPHEO(FUNCTION,_("Retire : retire_ack must be set.\n"));
+#endif
+                
+                entry_t *  entry        =  _rob [num_bank].front();
+                rob_state_t state = entry->state;
+                
+                Tcontext_t front_end_id = entry->front_end_id;
+                Tcontext_t context_id   = entry->context_id  ;
+                uint32_t   num_thread   = _param->_translate_num_context_to_num_thread [front_end_id][context_id];
+                Ttype_t    type         = entry->type        ;
+                bool       retire_ok    = false;
+
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * front_end_id : %d",front_end_id );
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * context_id   : %d",context_id   );
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * num_thread   : %d",num_thread   );
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * type         : %s",toString(type).c_str());
+                log_printf(TRACE,Commit_unit,FUNCTION,"    * state        : %s",toString(state).c_str());
+
+                if ((state == ROB_END_OK         ) or
+// 		    (state == ROB_END_KO         ) or 
+                    (state == ROB_END_BRANCH_MISS) or 
+                    (state == ROB_END_LOAD_MISS  )//  or 
+// 		    (state == ROB_END_MISS       ) or 
+// 		    (state == ROB_END_EXCEPTION  )
+                    )
+                  {
+                    log_printf(TRACE,Commit_unit,FUNCTION,"    * retire_ok");
+
+                    retire_ok = true;
+
+//                  reg_PC_PREVIOUS           [front_end_id][context_id] = reg_PC_CURRENT [front_end_id][context_id];
+                    reg_PC_CURRENT            [front_end_id][context_id] = reg_PC_NEXT    [front_end_id][context_id];
+                    reg_PC_CURRENT_IS_DS      [front_end_id][context_id] = entry->type == TYPE_BRANCH;
+                    reg_PC_CURRENT_IS_DS_TAKE [front_end_id][context_id] = entry->no_sequence;
+                    reg_PC_NEXT               [front_end_id][context_id] = (entry->no_sequence)?(entry->address_next):(reg_PC_CURRENT [front_end_id][context_id]+1);
 
 //                   if (entry->address_next != reg_PC_NEXT [front_end_id][context_id])
 //                     throw ERRORMORPHEO(FUNCTION,toString(_("Retire : Instruction's address_next (%.8x) is different of commit_unit's address_next (%.8x)"),entry->address_next,reg_PC_NEXT [front_end_id][context_id]));
-                }
-
-              if ((state == ROB_END_BRANCH_MISS) or
-                  (state == ROB_END_LOAD_MISS))
-                {
-                  reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
-                  reg_EVENT_FLUSH [front_end_id][context_id] = true;
-                }
-	      
-	      // Update nb_inst
-	      reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --;
-	      if (type == TYPE_MEMORY)
-		reg_NB_INST_COMMIT_MEM [front_end_id][context_id] --;
-
-	      reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
-	      
-	      _rob [i].pop_front();
-	      delete entry;
-
-              // Transaction on retire interface : reset watch dog timer.
-              _nb_cycle_idle [front_end_id][context_id] = 0;
-	    }
+                  }
+                
+                if ((state == ROB_END_BRANCH_MISS) or
+                    (state == ROB_END_LOAD_MISS))
+                  {
+                    reg_EVENT_STATE [front_end_id][context_id] = EVENT_STATE_EVENT;
+                    reg_EVENT_FLUSH [front_end_id][context_id] = true;
+                  }
+                
+                // Update nb_inst
+                reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --;
+                if (type == TYPE_MEMORY)
+                  reg_NB_INST_COMMIT_MEM [front_end_id][context_id] --;
+                
+                reg_NUM_BANK_HEAD = (reg_NUM_BANK_HEAD+1)%_param->_nb_bank;
+                
+                _rob [num_bank].pop_front();
+                delete entry;
+                
+                // Transaction on retire interface : reset watch dog timer.
+                _nb_cycle_idle [front_end_id][context_id] = 0;
+
+                // Increase stop condition
+                if (retire_ok)
+                  _simulation_nb_instruction_commited [num_thread] ++;
+
+#ifdef STATISTICS
+                if (usage_is_set(_usage,USE_STATISTICS))
+                  {
+                    (*_stat_nb_inst_retire [x]) ++;
+                    
+                    if (retire_ok)
+                      {
+                        (*_stat_nb_inst_retire_ok [num_thread]) ++;
+                        (*_stat_nb_inst_type      [type]      ) ++;
+                      }
+                    else
+                      (*_stat_nb_inst_retire_ko [num_thread]) ++;
+                  }
+#endif
+              }
+          }
 
 	// ===================================================================
@@ -652,5 +678,5 @@
         for (uint32_t j=0; j<_param->_nb_context [i]; j++)
           {
-            log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d]",i,j);
+            log_printf(TRACE,Commit_unit,FUNCTION,"    * [%d][%d] - %d",i,j,_param->_translate_num_context_to_num_thread [i][j]);
             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STATE  : %s",toString(reg_EVENT_STATE [i][j]).c_str());
             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_FLUSH  : %d",reg_EVENT_FLUSH [i][j]);
@@ -667,11 +693,12 @@
           log_printf(TRACE,Commit_unit,FUNCTION,"      * Bank [%d] size : %d, ptr : %d",num_bank,(int)_rob[num_bank].size(), reg_BANK_PTR [i]);
           
-          uint32_t x=0;
           for (std::list<entry_t*>::iterator it=_rob[num_bank].begin();
                it!=_rob[num_bank].end();
                it++)
             {
-              log_printf(TRACE,Commit_unit,FUNCTION,"        [%.4d] %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s - %d",
-                         x,
+              log_printf(TRACE,Commit_unit,FUNCTION,"        [%.4d][%.4d] (%.4d) %.4d %.4d %.4d %.4d, %.3d %.3d, %.1d, %.1d %.4d, %.1d %.4d, %s",
+                         num_bank                       ,
+                         (*it)->ptr                     ,
+                         ((num_bank << _param->_shift_num_bank) | (*it)->ptr),
                          (*it)->front_end_id            ,
                          (*it)->context_id              ,
@@ -685,7 +712,6 @@
                          (*it)->use_load_queue          ,
                          (*it)->load_queue_ptr_write    ,
-                         toString((*it)->state).c_str() ,
-                         (*it)->ptr                     );
-              log_printf(TRACE,Commit_unit,FUNCTION,"               %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ",
+                         toString((*it)->state).c_str() );
+              log_printf(TRACE,Commit_unit,FUNCTION,"                     %.1d %.2d %.6d, %.1d %.2d %.6d, %.1d %.1d %.6d, %.1d %.2d %.6d %.6d, %.1d %.1d %.6d %.6d ",
                          (*it)->read_ra                 ,
                          (*it)->num_reg_ra_log          ,
@@ -706,5 +732,5 @@
                          (*it)->num_reg_re_phy_new      );
               
-              log_printf(TRACE,Commit_unit,FUNCTION,"               %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)",
+              log_printf(TRACE,Commit_unit,FUNCTION,"                     %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)",
                          (*it)->exception_use ,
                          (*it)->exception     ,
@@ -717,6 +743,4 @@
                          (*it)->address_next<<2
                          );
-              
-              x++;
             }
         }
@@ -772,6 +796,6 @@
     for (uint32_t i=0; i<_param->_nb_front_end; i++)
       for (uint32_t j=0; j<_param->_nb_context [i]; j++)
-        if (_nb_cycle_idle [i][j] >= debug_cycle_idle)
-          throw ERRORMORPHEO(FUNCTION,toString(_("Context [%d][%d] is idle since %.0f cycles.\n"),i,j,_nb_cycle_idle [i][j]));
+        if (_nb_cycle_idle [i][j] >= debug_idle_cycle)
+          throw ERRORMORPHEO(FUNCTION,toString(_("Thread [%d] is idle since %.0f cycles.\n"),_param->_translate_num_context_to_num_thread[i][j],_nb_cycle_idle [i][j]));
 
     log_end(Commit_unit,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters.cpp	(revision 110)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Parameters.h"
+#include "Behavioural/include/Allocation.h"
 #include "Common/include/Max.h"
 #include "Common/include/BitManipulation.h"
@@ -20,24 +21,26 @@
 #undef  FUNCTION
 #define FUNCTION "Commit_unit::Parameters"
-  Parameters::Parameters (uint32_t            nb_front_end            ,
-			  uint32_t          * nb_context              ,
-			  uint32_t            nb_rename_unit          ,
-			  uint32_t            size_queue              ,
-			  uint32_t            nb_bank                 ,
-			  uint32_t          * nb_inst_insert          ,
-			  uint32_t          * nb_inst_retire          ,
-			  uint32_t            nb_inst_commit          ,
-			  uint32_t            nb_inst_reexecute       ,
-			  uint32_t            nb_inst_branch_complete ,
-			  uint32_t         ** nb_branch_speculated    ,
-                          uint32_t            size_nb_inst_decod      ,
-			  uint32_t            size_general_data       ,
-			  uint32_t            size_store_queue_ptr    ,
-			  uint32_t            size_load_queue_ptr     ,
-			  uint32_t            size_general_register   ,
-			  uint32_t            size_special_register   ,
-			  Tpriority_t         priority                ,
-			  Tload_balancing_t   load_balancing          ,
-			  uint32_t            nb_rename_unit_select   ,
+  Parameters::Parameters (uint32_t            nb_front_end                       ,
+			  uint32_t          * nb_context                         ,
+			  uint32_t            nb_rename_unit                     ,
+			  uint32_t            size_queue                         ,
+			  uint32_t            nb_bank                            ,
+			  uint32_t          * nb_inst_insert                     ,
+			  uint32_t          * nb_inst_retire                     ,
+			  uint32_t            nb_inst_commit                     ,
+			  uint32_t            nb_inst_reexecute                  ,
+			  uint32_t            nb_inst_branch_complete            ,
+			  uint32_t         ** nb_branch_speculated               ,
+                          uint32_t            size_nb_inst_decod                 ,
+			  uint32_t            size_general_data                  ,
+			  uint32_t            size_store_queue_ptr               ,
+			  uint32_t            size_load_queue_ptr                ,
+			  uint32_t            size_general_register              ,
+			  uint32_t            size_special_register              ,
+			  Tpriority_t         priority                           ,
+			  Tload_balancing_t   load_balancing                     ,
+			  uint32_t            nb_rename_unit_select              ,
+                          uint32_t            nb_thread                          ,
+                          uint32_t         ** translate_num_context_to_num_thread,
                           bool                is_toplevel):
     _nb_bank_access_commit (1              ),
@@ -46,18 +49,20 @@
     log_begin(Commit_unit,FUNCTION);
 
-    _nb_front_end             = nb_front_end           ;
-    _nb_context               = nb_context             ;
-    _nb_rename_unit           = nb_rename_unit         ;
-    _size_queue               = size_queue             ;
-    _nb_bank                  = nb_bank                ;
-    _nb_inst_insert           = nb_inst_insert         ;
-    _nb_inst_retire           = nb_inst_retire         ;
-    _nb_inst_commit           = nb_inst_commit         ;
-    _nb_inst_reexecute        = nb_inst_reexecute      ;
-    _nb_inst_branch_complete  = nb_inst_branch_complete;
-    _nb_branch_speculated     = nb_branch_speculated   ;
-    _priority                 = priority               ;
-    _load_balancing           = load_balancing         ;
-    _nb_rename_unit_select    = nb_rename_unit_select  ;
+    _nb_front_end                        = nb_front_end                       ;
+    _nb_context                          = nb_context                         ;
+    _nb_rename_unit                      = nb_rename_unit                     ;
+    _size_queue                          = size_queue                         ;
+    _nb_bank                             = nb_bank                            ;
+    _nb_inst_insert                      = nb_inst_insert                     ;
+    _nb_inst_retire                      = nb_inst_retire                     ;
+    _nb_inst_commit                      = nb_inst_commit                     ;
+    _nb_inst_reexecute                   = nb_inst_reexecute                  ;
+    _nb_inst_branch_complete             = nb_inst_branch_complete            ;
+    _nb_branch_speculated                = nb_branch_speculated               ;
+    _priority                            = priority                           ;
+    _load_balancing                      = load_balancing                     ;
+    _nb_rename_unit_select               = nb_rename_unit_select              ;
+    _nb_thread                           = nb_thread                          ;
+    _translate_num_context_to_num_thread = translate_num_context_to_num_thread;
 
     _size_rename_unit_id      = log2(_nb_rename_unit);
@@ -71,13 +76,17 @@
     _have_port_rename_unit_id = _size_rename_unit_id > 0;
 
-    _array_size_depth               = new uint32_t * [_nb_front_end];
+    ALLOC2(_array_size_depth,uint32_t,_nb_front_end,_nb_context [it1]);
     for (uint32_t i=0; i<_nb_front_end; i++)
-      {
-	_array_size_depth      [i]      = new uint32_t [_nb_context [i]];
-	for (uint32_t j=0; j<_nb_context [i]; j++)
-          _array_size_depth      [i][j] = (_nb_branch_speculated [i][j] == 0)?0:log2(_nb_branch_speculated [i][j]);
-      }
+      for (uint32_t j=0; j<_nb_context [i]; j++)
+        _array_size_depth      [i][j] = (_nb_branch_speculated [i][j] == 0)?0:log2(_nb_branch_speculated [i][j]);
 
     test();
+
+    ALLOC1(_have_thread,bool,_nb_thread);
+    for (uint32_t i=0; i<_nb_thread; i++)
+      _have_thread[i] = false;
+    for (uint32_t i=0; i<_nb_front_end; i++)
+      for (uint32_t j=0; j<_nb_context [i]; j++)
+        _have_thread[_translate_num_context_to_num_thread [i][j]] = true;
 
     if (is_toplevel)
@@ -123,9 +132,6 @@
     log_begin(Commit_unit,FUNCTION);
 
-    for (uint32_t i=0; i<_nb_front_end; i++)
-      {
-	delete [] _array_size_depth [i];
-      }
-    delete [] _array_size_depth;
+    DELETE1(_have_thread     ,_nb_thread);
+    DELETE2(_array_size_depth,_nb_front_end,_nb_context [it1]);
 
     log_end(Commit_unit,FUNCTION);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_msg_error.cpp	(revision 109)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_msg_error.cpp	(revision 110)
@@ -35,16 +35,29 @@
     
     if (_nb_rename_unit_select > _nb_rename_unit)
-      test.error("nb_rename_unit must be >= nb_rename_unit_select.\n");
+      test.error(_("nb_rename_unit must be >= nb_rename_unit_select.\n"));
 
     if (not is_multiple(_size_queue, _nb_bank))
-      test.error("nb_bank must be a multiple of size_queue.\n");
+      test.error(_("nb_bank must be a multiple of size_queue.\n"));
 
     if (_nb_inst_reexecute != 1)
-      test.error("nb_inst_reexecute must be set at 1. Anothers value is unsupported.\n");
+      test.error(_("nb_inst_reexecute must be set at 1. Anothers value is unsupported.\n"));
+
+    for (uint32_t i=0; i<_nb_front_end; ++i)
+      for (uint32_t j=0; j<_nb_context[i]; ++j)
+        if (_translate_num_context_to_num_thread [i][j] >= _nb_thread)
+          test.error(toString(_("num_thread [%d][%d] (%d) is >= at nb_thread (%d).\n"),i,j,_translate_num_context_to_num_thread [i][j],_nb_thread));
+    
+    for (uint32_t i=0; i<_nb_front_end; ++i)
+      for (uint32_t j=0; j<_nb_context[i]-1; ++j)
+        for (uint32_t x=i; x<_nb_front_end; ++x)
+          for (uint32_t y=j+1; y<_nb_context[i]; ++y)
+            if (_translate_num_context_to_num_thread [i][j] == _translate_num_context_to_num_thread [x][y])
+              test.error(toString(_("To context [%d][%d] and [%d][%d], num_thread is the same (%d).\n"),i,j,x,y,_translate_num_context_to_num_thread [i][j]));
+              
 
     if (_size_queue == 1)
-      test.information ("Instructions are issued In-Order.\n");
+      test.information (_("Instructions are issued In-Order.\n"));
     else
-      test.information ("Instructions are issued Out-Of-Order.\n");
+      test.information (_("Instructions are issued Out-Of-Order.\n"));
 
     log_end(Commit_unit,FUNCTION);
