Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 111)
@@ -31,4 +31,5 @@
 
 #include <iostream>
+#include <fstream>
 
 namespace morpheo {
@@ -275,4 +276,8 @@
 #endif
 
+#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
+  private   : std::ofstream                 * instruction_log_file;
+#endif
+
     // -----[ Methods ]---------------------------------------------------
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h	(revision 111)
@@ -96,67 +96,9 @@
 #endif
   public  : Taddress_t         address_next            ;
+#ifdef DEBUG
+  public  : double             cycle_rob_in            ;
+  public  : double             cycle_commit            ;
+#endif    
 
-//   public  : entry_t (uint32_t           ptr                     ,
-// 		     Tcontext_t         front_end_id            ,
-// 		     Tcontext_t         context_id              ,
-// 		     Tcontext_t         rename_unit_id          ,
-// 		     Tdepth_t           depth                   ,
-// 		     Ttype_t            type                    ,
-// 		     Toperation_t       operation               ,
-// 		     Tcontrol_t         is_delay_slot           ,
-// 		     Tgeneral_data_t    address                 ,
-// 		     Texception_t       exception               ,
-// 		     Texception_t       exception_use           ,
-// 		     Tlsq_ptr_t         store_queue_ptr_write   ,
-// 		     Tlsq_ptr_t         load_queue_ptr_write    ,
-// 		     Tcontrol_t         read_ra                 ,
-// 		     Tgeneral_address_t num_reg_ra_log          ,
-// 		     Tgeneral_address_t num_reg_ra_phy          ,
-// 		     Tcontrol_t         read_rb                 ,
-// 		     Tgeneral_address_t num_reg_rb_log          ,
-// 		     Tgeneral_address_t num_reg_rb_phy          ,
-// 		     Tcontrol_t         read_rc                 ,
-// 		     Tspecial_address_t num_reg_rc_log          ,
-// 		     Tspecial_address_t num_reg_rc_phy          ,
-// 		     Tcontrol_t         write_rd                ,
-// 		     Tgeneral_address_t num_reg_rd_log          ,
-// 		     Tgeneral_address_t num_reg_rd_phy_old      ,
-// 		     Tgeneral_address_t num_reg_rd_phy_new      ,
-// 		     Tcontrol_t         write_re                ,
-// 		     Tspecial_address_t num_reg_re_log          ,
-// 		     Tspecial_address_t num_reg_re_phy_old      ,
-// 		     Tspecial_address_t num_reg_re_phy_new      )
-//     {
-//       this->ptr                     = ptr                   ;
-//       this->front_end_id            = front_end_id          ;
-//       this->context_id              = context_id            ;
-//       this->rename_unit_id          = rename_unit_id        ;
-//       this->depth                   = depth                 ;
-//       this->type                    = type                  ;
-//       this->operation               = operation             ;
-//       this->is_delay_slot           = is_delay_slot         ;
-//       this->address                 = address               ;
-//       this->exception               = exception             ;
-//       this->exception_use           = exception_use         ;
-//       this->store_queue_ptr_write   = store_queue_ptr_write ;
-//       this->load_queue_ptr_write    = load_queue_ptr_write  ;
-//       this->read_ra                 = read_ra               ;
-//       this->num_reg_ra_log          = num_reg_ra_log        ;
-//       this->num_reg_ra_phy          = num_reg_ra_phy        ;
-//       this->read_rb                 = read_rb               ;
-//       this->num_reg_rb_log          = num_reg_rb_log        ;
-//       this->num_reg_rb_phy          = num_reg_rb_phy        ;
-//       this->read_rc                 = read_rc               ;
-//       this->num_reg_rc_log          = num_reg_rc_log        ;
-//       this->num_reg_rc_phy          = num_reg_rc_phy        ;
-//       this->write_rd                = write_rd              ;
-//       this->num_reg_rd_log          = num_reg_rd_log        ;
-//       this->num_reg_rd_phy_old      = num_reg_rd_phy_old    ;
-//       this->num_reg_rd_phy_new      = num_reg_rd_phy_new    ;
-//       this->write_re                = write_re              ;
-//       this->num_reg_re_log          = num_reg_re_log        ;
-//       this->num_reg_re_phy_old      = num_reg_re_phy_old    ;
-//       this->num_reg_re_phy_new      = num_reg_re_phy_new    ;
-//     }
   };
 
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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 111)
@@ -310,4 +310,15 @@
 #endif
 
+#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
+    instruction_log_file = new std::ofstream [_param->_nb_thread];
+    for (uint32_t i=0; i<_param->_nb_thread; ++i)
+      if (_param->_have_thread [i])
+        {
+          std::string filename = "Instruction_flow-thread_" + toString(i) + ".log";
+          
+          instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
+        }
+#endif
+
     log_end(Commit_unit,FUNCTION);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 111)
@@ -207,4 +207,12 @@
     delete _component;
 
+#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
+    for (uint32_t i=0; i<_param->_nb_thread; ++i)
+      if (_param->_have_thread [i])
+        {
+          instruction_log_file [i].close();
+        }
+#endif
+
     log_end(Commit_unit,FUNCTION);
   };
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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp	(revision 111)
@@ -59,5 +59,5 @@
       std::string sum_nb_inst_retire_ok = "0";
       std::string sum_nb_inst_retire_ko = "0";
-
+      std::string sum_average;
       for (uint32_t i=0; i<_param->_nb_thread; i++)
         if (_param->_have_thread [i])
@@ -68,8 +68,12 @@
             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_average           = "+ average_inst_retire_ok_"+toString(i)+" average_inst_retire_ko_"+toString(i);
+                        
+            _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i),"nb_inst_retire_ok_"+toString(i), "", toString(_("Average instruction retire ok by cycle (thread %d)"),i));
+            _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i),"nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i));
             
-            _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_percent         ("percent_inst_retire_ok_"+toString(i),"average_inst_retire_ok_"+toString(i), sum_average, toString(_("Percent instruction retire ok by cycle (thread %d)"),i));
+            _stat->create_expr_percent         ("percent_inst_retire_ko_"+toString(i),"average_inst_retire_ko_"+toString(i), sum_average, toString(_("Percent instruction retire ko 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));
@@ -82,4 +86,12 @@
           }
 
+      _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (all thread)"));
+      _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle (all thread)"));
+      
+      sum_average = "+ average_inst_retire_ok average_inst_retire_ko";
+
+      _stat->create_expr_percent         ("percent_inst_retire_ok","average_inst_retire_ok", sum_average, _("Percent instruction retire ok by cycle (all thread)"));
+      _stat->create_expr_percent         ("percent_inst_retire_ko","average_inst_retire_ko", sum_average, _("Percent instruction retire ko by cycle (all thread)"));
+            
       _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)");
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 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 111)
@@ -172,4 +172,8 @@
 #endif
 		  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
+#ifdef DEBUG
+                  entry->cycle_rob_in            = sc_simulation_time();
+                  entry->cycle_commit            = sc_simulation_time();
+#endif
 
                   // Test if exception :
@@ -340,4 +344,8 @@
                         (entry->read_rb))
 		    entry->address_next = PORT_READ(in_COMMIT_ADDRESS     [x]);
+
+#ifdef DEBUG
+                  entry->cycle_commit            = sc_simulation_time();
+#endif
 		  }
 	      }
@@ -406,4 +414,16 @@
                   }
                 
+#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
+                // log file
+                instruction_log_file [num_thread] 
+                  << "[" << sc_simulation_time() << "] "
+                  << "{" << ((retire_ok)?" OK ":"!KO!") << "} "
+                  << std::hex
+                  << "0x" << entry->address << " (0x" << (entry->address<<2) << ") "
+                  << std::dec
+                  << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
+                  << std::endl;
+#endif
+
                 // Update nb_inst
                 reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --;
