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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h	(revision 122)
@@ -143,4 +143,6 @@
   public    : SC_IN (Tcontrol_t         ) ***  in_RETIRE_EVENT_ACK                 ;//[nb_front_end][nb_context]
   public    : SC_OUT(Tevent_state_t     ) *** out_RETIRE_EVENT_STATE               ;//[nb_front_end][nb_context]
+  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_FLUSH               ;//[nb_front_end][nb_context]
+  public    : SC_OUT(Tcontrol_t         ) *** out_RETIRE_EVENT_STOP                ;//[nb_front_end][nb_context]
 										   
     // ~~~~~[ Interface : "commit" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	   
@@ -233,4 +235,5 @@
   private   : uint32_t                        reg_NUM_BANK_HEAD                    ;
   private   : uint32_t                        reg_NUM_BANK_TAIL                    ;
+  private   : uint32_t                        reg_NUM_PTR_TAIL                     ;
   private   : uint32_t                      * reg_BANK_PTR                         ;//[nb_bank]
 
@@ -238,7 +241,14 @@
   private   : Tcounter_t                   ** reg_NB_INST_COMMIT_MEM               ;//[nb_front_end][nb_context]
 
-  private   : Tevent_state_t               ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
-  private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
+  private   : Tcommit_event_state_t        ** reg_EVENT_STATE                      ;//[nb_front_end][nb_context]
+//private   : bool                         ** reg_EVENT_FLUSH                      ;//[nb_front_end][nb_context]
   private   : bool                         ** reg_EVENT_STOP                       ;//[nb_front_end][nb_context]
+  private   : uint32_t                     ** reg_EVENT_NUM_BANK                   ;//[nb_front_end][nb_context]
+  private   : uint32_t                     ** reg_EVENT_NUM_PTR                    ;//[nb_front_end][nb_context]
+  private   : bool                         ** reg_EVENT_CAN_RESTART                ;//[nb_front_end][nb_context]
+  private   : uint32_t                     ** reg_EVENT_PACKET                     ;//[nb_front_end][nb_context]
+  private   : bool                         ** reg_EVENT_LAST                       ;//[nb_front_end][nb_context]
+  private   : uint32_t                     ** reg_EVENT_LAST_NUM_BANK              ;//[nb_front_end][nb_context]
+  private   : uint32_t                     ** reg_EVENT_LAST_NUM_PTR               ;//[nb_front_end][nb_context]
 
 //private   : Taddress_t                   ** reg_PC_PREVIOUS                      ;//[nb_front_end][nb_context]
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h	(revision 122)
@@ -28,10 +28,16 @@
     {
       ROB_EMPTY                      , // 
+
       ROB_BRANCH_WAIT_END            , // 
       ROB_BRANCH_COMPLETE            , // 
-      ROB_STORE_WAIT_HEAD_OK         , // 
-//    ROB_STORE_WAIT_HEAD_KO         , // 
-      ROB_STORE_HEAD_OK              , // 
-      ROB_STORE_HEAD_KO              , // 
+
+      ROB_STORE_WAIT_END_OK          , // 
+      ROB_STORE_WAIT_END_KO          , // 
+      ROB_STORE_OK                   , // 
+      ROB_STORE_KO                   , // 
+      ROB_STORE_OK_WAIT_END          , // 
+      ROB_STORE_KO_WAIT_END          , // 
+      ROB_STORE_EVENT                , // 
+
       ROB_OTHER_WAIT_END             , // 
 
@@ -50,11 +56,24 @@
       ROB_END_EXCEPTION_WAIT_HEAD    , // 
       ROB_END_EXCEPTION_UPDATE       , // 
-      ROB_END_EXCEPTION                // 
+      ROB_END_EXCEPTION              , // 
+      ROB_END
+    } rob_state_t;
 
-    } rob_state_t;
+  typedef enum
+    {
+      COMMIT_EVENT_STATE_NO_EVENT  ,
+      COMMIT_EVENT_STATE_EVENT     ,
+      COMMIT_EVENT_STATE_WAIT_DECOD,
+      COMMIT_EVENT_STATE_WAIT_END  ,
+      COMMIT_EVENT_STATE_END     
+    } Tcommit_event_state_t;
+
+#define commit_event_state_to_event_state(x) ((x==COMMIT_EVENT_STATE_EVENT)?EVENT_STATE_EVENT:((x==COMMIT_EVENT_STATE_WAIT_DECOD)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_WAIT_END)?EVENT_STATE_WAITEND:((x==COMMIT_EVENT_STATE_END)?EVENT_STATE_END:EVENT_STATE_NO_EVENT))))
+
 
   class entry_t 
   {
   public  : rob_state_t        state                   ;
+  public  : rob_state_t        state_old               ;
   public  : uint32_t           ptr                     ;
   public  : Tcontext_t         front_end_id            ;
@@ -98,4 +117,5 @@
 //public  : Tgeneral_data_t    data_commit             ; // branch's destination
 #ifdef DEBUG
+  public  : Tgeneral_data_t    load_data               ;
   public  : Taddress_t         address                 ;
 #endif
@@ -121,8 +141,10 @@
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_BRANCH_WAIT_END            : return "ROB_BRANCH_WAIT_END"             ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_BRANCH_COMPLETE            : return "ROB_BRANCH_COMPLETE"             ; break;
-      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_WAIT_HEAD_OK         : return "ROB_STORE_WAIT_HEAD_OK"          ; break;
-//    case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_WAIT_HEAD_KO         : return "ROB_STORE_WAIT_HEAD_KO"          ; break;
-      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_HEAD_OK              : return "ROB_STORE_HEAD_OK"               ; break;
-      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_HEAD_KO              : return "ROB_STORE_HEAD_KO"               ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_WAIT_END_OK          : return "ROB_STORE_WAIT_END_OK"           ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_WAIT_END_KO          : return "ROB_STORE_WAIT_END_KO"           ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_OK                   : return "ROB_STORE_OK"                    ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_KO                   : return "ROB_STORE_KO"                    ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_OK_WAIT_END          : return "ROB_STORE_OK_WAIT_END"           ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_STORE_KO_WAIT_END          : return "ROB_STORE_KO_WAIT_END"           ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_OTHER_WAIT_END             : return "ROB_OTHER_WAIT_END"              ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_EVENT_WAIT_END             : return "ROB_EVENT_WAIT_END"              ; break;
@@ -140,4 +162,5 @@
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION_UPDATE       : return "ROB_END_EXCEPTION_UPDATE"        ; break;
       case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END_EXCEPTION              : return "ROB_END_EXCEPTION"               ; break;
+      case morpheo::behavioural::core::multi_ooo_engine::ooo_engine::commit_unit::ROB_END                        : return "ROB_END"                         ; break;
 
       default    : return ""      ; break;
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp	(revision 122)
@@ -141,4 +141,6 @@
       _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_ACK               ,ACK,_param->_nb_front_end,_param->_nb_context[it1]);
       _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STATE             ,"state"                ,Tevent_state_t    ,_param->_size_event_state           ,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_FLUSH             ,"flush"                ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_STOP              ,"stop"                 ,Tcontrol_t        ,1                                   ,_param->_nb_front_end,_param->_nb_context[it1]);
 
       ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
@@ -306,21 +308,28 @@
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-    ALLOC2(_nb_cycle_idle           ,double        ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC1(_rob                     ,std::list<entry_t*>,_param->_nb_bank);
+    ALLOC2(_nb_cycle_idle           ,double               ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC1(_rob                     ,std::list<entry_t*>  ,_param->_nb_bank);
     
-    ALLOC1(reg_BANK_PTR             ,uint32_t      ,_param->_nb_bank);
-
-    ALLOC2(reg_NB_INST_COMMIT_ALL   ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_NB_INST_COMMIT_MEM   ,Tcounter_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC1(reg_BANK_PTR             ,uint32_t             ,_param->_nb_bank);
+                                                          
+    ALLOC2(reg_NB_INST_COMMIT_ALL   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_NB_INST_COMMIT_MEM   ,Tcounter_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
     
-    ALLOC2(reg_EVENT_STATE          ,Tevent_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_EVENT_FLUSH          ,bool          ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_EVENT_STOP           ,bool          ,_param->_nb_front_end,_param->_nb_context [it1]);
-
-//  ALLOC2(reg_PC_PREVIOUS          ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_PC_CURRENT           ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
-    ALLOC2(reg_PC_NEXT              ,Taddress_t    ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_STATE          ,Tcommit_event_state_t,_param->_nb_front_end,_param->_nb_context [it1]);
+//  ALLOC2(reg_EVENT_FLUSH          ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_STOP           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_NUM_BANK       ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_NUM_PTR        ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_CAN_RESTART    ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_PACKET         ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_LAST           ,bool                 ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_LAST_NUM_BANK  ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_EVENT_LAST_NUM_PTR   ,uint32_t             ,_param->_nb_front_end,_param->_nb_context [it1]);
+                                                          
+//  ALLOC2(reg_PC_PREVIOUS          ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_PC_CURRENT           ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_PC_CURRENT_IS_DS     ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_PC_CURRENT_IS_DS_TAKE,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
+    ALLOC2(reg_PC_NEXT              ,Taddress_t           ,_param->_nb_front_end,_param->_nb_context [it1]);
       }
 
@@ -345,4 +354,5 @@
       if (_param->_have_thread [i])
         {
+          
           std::string filename = morpheo::filename(MORPHEO_LOG,
                                                    "Instruction_flow-thread_"+toString(i),
@@ -351,7 +361,9 @@
                                                    false,
                                                    log_with_pid,
-                                                   false);
+                                                   true);
+
+          log_printf(TRACE,Commit_unit,FUNCTION,"KANE : %s",filename.c_str());
           
-          instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
+          instruction_log_file [i].open(filename.c_str() ,std::ios::out | std::ios::trunc);
         }
 #endif
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp	(revision 122)
@@ -94,4 +94,6 @@
         DELETE2_SIGNAL( in_RETIRE_EVENT_ACK               ,_param->_nb_front_end,_param->_nb_context[it1],1);
         DELETE2_SIGNAL(out_RETIRE_EVENT_STATE             ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_event_state);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_FLUSH             ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_STOP              ,_param->_nb_front_end,_param->_nb_context[it1],1);
 
         DELETE1_SIGNAL( in_COMMIT_VAL               ,_param->_nb_inst_commit,1                             );
@@ -202,7 +204,16 @@
         DELETE2(reg_NB_INST_COMMIT_ALL   ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_NB_INST_COMMIT_MEM   ,_param->_nb_front_end,_param->_nb_context [it1]);
+
         DELETE2(reg_EVENT_STATE          ,_param->_nb_front_end,_param->_nb_context [it1]);
-        DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
+//      DELETE2(reg_EVENT_FLUSH          ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_EVENT_STOP           ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_NUM_BANK       ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_NUM_PTR        ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_CAN_RESTART    ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_PACKET         ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_LAST           ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_LAST_NUM_BANK  ,_param->_nb_front_end,_param->_nb_context [it1]);
+        DELETE2(reg_EVENT_LAST_NUM_PTR   ,_param->_nb_front_end,_param->_nb_context [it1]);
+
 //      DELETE2(reg_PC_PREVIOUS          ,_param->_nb_front_end,_param->_nb_context [it1]);
         DELETE2(reg_PC_CURRENT           ,_param->_nb_front_end,_param->_nb_context [it1]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_insert.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_insert.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_insert.cpp	(revision 122)
@@ -30,11 +30,13 @@
 #endif
     bool       can_rename_select [_param->_nb_rename_unit];
-    bool       event_stop;
-   
+//     bool       event_stop;
+    
+//     //     Initialisation
+//     event_stop = false; // one signal for all context.
+//     for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+//       for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+//         event_stop |= reg_EVENT_STOP [i][j];   
+
 //     Initialisation
-    event_stop = false; // one signal for all context.
-    for (uint32_t i=0; i<_param->_nb_front_end; ++i)
-      for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
-        event_stop |= reg_EVENT_STOP [i][j];
     for (uint32_t i=0; i<_param->_nb_bank; i++)
       {
@@ -57,5 +59,5 @@
 //     log_printf(TRACE,Commit_unit,FUNCTION,"  * reg_NUM_BANK_TAIL : %d",reg_NUM_BANK_TAIL);
 
-    if (not event_stop)
+//     if (not event_stop)
       {
         std::list<generic::priority::select_t> * select_insert = _priority_insert ->select(); // same select for all insert
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMealy_retire.cpp	(revision 122)
@@ -56,4 +56,5 @@
 
         }
+
     // Scan Top of each bank
     internal_BANK_RETIRE_HEAD = reg_NUM_BANK_HEAD;
@@ -62,4 +63,5 @@
 	uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
 
+        // Test if have instruction
 	if (not _rob[num_bank].empty())
 	  {
@@ -68,5 +70,5 @@
 	    uint32_t   x     = entry->rename_unit_id;
 	    uint32_t   y     = num_inst_retire [x];
-	
+	    bool       bypass= false;
             // test if :
             //  * can retire (all previous instruction is retired)
@@ -77,4 +79,7 @@
 	      {
 		rob_state_t state        = entry->state;
+                Tcontext_t  front_end_id = entry->front_end_id;
+                Tcontext_t  context_id   = entry->context_id;  
+                
                   if ((state == ROB_END_OK         ) or 
                       (state == ROB_END_KO         ) or 
@@ -87,6 +92,4 @@
                       Tcontrol_t         write_re       = entry->write_re;
                       Tspecial_address_t num_reg_re_log = entry->num_reg_re_log;
-                      Tcontext_t         front_end_id   = entry->front_end_id;
-                      Tcontext_t         context_id     = entry->context_id;  
                       
                       // if state is ok, when write flags in the SR regsiters
@@ -173,8 +176,21 @@
                         can_retire [x] = false;
                     }
+
+                  bypass = ((state == ROB_END              ) or 
+                            (state == ROB_STORE_OK         ) or 
+                            (state == ROB_STORE_KO         ) or
+                            (state == ROB_STORE_OK_WAIT_END) or 
+                            (state == ROB_STORE_KO_WAIT_END));
+                  
+                  uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank);
+
+                  // if future event, don't update after this event
+                  if (reg_EVENT_STOP [front_end_id][context_id] and
+                      (reg_EVENT_PACKET [entry->front_end_id][entry->context_id]  == packet))
+                    bypass = false;
 	      }
 
 	    // Retire "in-order"
-	    can_retire [x] &= retire_val [x][y];
+	    can_retire [x]  &= (retire_val [x][y] or bypass);
 	  }
       }
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp	(revision 122)
@@ -28,48 +28,83 @@
     // ===================================================================
     {
-      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;
-      uint32_t   num_bank = reg_NUM_BANK_HEAD;
-
-      if (not _rob[num_bank].empty())
+      uint32_t nb_scan_bank = 0; // last scan bank
+      bool     can_continue = true;
+
+      // for each reexecute_port
+      for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i)
 	{
-          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;
-
-          // Test state
-	  val   = ((state == ROB_STORE_HEAD_OK) or
-		   (state == ROB_STORE_HEAD_KO));
-
-          log_printf(TRACE,Commit_unit,FUNCTION,"    * val           : %d",val);
-	  if (val)
+	  log_printf(TRACE,Commit_unit,FUNCTION,"  * REEXECUTE [%d]",i);
+	  
+	  // 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;
+
+	  for (uint32_t j=nb_scan_bank; j<_param->_nb_bank; j++)
 	    {
-              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)
-  	      PORT_WRITE(out_REEXECUTE_CONTEXT_ID            [0], entry->context_id           );
-	      if (_param->_have_port_front_end_id)
-  	      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], packet_id                   );
-	      PORT_WRITE(out_REEXECUTE_TYPE                  [0], entry->type                 );
-	      PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_WRITE [0], entry->store_queue_ptr_write);
-	      PORT_WRITE(out_REEXECUTE_OPERATION             [0], (state == ROB_STORE_HEAD_OK)?OPERATION_MEMORY_STORE_HEAD_OK:OPERATION_MEMORY_STORE_HEAD_KO);
-	    }
+	      nb_scan_bank ++;
+	      
+              // translate bank number
+	      uint32_t num_bank = (reg_NUM_BANK_HEAD+j)%_param->_nb_bank;
+	      
+	      log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank      : %d",num_bank);
+
+	      // Test if the head of rob is not empty
+	      if (not _rob[num_bank].empty())
+		{
+		  log_printf(TRACE,Commit_unit,FUNCTION,"    * ROB is not empty");
+		  
+		  // Read state
+		  entry_t    * entry = _rob [num_bank].front();
+		  rob_state_t  state = entry->state;
+		  
+		  // Test state
+		  //  * store is ko, send signal at store_queue
+		  //  * store_is ok, test if in head
+// 		  val   = (((state == ROB_STORE_OK) and (num_bank == (reg_NUM_BANK_HEAD))) or
+// 			    (state == ROB_STORE_KO)  or
+// 			    (state == ROB_STORE_EVENT)
+// 			    );
+		  val   = (((state == ROB_STORE_OK) and can_continue) or
+			    (state == ROB_STORE_KO)  or
+			    (state == ROB_STORE_EVENT)
+			    );
+		  
+                  can_continue &= ((state == ROB_STORE_OK          ) or
+                                   (state == ROB_STORE_OK_WAIT_END ) or
+                                   (state == ROB_END_OK_SPECULATIVE) or
+                                   (state == ROB_END_OK            ) or
+                                   (state == ROB_END               )
+                                   );
+
+		  log_printf(TRACE,Commit_unit,FUNCTION,"    * val           : %d",val);
+
+		  if (val)
+		    {
+		      internal_REEXECUTE_NUM_BANK [i] = num_bank;
+
+		      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)
+		      PORT_WRITE(out_REEXECUTE_CONTEXT_ID            [i], entry->context_id           );
+		      if (_param->_have_port_front_end_id)
+		      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], packet_id                   );
+		      PORT_WRITE(out_REEXECUTE_TYPE                  [i], entry->type                 );
+		      PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_WRITE [i], entry->store_queue_ptr_write);
+		      PORT_WRITE(out_REEXECUTE_OPERATION             [i], (state == ROB_STORE_OK)?OPERATION_MEMORY_STORE_HEAD_OK:OPERATION_MEMORY_STORE_HEAD_KO);
+
+		      break; // Stop scan
+		    }
+		}
+	    }  
+
+	  internal_REEXECUTE_VAL      [i] = val;
+	  PORT_WRITE(out_REEXECUTE_VAL[i], internal_REEXECUTE_VAL [i]);
 	}
- 
-      internal_REEXECUTE_VAL      [0] = val;
-      internal_REEXECUTE_NUM_BANK [0] = num_bank;
-      
-      PORT_WRITE(out_REEXECUTE_VAL[0], internal_REEXECUTE_VAL [0]);
     }
 
@@ -79,9 +114,12 @@
     {
       // Branchement must be send at the prediction unit
-      uint32_t nb_scan_bank = 0;
+
+      uint32_t nb_scan_bank = 0; // last scan bank
 
       // for each port, find a valid branchement.
       for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
 	{
+          log_printf(TRACE,Commit_unit,FUNCTION,"  * BRANCH_COMPLETE [%d]",i);
+
 	  Tcontrol_t  val  = false;
 	  
@@ -92,20 +130,65 @@
               // translate bank number
 	      uint32_t num_bank = (reg_NUM_BANK_HEAD+j)%_param->_nb_bank;
+
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank           : %d",num_bank);
 	      
+              // Test if in this bank, they have an instruction
 	      if (not _rob [num_bank].empty())
 		{
+                  log_printf(TRACE,Commit_unit,FUNCTION,"    * not empty");
+
+                  // Read information
 		  entry_t    * entry    = _rob [num_bank].front();
 		  rob_state_t  state    = entry->state;
-		  
-		  if (state == ROB_BRANCH_COMPLETE)
+		  Tcontext_t   front_end_id = entry->front_end_id;
+		  Tcontext_t   context_id   = entry->context_id  ;
+
+                  log_printf(TRACE,Commit_unit,FUNCTION,"    * front_end_id       : %d",front_end_id);
+                  log_printf(TRACE,Commit_unit,FUNCTION,"    * context_id         : %d",context_id  );
+
+                  // don't complete a branch when rob manage an present event
+		  if ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NO_EVENT) and
+                      (state == ROB_BRANCH_COMPLETE))
 		    {
-		      val = true;
-		      
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * find !!!");
+
+                      // test if have a future event (stop is set)
+                      log_printf(TRACE,Commit_unit,FUNCTION,"      * reg_EVENT_STOP   : %d",reg_EVENT_STOP [front_end_id][context_id]);
+
+                      if (reg_EVENT_STOP [front_end_id][context_id])
+                        {
+                          // Have future event, can complete the branch if the event is most speculative than this branchement
+                          // Also, need compare packet_id (is order)
+
+                          uint32_t _top = ((_rob[reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
+                          uint32_t _old = reg_EVENT_PACKET [front_end_id][context_id];
+                          uint32_t _new = ((entry->ptr << _param->_shift_num_slot) | num_bank);
+
+//                           log_printf(TRACE,Commit_unit,FUNCTION,"      * _top             : %d",_top);
+//                           log_printf(TRACE,Commit_unit,FUNCTION,"      * _old (before)    : %d",_old);
+//                           log_printf(TRACE,Commit_unit,FUNCTION,"      * _new (before)    : %d",_new);
+
+                          if (_old < _top) _old = _old+_param->_size_queue;
+                          if (_new < _top) _new = _new+_param->_size_queue;
+                          if (_new < _old) val = true;
+
+//                           log_printf(TRACE,Commit_unit,FUNCTION,"      * _old (after )    : %d",_old);
+//                           log_printf(TRACE,Commit_unit,FUNCTION,"      * _new (after )    : %d",_new);
+
+                        }
+                      else
+                        val = true;
+		      
+                      log_printf(TRACE,Commit_unit,FUNCTION,"      * val              : %d",val);
+
+                      if (val)
+                        {
+                          // Have an valid branchement to complete
 		      internal_BRANCH_COMPLETE_NUM_BANK           [i] = num_bank;
 		      
+		      if (_param->_have_port_front_end_id)
+		      PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ID [i],        front_end_id    );
 		      if (_param->_have_port_context_id)
-		      PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_ID   [i], entry->context_id      );
-		      if (_param->_have_port_front_end_id)
-		      PORT_WRITE(out_BRANCH_COMPLETE_FRONT_END_ID [i], entry->front_end_id    );
+		      PORT_WRITE(out_BRANCH_COMPLETE_CONTEXT_ID   [i],        context_id      );
 		      if (_param->_have_port_depth)
 		      PORT_WRITE(out_BRANCH_COMPLETE_DEPTH        [i], entry->depth           );
@@ -114,5 +197,6 @@
 		      PORT_WRITE(out_BRANCH_COMPLETE_NO_SEQUENCE  [i], entry->no_sequence     );
 		      
-		      break;
+		      break; // Stop scan
+                        }
 		    }
 		}
@@ -131,4 +215,5 @@
       internal_UPDATE_NUM_BANK = reg_NUM_BANK_HEAD;
 
+      // Test if have an instruction
       if (not _rob[internal_UPDATE_NUM_BANK].empty())
 	{
@@ -138,4 +223,6 @@
 	  entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
 
+          // Test state
+          // Update if exception or load miss
           switch (entry->state)
             {
@@ -208,5 +295,14 @@
     for (uint32_t i=0; i<_param->_nb_front_end; i++)
       for (uint32_t j=0; j<_param->_nb_context [i]; j++)
-        PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], reg_EVENT_STATE[i][j]);
+        {
+//        bool flush = reg_EVENT_FLUSH [i][j];
+          bool flush = (((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_EVENT) or
+                         (reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_WAIT_DECOD)) and
+                        not reg_EVENT_CAN_RESTART[i][j]);
+
+          PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], commit_event_state_to_event_state(reg_EVENT_STATE[i][j]));
+          PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush);
+          PORT_WRITE(out_RETIRE_EVENT_STOP  [i][j], reg_EVENT_STOP [i][j]);
+        }
 
     log_end(Commit_unit,FUNCTION);
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp	(revision 122)
@@ -16,5 +16,4 @@
 namespace ooo_engine {
 namespace commit_unit {
-
   
 #undef  FUNCTION
@@ -41,4 +40,5 @@
 	reg_NUM_BANK_HEAD = 0;
 	reg_NUM_BANK_TAIL = 0;
+        reg_NUM_PTR_TAIL  = 0;
 
         // Reset counter
@@ -51,7 +51,8 @@
 	      reg_NB_INST_COMMIT_MEM    [i][j] = 0;
                                         
-              reg_EVENT_STATE           [i][j] = EVENT_STATE_NO_EVENT;
-              reg_EVENT_FLUSH           [i][j] = false;
+              reg_EVENT_STATE           [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
+//            reg_EVENT_FLUSH           [i][j] = false;
               reg_EVENT_STOP            [i][j] = false;
+              reg_EVENT_LAST            [i][j] = false;
 
 //            reg_PC_PREVIOUS           [i][j] = (0x100-4)>>2;
@@ -80,169 +81,246 @@
 	for (uint32_t i=0; i<_param->_nb_front_end; i++)
 	  for (uint32_t j=0; j<_param->_nb_context [i]; j++)
-            switch (reg_EVENT_STATE [i][j])
-              {
-              case EVENT_STATE_EVENT    : 
+            {
+              // Test if can_restart : (can_restart is to signal at the state than the decod_queue is empty)
+              //   *     no previous can_restart (trap for one)
+              //   * and decod_queue is empty
+              //   * and have an event or have a futur event
+              if (not reg_EVENT_CAN_RESTART [i][j] and
+                   (PORT_READ(in_NB_INST_DECOD_ALL [i][j]) == 0) and
+                   (reg_EVENT_STOP [i][j] or (reg_EVENT_STATE [i][j] != COMMIT_EVENT_STATE_NO_EVENT)))
+                reg_EVENT_CAN_RESTART [i][j] = true;
+
+              // Test event state
+              switch (reg_EVENT_STATE [i][j])
                 {
-                  if (internal_RETIRE_EVENT_VAL [i][j] and in_RETIRE_EVENT_ACK [i][j])
-                    reg_EVENT_STATE [i][j] = EVENT_STATE_WAITEND ; 
-                  break;
+                case COMMIT_EVENT_STATE_EVENT    : 
+                  {
+                    // Have an event, test if all composant have ack
+                    if (internal_RETIRE_EVENT_VAL [i][j] and in_RETIRE_EVENT_ACK [i][j])
+                      {
+                        // A minor optimisation : test if wait_decod is previously empty.
+                        if (not reg_EVENT_CAN_RESTART [i][j])
+                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_DECOD;
+                        else
+                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END; 
+                      }
+                    
+                    break;
+                  }
+                case COMMIT_EVENT_STATE_WAIT_DECOD : 
+                  {
+                    // Wait flush of decod_queue.
+                    // Test if can restart now
+                    if (reg_EVENT_CAN_RESTART [i][j])
+                      {
+                        //reg_EVENT_FLUSH [i][j] = false;
+
+                        // A minor optimisation : test if the last element is already retire
+                        if (not reg_EVENT_LAST [i][j])
+                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END;
+                        else
+                          reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_END; 
+                      }
+                    break;
+                  }
+                case COMMIT_EVENT_STATE_WAIT_END : 
+                  {
+                    // Wait the flush of Re Order Buffer.
+                    // Test if the last element is retire
+                    if (reg_EVENT_LAST [i][j])
+                      reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_END ; 
+                    
+                    break;
+                  }
+                case COMMIT_EVENT_STATE_END      :
+                  {
+                    // Just one cycle
+                    
+                    // flush of re order buffer is finish
+                    reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_NO_EVENT;
+                    reg_EVENT_LAST  [i][j] = false;
+                    break;
+                  }
+                  //case COMMIT_EVENT_STATE_NO_EVENT : 
+                default : break;
                 }
-              case EVENT_STATE_WAITEND  : 
+            }
+
+	// ===================================================================
+	// =====[ INSERT ]====================================================
+	// ===================================================================
+        {
+          // variable to count instruction insert
+          uint32_t nb_insert = 0;
+
+          for (uint32_t i=0; i<_param->_nb_bank; i++)
+            {
+              // compute first bank number
+              uint32_t num_bank = (reg_NUM_BANK_TAIL+i)%_param->_nb_bank;
+              
+              if (internal_BANK_INSERT_VAL [num_bank])
                 {
-                  Tcounter_t nb_inst_all = PORT_READ(in_NB_INST_DECOD_ALL [i][j]) + reg_NB_INST_COMMIT_ALL [i][j];
-                  if (nb_inst_all == 0)
+                  // get rename unit source and instruction.
+                  uint32_t x = internal_BANK_INSERT_NUM_RENAME_UNIT [num_bank];
+                  uint32_t y = internal_BANK_INSERT_NUM_INST        [num_bank];
+                  
+                  // Test if an instruction is valid
+                  // (all in_order insert combinatory is in rename_unit )
+                  if (PORT_READ(in_INSERT_VAL [x][y]))
                     {
-                      reg_EVENT_STATE [i][j] = EVENT_STATE_END;
-                      reg_EVENT_FLUSH [i][j] = false;
-                      //reg_EVENT_STOP  [i][j] = false;
+                      log_printf(TRACE,Commit_unit,FUNCTION,"  * INSERT            [%d][%d]",x,y);
+                      
+                      // get information
+                      Tcontext_t   front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [x][y]):0;
+                      Tcontext_t   context_id   = (_param->_have_port_context_id  )?PORT_READ(in_INSERT_CONTEXT_ID   [x][y]):0;
+                      Ttype_t      type         = PORT_READ(in_INSERT_TYPE         [x][y]);
+                      Toperation_t operation    = PORT_READ(in_INSERT_OPERATION    [x][y]);
+                      bool         is_store     = is_operation_memory_store(operation);
+                      
+                      Texception_t exception    = PORT_READ(in_INSERT_EXCEPTION    [x][y]);
+                      Tcontrol_t   no_execute   = PORT_READ(in_INSERT_NO_EXECUTE   [x][y]);
+                      
+                      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,"    * type           : %s",toString(type).c_str());
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * operation      : %d",operation );
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * exception      : %d",exception );
+                      
+                      // Create new entry and write information
+                      entry_t * entry = new entry_t;
+                      uint32_t  ptr   = reg_BANK_PTR [num_bank];
+
+	              entry->ptr                     = ptr;
+	              entry->front_end_id            = front_end_id;
+	              entry->context_id              = context_id  ;
+	              entry->rename_unit_id          = x;
+	              entry->depth                   = (_param->_have_port_depth)?PORT_READ(in_INSERT_DEPTH [x][y]):0;
+	              entry->type                    = type;
+	              entry->operation               = operation;
+	              entry->is_delay_slot           = PORT_READ(in_INSERT_IS_DELAY_SLOT         [x][y]);
+// 	              entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
+	              entry->exception               = exception;
+	              entry->exception_use           = PORT_READ(in_INSERT_EXCEPTION_USE         [x][y]);
+	              entry->use_store_queue         = (type == TYPE_MEMORY) and (    is_store) and (not no_execute);
+	              entry->use_load_queue          = (type == TYPE_MEMORY) and (not is_store) and (not no_execute);
+	              entry->store_queue_ptr_write   = PORT_READ(in_INSERT_STORE_QUEUE_PTR_WRITE [x][y]);
+	              entry->load_queue_ptr_write    = (_param->_have_port_load_queue_ptr)?PORT_READ(in_INSERT_LOAD_QUEUE_PTR_WRITE [x][y]):0;
+#ifdef DEBUG        
+	              entry->read_ra                 = PORT_READ(in_INSERT_READ_RA               [x][y]);
+	              entry->num_reg_ra_log          = PORT_READ(in_INSERT_NUM_REG_RA_LOG        [x][y]);
+	              entry->num_reg_ra_phy          = PORT_READ(in_INSERT_NUM_REG_RA_PHY        [x][y]);
+	              entry->read_rb                 = PORT_READ(in_INSERT_READ_RB               [x][y]);
+	              entry->num_reg_rb_log          = PORT_READ(in_INSERT_NUM_REG_RB_LOG        [x][y]);
+	              entry->num_reg_rb_phy          = PORT_READ(in_INSERT_NUM_REG_RB_PHY        [x][y]);
+	              entry->read_rc                 = PORT_READ(in_INSERT_READ_RC               [x][y]);
+	              entry->num_reg_rc_log          = PORT_READ(in_INSERT_NUM_REG_RC_LOG        [x][y]);
+	              entry->num_reg_rc_phy          = PORT_READ(in_INSERT_NUM_REG_RC_PHY        [x][y]);
+#endif                
+	              entry->write_rd                = PORT_READ(in_INSERT_WRITE_RD              [x][y]);
+	              entry->num_reg_rd_log          = PORT_READ(in_INSERT_NUM_REG_RD_LOG        [x][y]);
+	              entry->num_reg_rd_phy_old      = PORT_READ(in_INSERT_NUM_REG_RD_PHY_OLD    [x][y]);
+	              entry->num_reg_rd_phy_new      = PORT_READ(in_INSERT_NUM_REG_RD_PHY_NEW    [x][y]);
+	              entry->write_re                = PORT_READ(in_INSERT_WRITE_RE              [x][y]);
+	              entry->num_reg_re_log          = PORT_READ(in_INSERT_NUM_REG_RE_LOG        [x][y]);
+	              entry->num_reg_re_phy_old      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD    [x][y]);
+	              entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
+                      entry->no_sequence             = type == TYPE_BRANCH;
+                      entry->speculative             = true;
+#ifdef DEBUG        
+	              entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
+#endif                
+	              entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
+#ifdef DEBUG        
+                      entry->cycle_rob_in            = simulation_cycle();
+                      entry->cycle_commit            = simulation_cycle();
+#endif      
+            
+                      // Test if exception :
+                      //  * yes : no execute instruction, wait ROB Head
+                      //  * no  : test if no_execute (== instruction is flushed)
+                      //          else test type
+                      //            * BRANCH : l.j   -> branch is ended
+                      //                       other -> wait the execution end of branchment
+                      //            * MEMORY : store -> wait store is at head of ROB
+                      //                       other -> wait end of instruction
+                      //            * OTHER
+            
+                      {
+                        if (exception == EXCEPTION_NONE)
+                          {
+                            // no_execute : l.j, l.nop, l.rfe
+                            
+                            log_printf(TRACE,Commit_unit,FUNCTION,"    * no_execute     : %d",no_execute);
+                            
+                            switch (type)
+                              {
+                              case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END  ; break;}
+                              case TYPE_MEMORY : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:(entry->state=(is_store  ==1)?ROB_STORE_WAIT_END_OK:ROB_OTHER_WAIT_END); break;}
+                              default          : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;}
+                              }
+                          }
+                        else
+                          {
+                            // Have an exception : wait head of ROB
+                            // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap
+                            
+                            entry->state = ROB_END_EXCEPTION_WAIT_HEAD;
+                          }
+                      }
+
+#ifdef STATISTICS
+                      if (usage_is_set(_usage,USE_STATISTICS))
+                        (*_stat_nb_inst_insert [x]) ++;
+#endif
+                    
+                      // Push entry in rob
+                      _rob[num_bank].push_back(entry);
+                      
+                      // Update counter and pointer
+                      reg_NB_INST_COMMIT_ALL [front_end_id][context_id] ++;
+                      if (type == TYPE_MEMORY)
+                        reg_NB_INST_COMMIT_MEM [front_end_id][context_id] ++;
+                      
+
+                      // flush = present event or future event.
+                      //  * present event = don't can restart
+
+//                       bool flush = reg_EVENT_FLUSH [front_end_id][context_id];
+
+//                       bool flush = (((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
+//                                      (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD)) or
+//                                     (reg_EVENT_STOP [front_end_id][context_id]));
+                      
+                      // New instruction from decod_queue. Flush if :
+                      //     * future event (instruction don't need execute because they are a previous event (miss load/branch or exception))
+                      //     * or present_event 
+                      //   * and not can_restart (previous empty decod queue), because between the event_stop (branch_complete) and the state event (miss in head), many cycle is occured.
+                      bool flush = ((// present event
+                                     ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
+                                      (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD)) or
+                                     // futur event
+                                     reg_EVENT_STOP [front_end_id][context_id])
+                                    // can't restart
+                                    and not reg_EVENT_CAN_RESTART[front_end_id][context_id]
+                                    );
+
+                      if (flush)
+                        {
+                          // A new invalid instruction is push in rob -> new last instruction
+                          reg_EVENT_LAST          [front_end_id][context_id] = false;
+                          reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = num_bank;
+                          reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = ptr;
+                        }
+                      
+                      // Update pointer
+                      reg_NUM_PTR_TAIL  = ptr;
+                      reg_BANK_PTR [num_bank]  = (reg_BANK_PTR [num_bank]+1)%_param->_size_bank;
+                      nb_insert ++;
                     }
-                  break;
                 }
-              case EVENT_STATE_END      :
-                {
-                  reg_EVENT_STATE [i][j] = EVENT_STATE_NO_EVENT;
-                  break;
-                }
-//            case EVENT_STATE_NO_EVENT : 
-              default : break;
-              }
-
-	// ===================================================================
-	// =====[ INSERT ]====================================================
-	// ===================================================================
-	for (uint32_t i=0; i<_param->_nb_bank; i++)
-	  if (internal_BANK_INSERT_VAL [i])
-	    {
-              // get rename unit source and instruction.
-	      uint32_t x = internal_BANK_INSERT_NUM_RENAME_UNIT [i];
-	      uint32_t y = internal_BANK_INSERT_NUM_INST        [i];
-
-	      if (PORT_READ(in_INSERT_VAL [x][y]))
-		{
-		  log_printf(TRACE,Commit_unit,FUNCTION,"  * INSERT            [%d][%d]",x,y);
-
-                  // get information
-		  Tcontext_t   front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [x][y]):0;
-		  Tcontext_t   context_id   = (_param->_have_port_context_id  )?PORT_READ(in_INSERT_CONTEXT_ID   [x][y]):0;
-		  Ttype_t      type         = PORT_READ(in_INSERT_TYPE         [x][y]);
-                  Toperation_t operation    = PORT_READ(in_INSERT_OPERATION    [x][y]);
-                  bool         is_store     = is_operation_memory_store(operation);
-
-		  Texception_t exception    = PORT_READ(in_INSERT_EXCEPTION    [x][y]);
-		  Tcontrol_t   no_execute   = PORT_READ(in_INSERT_NO_EXECUTE   [x][y]);
-
-		  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,"    * type           : %s",toString(type).c_str());
-		  log_printf(TRACE,Commit_unit,FUNCTION,"    * operation      : %d",operation );
-		  log_printf(TRACE,Commit_unit,FUNCTION,"    * exception      : %d",exception );
-                  
-                  // Create new entry.
-		  entry_t * entry = new entry_t;
-
-		  entry->ptr                     = reg_BANK_PTR [i];
-		  entry->front_end_id            = front_end_id;
-		  entry->context_id              = context_id  ;
-		  entry->rename_unit_id          = x;
-		  entry->depth                   = (_param->_have_port_depth)?PORT_READ(in_INSERT_DEPTH [x][y]):0;
-		  entry->type                    = type;
-		  entry->operation               = operation;
-		  entry->is_delay_slot           = PORT_READ(in_INSERT_IS_DELAY_SLOT         [x][y]);
-// 		  entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
-		  entry->exception               = exception;
-		  entry->exception_use           = PORT_READ(in_INSERT_EXCEPTION_USE         [x][y]);
-		  entry->use_store_queue         = (type == TYPE_MEMORY) and (    is_store) and (not no_execute);
-		  entry->use_load_queue          = (type == TYPE_MEMORY) and (not is_store) and (not no_execute);
-		  entry->store_queue_ptr_write   = PORT_READ(in_INSERT_STORE_QUEUE_PTR_WRITE [x][y]);
-		  entry->load_queue_ptr_write    = (_param->_have_port_load_queue_ptr)?PORT_READ(in_INSERT_LOAD_QUEUE_PTR_WRITE [x][y]):0;
-#ifdef DEBUG
-		  entry->read_ra                 = PORT_READ(in_INSERT_READ_RA               [x][y]);
-		  entry->num_reg_ra_log          = PORT_READ(in_INSERT_NUM_REG_RA_LOG        [x][y]);
-		  entry->num_reg_ra_phy          = PORT_READ(in_INSERT_NUM_REG_RA_PHY        [x][y]);
-		  entry->read_rb                 = PORT_READ(in_INSERT_READ_RB               [x][y]);
-		  entry->num_reg_rb_log          = PORT_READ(in_INSERT_NUM_REG_RB_LOG        [x][y]);
-		  entry->num_reg_rb_phy          = PORT_READ(in_INSERT_NUM_REG_RB_PHY        [x][y]);
-		  entry->read_rc                 = PORT_READ(in_INSERT_READ_RC               [x][y]);
-		  entry->num_reg_rc_log          = PORT_READ(in_INSERT_NUM_REG_RC_LOG        [x][y]);
-		  entry->num_reg_rc_phy          = PORT_READ(in_INSERT_NUM_REG_RC_PHY        [x][y]);
-#endif
-		  entry->write_rd                = PORT_READ(in_INSERT_WRITE_RD              [x][y]);
-		  entry->num_reg_rd_log          = PORT_READ(in_INSERT_NUM_REG_RD_LOG        [x][y]);
-		  entry->num_reg_rd_phy_old      = PORT_READ(in_INSERT_NUM_REG_RD_PHY_OLD    [x][y]);
-		  entry->num_reg_rd_phy_new      = PORT_READ(in_INSERT_NUM_REG_RD_PHY_NEW    [x][y]);
-		  entry->write_re                = PORT_READ(in_INSERT_WRITE_RE              [x][y]);
-		  entry->num_reg_re_log          = PORT_READ(in_INSERT_NUM_REG_RE_LOG        [x][y]);
-		  entry->num_reg_re_phy_old      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_OLD    [x][y]);
-		  entry->num_reg_re_phy_new      = PORT_READ(in_INSERT_NUM_REG_RE_PHY_NEW    [x][y]);
-                  entry->no_sequence             = type == TYPE_BRANCH;
-                  entry->speculative             = true;
-#ifdef DEBUG
-		  entry->address                 = PORT_READ(in_INSERT_ADDRESS               [x][y]);
-#endif
-		  entry->address_next            = PORT_READ(in_INSERT_ADDRESS_NEXT          [x][y]);
-#ifdef DEBUG
-                  entry->cycle_rob_in            = simulation_cycle();
-                  entry->cycle_commit            = simulation_cycle();
-#endif
-
-                  // Test if exception :
-                  //  * yes : no execute instruction, wait ROB Head
-                  //  * no  : test type
-                  //            * BRANCH : l.j   -> branch is ended
-                  //                       other -> wait the execution end of branchment
-                  //            * MEMORY : store -> wait store is at head of ROB
-                  //                       other -> wait end of instruction
-                  //            * OTHER
-
-//                   bool       flush      = reg_EVENT_FLUSH [front_end_id][context_id];
-
-//                   log_printf(TRACE,Commit_unit,FUNCTION,"    * flush          : %d",flush);
-
-//                   if (flush)
-//                     {
-//                       entry->state    = ROB_END_MISS; // All type (branch, memory and others), because, is not execute
-//                     }
-//                   else
-                    {
-                      if (exception == EXCEPTION_NONE)
-                        {
-                          // no_execute : l.j, l.nop, l.rfe
-                          
-                          log_printf(TRACE,Commit_unit,FUNCTION,"    * no_execute     : %d",no_execute);
-                          
-                          switch (type)
-                            {
-                            case TYPE_BRANCH : {entry->state=(no_execute==1)?ROB_BRANCH_COMPLETE:ROB_BRANCH_WAIT_END  ; break;}
-                            case TYPE_MEMORY : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:(entry->state=(is_store  ==1)?ROB_STORE_WAIT_HEAD_OK:ROB_OTHER_WAIT_END); break;}
-                            default          : {entry->state=(no_execute==1)?ROB_END_OK_SPECULATIVE:ROB_OTHER_WAIT_END; break;}
-                            }
-                        }
-                      else
-                        {
-                          // Have an exception : wait head of ROB
-                          
-                          // in_INSERT_NO_EXECUTE [x][y] : l.sys, l.trap
-                          
-                          entry->state = ROB_END_EXCEPTION_WAIT_HEAD;
-                        }
-                    }
-
-#ifdef STATISTICS
-                  if (usage_is_set(_usage,USE_STATISTICS))
-                    (*_stat_nb_inst_insert [x]) ++;
-#endif
-
-                  // Push in rob
-		  _rob[i].push_back(entry);
-
-		  // Update counter and pointer
-		  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_TAIL = (reg_NUM_BANK_TAIL+1)%_param->_nb_bank;
-		  reg_BANK_PTR [i]  = (reg_BANK_PTR [i]+1)%_param->_size_bank;
-		}
-	    }
+            }
+          // Update pointer
+          reg_NUM_BANK_TAIL = (reg_NUM_BANK_TAIL+nb_insert)%_param->_nb_bank;
+        }
 
 	// ===================================================================
@@ -255,12 +333,17 @@
 #endif
 
+        // For each commit instruction ...
 	for (uint32_t i=0; i<_param->_nb_bank; i++)
 	  for (uint32_t j=0; j<_param->_nb_bank_access_commit; j++)
+            // ... test if an instruction have finish this execution
 	    if (internal_BANK_COMMIT_VAL [i][j])
 	      {
-                // An instruction is executed. Change state of this instruction
-
+                // An instruction is executed -> Change state of this instruction
+
+                // Get information
 		uint32_t x = internal_BANK_COMMIT_NUM_INST [i][j];
 
+                // Test if instruction is valid and is enable
+                // (can be disable if this instruction is reexecute)
 		if (PORT_READ(in_COMMIT_VAL [x]) and PORT_READ(in_COMMIT_WEN [x]))
 		  {
@@ -278,5 +361,12 @@
                                                  
 		  //Toperation_t    operation    = PORT_READ(in_COMMIT_OPERATION   [x]);
-		  //Ttype_t         type         = PORT_READ(in_COMMIT_TYPE        [x]);
+ 		    Ttype_t         type         = entry->type;
+		    Tcontrol_t      no_sequence  = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
+
+#if 0
+		    if ((type == TYPE_MEMORY) and no_sequence)
+		      continue;
+#endif		    
+
 		    Texception_t    exception    = PORT_READ(in_COMMIT_EXCEPTION   [x]);
 
@@ -286,14 +376,17 @@
 
 		    // change state : test exception_use
-		    //  * test if exception : exception and mask
 		    
 		    bool have_exception        = false;
                     bool have_miss_speculation = false;
 
+                    // Test if have an exception ...
 		    if (exception != EXCEPTION_NONE)
                       {
-                        // Test if the instruction is a load and is a miss speculation (load is commit, but they have an dependence with a previous store)
+                        // Test if the instruction is a load and is a miss speculation 
+                        // (load is commit, but they have an dependence with a previous store -> need restart pipeline)
+
                         have_miss_speculation  = (exception == EXCEPTION_MEMORY_MISS_SPECULATION);
 
+                        //  * Test if the exception generated can be trap by this exception
                         switch (entry->exception_use)
                           {
@@ -327,12 +420,56 @@
                       }
                    
+                    // Next state depends of previous state
                     switch (state)
                       {
-                        // Branch ...
-                      case ROB_BRANCH_WAIT_END : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:ROB_BRANCH_COMPLETE; break;}
-                        // Store KO
-                      case ROB_EVENT_WAIT_END  : {state = ROB_END_KO_SPECULATIVE; break;}
-                        // Store OK, Load and other instruction
-                      case ROB_OTHER_WAIT_END  : {state = (have_exception)?ROB_END_EXCEPTION_WAIT_HEAD:((have_miss_speculation)?ROB_END_LOAD_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE); break;}
+                        // Branch : if no exception, the branchement can be completed
+                      case ROB_BRANCH_WAIT_END : 
+                        {
+                          if (not have_exception)
+                            state = ROB_BRANCH_COMPLETE;
+                          else
+                            state = ROB_END_EXCEPTION_WAIT_HEAD;
+                          break;
+                        }
+                        // Previous event -> set state as execute
+		      case ROB_STORE_KO_WAIT_END :
+                      case ROB_EVENT_WAIT_END  : 
+                        {
+                          state = ROB_END_KO_SPECULATIVE; 
+                          break;
+                        }
+                        // No previous event - Load and other instruction
+		      case ROB_STORE_OK_WAIT_END :
+                      case ROB_OTHER_WAIT_END  : 
+                        {
+                          if (not have_exception)
+                            {
+                              if (not have_miss_speculation)
+                                state = ROB_END_OK_SPECULATIVE;
+                              else
+                                state = ROB_END_LOAD_MISS_SPECULATIVE; 
+                            }
+                          else
+                            state = ROB_END_EXCEPTION_WAIT_HEAD;
+                          break;
+                        }
+		      case ROB_STORE_WAIT_END_OK :
+			{
+			  if (not have_exception)
+			    state = ROB_STORE_OK;
+			  else
+                            state = ROB_STORE_EVENT;
+			  break;
+			}
+		      case ROB_STORE_WAIT_END_KO :
+			{
+// 			  if (not have_exception)
+			    state = ROB_STORE_KO;
+// 			  else
+//                             state = ROB_END_EXCEPTION_WAIT_HEAD; 
+			  break;
+			}
+
+
                       default :
                         {
@@ -342,15 +479,50 @@
                       }
 
-                    if ((have_exception or have_miss_speculation) and
-                        (reg_EVENT_FLUSH [entry->front_end_id][entry->context_id] == 0))
-                      reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true;
-
-		    // update Re Order Buffer
+                    // Commit an instruction ... 
+                    // Test if have an event (miss_speculation or exception) and not manage a previous event
+                    // if yes, this instruction would modify state machine. Also stop Re Order Buffer
+
+//                  bool flush = reg_EVENT_FLUSH [entry->front_end_id][entry->context_id];
+                    bool flush = ((reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_EVENT) or
+                                  (reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
+                                  (reg_EVENT_STATE [entry->front_end_id][entry->context_id] == COMMIT_EVENT_STATE_WAIT_END));
+                    
+                    if ((have_exception or have_miss_speculation) and (not flush))
+                      {
+                        uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | i);
+                        
+                        // test have a previous event detected (event_stop = 1)
+                        // if yes, test if the actual event if "before (in order)" that the previous event
+                        if (reg_EVENT_STOP [entry->front_end_id][entry->context_id])
+                          {
+                            // Compare packet_id (by construction instruction is insert in order by increase packet_id)
+
+                            uint32_t _top = ((_rob[ reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
+                            uint32_t _old = reg_EVENT_PACKET [entry->front_end_id][entry->context_id];
+                            uint32_t _new = packet;
+                            if (_old < _top) _old = _old+_param->_size_queue;
+                            if (_new < _top) _new = _new+_param->_size_queue;
+                            if (_new < _old) reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
+                          }
+                        else
+                          reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
+                        
+                        // have an error, stop issue instruction
+                        reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
+//                         reg_EVENT_NUM_BANK      [entry->front_end_id][entry->context_id] = i;
+//                         reg_EVENT_NUM_PTR       [entry->front_end_id][entry->context_id] = entry->ptr;
+
+//                      reg_EVENT_CAN_RESTART   [entry->front_end_id][entry->context_id] = false;
+                        reg_EVENT_LAST_NUM_BANK [entry->front_end_id][entry->context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
+                        reg_EVENT_LAST_NUM_PTR  [entry->front_end_id][entry->context_id] = reg_NUM_PTR_TAIL;
+                      }
+                    
+		    // Update Re Order Buffer
 		    entry->state        = state;
 		    entry->exception    = exception;
 		    entry->flags        = PORT_READ(in_COMMIT_FLAGS       [x]);
-		    entry->no_sequence  = PORT_READ(in_COMMIT_NO_SEQUENCE [x]);
+		    entry->no_sequence  = no_sequence;
                     // jalr, jr : address_dest is in register
-                    if ((entry->type      == TYPE_BRANCH) and
+                    if ((       type      == TYPE_BRANCH) and
                         (entry->operation == OPERATION_BRANCH_L_JALR) and
                         (entry->read_rb))
@@ -358,5 +530,6 @@
 
 #ifdef DEBUG
-                  entry->cycle_commit            = simulation_cycle();
+                    entry->load_data               = PORT_READ(in_COMMIT_ADDRESS [x]);
+                    entry->cycle_commit            = simulation_cycle();
 #endif
 		  }
@@ -368,8 +541,11 @@
 	for (uint32_t i=0; i<_param->_nb_bank; i++)
           {
+            // Compute bank number
             uint32_t num_bank = (internal_BANK_RETIRE_HEAD+i)%_param->_nb_bank;
             
+            // Test if have an request
             if (internal_BANK_RETIRE_VAL [num_bank])
               {
+                // Take num instruction
                 uint32_t x = internal_BANK_RETIRE_NUM_RENAME_UNIT [num_bank];
                 uint32_t y = internal_BANK_RETIRE_NUM_INST        [num_bank];
@@ -382,128 +558,197 @@
                   throw ERRORMORPHEO(FUNCTION,_("Retire : retire_ack must be set.\n"));
 #endif
+
+
+#ifdef STATISTICS
+	    if (usage_is_set(_usage,USE_STATISTICS))
+	      (*_stat_nb_inst_retire [x]) ++;
                 
-                entry_t *  entry        =  _rob [num_bank].front();
-                rob_state_t state = entry->state;
+#endif
                 
-                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,"    * rob_ptr      : %d",((entry->ptr << _param->_shift_num_slot) | num_bank));
-                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;
-                      reg_EVENT_STOP  [front_end_id][context_id] = false;
-                    }
-                
-#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
-                // log file
-                instruction_log_file [num_thread] 
-                  << "[" << simulation_cycle() << "] "
-                  << std::hex
-                  << (entry->address<<2) << " (" << (entry->address) << ") "
-                  << std::dec
-                  << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
-                  << "{" << ((retire_ok)?" OK ":"!KO!") << "} "
-                  << std::endl;
-#endif
-
-                // 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;
-                
-                delete entry;
-                _rob [num_bank].pop_front();
-                
-                // 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
+                // Read information
+                entry_t *   entry        =  _rob [num_bank].front();
+
+                entry->state_old = entry->state;
+                entry->state     = ROB_END;
               }
           }
 
+	for (uint32_t i=0; i<_param->_nb_bank; i++)
+	  {
+	    // Compute bank number
+	    bool      can_continue = false;
+	    uint32_t  num_bank = reg_NUM_BANK_HEAD;
+	    
+	    if (not _rob [num_bank].empty ())
+	      {
+	        entry_t * entry = _rob [num_bank].front();
+	        
+	        if (entry->state == ROB_END)
+	          {
+	            log_printf(TRACE,Commit_unit,FUNCTION,"  * RETIRE_ROB [%d]",num_bank);
+	    
+                    can_continue = true;
+
+	            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];
+	            rob_state_t state        = entry->state_old;
+	            Ttype_t     type         = entry->type        ;
+	            bool        retire_ok    = false;
+	            uint32_t    packet_id    = ((entry->ptr << _param->_shift_num_slot) | num_bank);
+	            
+	            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,"    * rob_ptr      : %d",packet_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());
+	            
+                    // Test if the instruction is valid
+                    // (BRANCH_MISS = instruction branch is valid, but have make an invalid prediction)
+                    // (LOAD_MISS   = instruction load   is valid, but have make an invalid result)
+                    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;
+	            
+                        // Update PC information
+//                      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] = 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);
+                      }
+	            
+                    // Test if have an event
+                    if ((state == ROB_END_BRANCH_MISS) or
+                        (state == ROB_END_LOAD_MISS))
+	              {
+                          reg_EVENT_STATE         [front_end_id][context_id] = COMMIT_EVENT_STATE_EVENT;
+//                        reg_EVENT_FLUSH         [front_end_id][context_id] = true;
+                          reg_EVENT_STOP          [front_end_id][context_id] = false; // instruction flow can continue
+//                        reg_EVENT_CAN_RESTART   [front_end_id][context_id] = false;
+                          reg_EVENT_LAST          [front_end_id][context_id] = false;
+                          // it the head !
+                          reg_EVENT_PACKET        [front_end_id][context_id] = packet_id;
+	            
+                          // If event is an load_miss, many instruction can be inserted. 
+                          // -> new last instruction
+                          if (state == ROB_END_LOAD_MISS)
+                            {
+                            reg_EVENT_CAN_RESTART   [front_end_id][context_id] = false;
+                            
+                            reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
+                            reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] = reg_NUM_PTR_TAIL;
+                            }
+                        }
+	            
+                    // Test if this instruction is the last instruction of an event
+                    //   * need event
+                    //   * packet id = last packet id
+                    if ((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT) and
+                        (reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] == num_bank            ) and
+                        (reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] == entry->ptr          ))
+                      reg_EVENT_LAST [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] --;
+	            
+	            // Update pointer
+	            reg_NUM_BANK_HEAD = (num_bank+1)%_param->_nb_bank;
+                    
+	            // Remove entry
+	            delete entry;
+	            _rob [num_bank].pop_front();
+                    
+                    // Reset watch dog timer because have transaction on retire interface
+                    _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))
+	              {
+	            	if (retire_ok)
+	            	  {
+	            	    (*_stat_nb_inst_retire_ok [num_thread]) ++;
+	            	    (*_stat_nb_inst_type      [type]      ) ++;
+	            	  }
+	            	else
+	            	  (*_stat_nb_inst_retire_ko [num_thread]) ++;
+	              }
+#endif
+
+#if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true)
+	            {
+	              // log file
+	              instruction_log_file [num_thread] 
+	            	<< "[" << simulation_cycle() << "] "
+	            	<< std::hex
+	            	<< (entry->address<<2) << " (" << (entry->address) << ") "
+	            	<< std::dec
+	            	<< "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] "
+	            	<< "{" << ((retire_ok)?"OK":"KO") << "} ";
+	              
+	              if ((type == TYPE_MEMORY) and  is_operation_memory_load(entry->operation))
+	            	instruction_log_file [num_thread] << std::hex << entry->load_data << std::dec;
+	              
+	              instruction_log_file [num_thread] << std::endl;
+	            }
+#endif	    
+	          }
+	      }
+	    
+	    if (not can_continue)
+	      break; // stop scan
+	  }
+
 	// ===================================================================
 	// =====[ REEXECUTE ]=================================================
 	// ===================================================================
-	if (internal_REEXECUTE_VAL [0] and PORT_READ(in_REEXECUTE_ACK [0]))
-	  {
-            log_printf(TRACE,Commit_unit,FUNCTION,"  * REEXECUTE         [0]");
-
-	    uint32_t num_bank = internal_REEXECUTE_NUM_BANK [0];
-
-	    entry_t    * entry = _rob [num_bank].front();
-	    rob_state_t  state = entry->state;
-
-	    switch (state)
-	      {
-	      case ROB_STORE_HEAD_OK : {state = ROB_OTHER_WAIT_END; break; }
-	      case ROB_STORE_HEAD_KO : {state = ROB_EVENT_WAIT_END; break; }
-	      default : {throw ERRORMORPHEO(FUNCTION,_("Reexecute : invalid state value.\n"));}
-	      }
-
-	    entry->state = state;
-	  }
-
+        // Test if have an reexecute instruction (an store in head of rob)
+	for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i)
+	  if (internal_REEXECUTE_VAL [i] and PORT_READ(in_REEXECUTE_ACK [i]))
+	    {
+	      log_printf(TRACE,Commit_unit,FUNCTION,"  * REEXECUTE         [%d]",i);
+	      
+	      uint32_t num_bank = internal_REEXECUTE_NUM_BANK [i];
+	      
+	      entry_t    * entry = _rob [num_bank].front();
+	      rob_state_t  state = entry->state;
+	      
+	      // Change state
+	      switch (state)
+		{
+		case ROB_STORE_OK    : {state = ROB_STORE_OK_WAIT_END; break; }
+		case ROB_STORE_KO    : {state = ROB_STORE_KO_WAIT_END; break; }
+		case ROB_STORE_EVENT : {state = ROB_EVENT_WAIT_END; break; }
+		default : {throw ERRORMORPHEO(FUNCTION,_("Reexecute : invalid state value.\n"));}
+		}
+	      
+	      entry->state = state;
+	    }
+	
 	// ===================================================================
 	// =====[ BRANCH_COMPLETE ]===========================================
 	// ===================================================================
 	for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
+          // Test if the prediction_unit have accept the branch complete transaction
 	  if (internal_BRANCH_COMPLETE_VAL [i] and PORT_READ(in_BRANCH_COMPLETE_ACK [i]))
 	    {
               log_printf(TRACE,Commit_unit,FUNCTION,"  * BRANCH_COMPLETE   [%d]",i);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * miss_prediction : %d",PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]));
-
+
+              // Read information
 	      uint32_t num_bank = internal_BRANCH_COMPLETE_NUM_BANK [i];
 	      
@@ -516,12 +761,43 @@
 #endif
               Tcontrol_t miss = PORT_READ(in_BRANCH_COMPLETE_MISS_PREDICTION [i]);
+
+              log_printf(TRACE,Commit_unit,FUNCTION,"    * miss_prediction : %d",miss);
               
               entry->state = (miss)?ROB_END_BRANCH_MISS_SPECULATIVE:ROB_END_OK_SPECULATIVE;
-              
-              if (miss and (reg_EVENT_FLUSH [entry->front_end_id][entry->context_id] == 0))
-                reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true;
-
-
-//               entry->state = ROB_END_OK_SPECULATIVE;
+
+//            bool flush = reg_EVENT_FLUSH [entry->front_end_id][entry->context_id];
+
+              // Branch_complete can be execute if
+              //   * no present event
+              //   * futur event and most not speculative that the event
+
+              // Also, test if in this cycle, they have not an most recently event !!!
+              if (miss)
+                {
+                  uint32_t packet = ((entry->ptr << _param->_shift_num_slot) | num_bank);
+                      
+                  // test if this packet is before previous event
+                  if (reg_EVENT_STOP [entry->front_end_id][entry->context_id])
+                    {
+                      uint32_t _top = ((_rob[ reg_NUM_BANK_HEAD].front()->ptr << _param->_shift_num_slot) | reg_NUM_BANK_HEAD);
+                      uint32_t _old = reg_EVENT_PACKET [entry->front_end_id][entry->context_id];
+                      uint32_t _new = packet;
+                      if (_old < _top) _old = _old+_param->_size_queue;
+                      if (_new < _top) _new = _new+_param->_size_queue;
+                      if (_new < _old) reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
+                    }
+                  else
+                    reg_EVENT_PACKET [entry->front_end_id][entry->context_id] = packet;
+
+                  // In all case, stop instruction flow
+                  reg_EVENT_STOP          [entry->front_end_id][entry->context_id] = true;
+//                   reg_EVENT_NUM_BANK      [entry->front_end_id][entry->context_id] = num_bank;
+//                   reg_EVENT_NUM_PTR       [entry->front_end_id][entry->context_id] = entry->ptr;
+
+                  reg_EVENT_CAN_RESTART   [entry->front_end_id][entry->context_id] = false;
+
+                  reg_EVENT_LAST_NUM_BANK [entry->front_end_id][entry->context_id] = ((reg_NUM_BANK_TAIL==0)?_param->_nb_bank:reg_NUM_BANK_TAIL)-1;
+                  reg_EVENT_LAST_NUM_PTR  [entry->front_end_id][entry->context_id] = reg_NUM_PTR_TAIL;
+                }
 	    }
 
@@ -529,8 +805,10 @@
 	// =====[ UPDATE ]====================================================
 	// ===================================================================
+        // Update when exception or load_miss
         if (internal_UPDATE_VAL and PORT_READ(in_UPDATE_ACK))
           {
             log_printf(TRACE,Commit_unit,FUNCTION,"  * UPDATE");
 
+            // Change state
             entry_t * entry = _rob [internal_UPDATE_NUM_BANK].front();
 
@@ -556,5 +834,4 @@
                 }
               }
-
           }
 
@@ -578,129 +855,168 @@
 	// =====[ DEPTH - HEAD ]==============================================
 	// ===================================================================
-	for (uint32_t i=0; i<_param->_nb_bank; i++)
-	  if (not _rob[i].empty())
-	    {
-	      // Scan all instruction in windows and test if instruction is speculative
-	      entry_t    * entry        = _rob [i].front();
-	      
-	      Tcontext_t   front_end_id = entry->front_end_id;
-	      Tcontext_t   context_id   = entry->context_id  ;
-	      rob_state_t  state        = entry->state;
-	      Tdepth_t     depth        = entry->depth;
-
-              Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
-              Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
-              Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
+
+        {
+          bool EVENT_LAST [_param->_nb_front_end][_param->_max_nb_context];
+          for (uint32_t i=0; i<_param->_nb_front_end; i++)
+            for (uint32_t j=0; j<_param->_nb_context [i]; j++)
+              EVENT_LAST [i][j] = reg_EVENT_LAST [i][j];
+
+          // Read all instruction of all top bank
+          for (uint32_t i=0; i<_param->_nb_bank; i++)
+            {
+              uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
               
-              // is a valid instruction ?
-              // If DEPTH_CURRENT :
-              // equal at     DEPTH_MIN            -> not speculative
-              // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
-              //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
-              
-              // All case
-              // ....... min ...X... max ....... OK
-              // ....... min ....... max ...X... KO
-              // ...X... min ....... max ....... KO
-              // ....... max ....... min ...X... OK
-              // ...X... max ....... min ....... OK
-              // ....... max ...X... min ....... KO
-              
-              bool         flush         = reg_EVENT_FLUSH [front_end_id][context_id];
-              bool         speculative   = entry->speculative and not (depth == depth_min);
-              Tcontrol_t   is_valid      = ((not speculative or 
-                                             (speculative and (depth_full or // all is valid
-                                                               ((depth_min <= depth_max)? // test if depth is overflow
-                                                                ((depth >= depth_min) and (depth <=depth_max)):
-                                                                ((depth >= depth_min) or  (depth <=depth_max))))))
-                                             and not flush);
-
-//            Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
-
-              log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d]",i);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d ((depth == depth_min) and not flush)",is_valid);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
-              log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
-
-	      //------------------------------------------------------
-	      // test if instruction is miss speculative
-	      //------------------------------------------------------
-	      if (not is_valid)
-		{
-		  switch (state)
-		    {
-		    case ROB_BRANCH_WAIT_END             : {state = ROB_EVENT_WAIT_END; break;}
-		    case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS      ; break;}
-                    case ROB_END_BRANCH_MISS             :
-                    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS      ; break;}
-                    case ROB_END_LOAD_MISS_UPDATE        :
-                    case ROB_END_LOAD_MISS               :
-                    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS      ; break;}
-		    case ROB_STORE_WAIT_HEAD_OK          : {state = ROB_STORE_HEAD_KO ; break;}
-		  //case ROB_STORE_WAIT_HEAD_KO          : {state = ; break;}
-		    case ROB_OTHER_WAIT_END              : {state = ROB_EVENT_WAIT_END; break;}
-		    case ROB_END_OK                      :
-		    case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
-		    case ROB_END_KO                      :
-		    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
-		    case ROB_END_EXCEPTION_UPDATE        :
-		    case ROB_END_EXCEPTION               :
-		    case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS      ; break;}
-		                                         
-		      // don't change                    
-		    case ROB_STORE_HEAD_KO               : {break;}
-		    case ROB_EVENT_WAIT_END              : {break;}
-		    case ROB_END_MISS                    : {break;}
-		                                         
-		      // can't have miss speculation     
-		    case ROB_STORE_HEAD_OK               :
-		    default                              : 
-		      {
-			throw ERRORMORPHEO(FUNCTION,toString(_("Miss Speculation : Invalide state : %s.\n"),toString(state).c_str()));
-			break;
-		      }
-		    }
-		}
-	      
-	      //------------------------------------------------------
-	      // test if instruction is not speculative
-	      //------------------------------------------------------
-              entry->speculative = speculative;
-// 	      if (entry->depth == depth_min)
-	      if (not speculative)
-		{
-		  switch (state)
-		    {
-		    case ROB_END_OK_SPECULATIVE          : {state = ROB_END_OK                 ; break;}
-		    case ROB_END_KO_SPECULATIVE          : {state = ROB_END_KO                 ; break;}
-		    case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS        ; break;}
-		    case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_LOAD_MISS_UPDATE   ; break;}
-		    default : {break;} // else, no change
-		  }
-		}
-	      
-	      //------------------------------------------------------
-	      // test if instruction is store and head
-	      //------------------------------------------------------
-	      if (i == reg_NUM_BANK_HEAD)
-		{
-		  switch (state)
-		    {
-		    case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
-		    case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
-                    default : {break;} // else, no change
-		    }
-		}
-	      
-	      entry->state = state;
-	    }
-      }
-
-    // ===================================================================
-    // =====[ OTHER ]=====================================================
-    // ===================================================================
+              // Test if have an instruction
+              if (not _rob[num_bank].empty())
+                {
+                  // Scan all instruction in windows and test if instruction is speculative
+                  entry_t    * entry        = _rob [num_bank].front();
+                  
+                  Tcontext_t   front_end_id = entry->front_end_id;
+                  Tcontext_t   context_id   = entry->context_id  ;
+                  
+                  // scan while last event instruction is not retire
+                  if (EVENT_LAST [front_end_id][context_id] == false)
+                    {
+                      // Read information
+                      rob_state_t  state        = entry->state;
+                      Tdepth_t     depth        = entry->depth;
+                      
+                      Tdepth_t     depth_min    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN[front_end_id][context_id]):0;
+                      Tdepth_t     depth_max    = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MAX[front_end_id][context_id]):0;
+                      Tcontrol_t   depth_full   = PORT_READ(in_DEPTH_FULL [front_end_id][context_id]);
+                      
+                      // is a valid instruction ?
+                      // If DEPTH_CURRENT :
+                      // equal at     DEPTH_MIN            -> not speculative
+                      // not include ]DEPTH_MIN:DEPTH_MAX] -> previous branch miss
+                      //     include ]DEPTH_MIN:DEPTH_MAX] -> speculative
+                      
+                      // All case
+                      // ....... min ...X... max ....... OK
+                      // ....... min ....... max ...X... KO
+                      // ...X... min ....... max ....... KO
+                      // ....... max ....... min ...X... OK
+                      // ...X... max ....... min ....... OK
+                      // ....... max ...X... min ....... KO
+                      
+                      bool         flush         = ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_EVENT) or
+                                                    (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_DECOD) or
+                                                    (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_WAIT_END));
+                      bool         speculative   = entry->speculative and not (depth == depth_min);
+                      Tcontrol_t   is_valid      = ((not speculative or 
+                                                     (speculative and (depth_full or // all is valid
+                                                                       ((depth_min <= depth_max)? // test if depth is overflow
+                                                                        ((depth >= depth_min) and (depth <=depth_max)):
+                                                                        ((depth >= depth_min) or  (depth <=depth_max))))))
+                                                    and not flush); // no event
+                      
+                      //Tcontrol_t   is_valid      = ((depth == depth_min) and not flush);
+                      
+                      log_printf(TRACE,Commit_unit,FUNCTION,"  * HEAD              [%d] - %d",num_bank,((entry->ptr << _param->_shift_num_slot) | num_bank));
+                      
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * is_valid        : %d ((depth == depth_min) and not flush)",is_valid);
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * depth           : %d",depth    );
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_min       : %d",depth_min);
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_max       : %d",depth_max);
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * depth_full      : %d",depth_full);
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * speculative     : %d",speculative);
+                      log_printf(TRACE,Commit_unit,FUNCTION,"    * flush           : %d",flush);
+                    
+                      //------------------------------------------------------
+                      // test if instruction is miss speculative
+                      //------------------------------------------------------
+                      if (not is_valid)
+                        {
+                          // Change state
+                          switch (state)
+                            {
+                            case ROB_BRANCH_WAIT_END             : {state = ROB_EVENT_WAIT_END; break;}
+                            case ROB_BRANCH_COMPLETE             : {state = ROB_END_MISS      ; break;}
+                            case ROB_END_BRANCH_MISS             :
+                            case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_MISS      ; break;}
+                            case ROB_END_LOAD_MISS_UPDATE        :
+                            case ROB_END_LOAD_MISS               :
+                            case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_MISS      ; break;}
+                            case ROB_STORE_OK                    : {state = ROB_STORE_KO      ; break;}
+                            case ROB_STORE_WAIT_END_OK           : {state = ROB_STORE_WAIT_END_KO; break;}
+			    case ROB_STORE_OK_WAIT_END           : {state = ROB_STORE_KO_WAIT_END; break;}
+                            case ROB_OTHER_WAIT_END              : {state = ROB_EVENT_WAIT_END; break;}
+                            case ROB_END_OK                      :
+                            case ROB_END_OK_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
+                            case ROB_END_KO                      :
+                            case ROB_END_KO_SPECULATIVE          : {state = ROB_END_MISS      ; break;}
+                            case ROB_END_EXCEPTION_UPDATE        :
+                            case ROB_END_EXCEPTION               :
+                            case ROB_END_EXCEPTION_WAIT_HEAD     : {state = ROB_END_MISS      ; break;}
+                              
+                              // don't change state -> wait
+                            case ROB_STORE_WAIT_END_KO           : {break;}
+                            case ROB_STORE_KO                    : {break;}
+                            case ROB_STORE_KO_WAIT_END           : {break;}
+                            case ROB_STORE_EVENT                 : {break;}
+                            case ROB_EVENT_WAIT_END              : {break;}
+                            case ROB_END_MISS                    : {break;}
+                            case ROB_END                         : {break;}
+                              
+                              // can't have miss speculation -> invalid state
+                            default                              : 
+                              {
+                                throw ERRORMORPHEO(FUNCTION,toString(_("Miss Speculation : Invalide state : %s.\n"),toString(state).c_str()));
+                                break;
+                              }
+                            }
+                        }
+                      
+                      //------------------------------------------------------
+                      // test if instruction is not speculative
+                      //------------------------------------------------------
+                      entry->speculative = speculative;
+//                    if (entry->depth == depth_min)
+                      // test if instruction is speculative (depth != depth_min)
+                      if (not speculative)
+                        {
+                          switch (state)
+                            {
+                            case ROB_END_OK_SPECULATIVE          : {state = ROB_END_OK                 ; break;}
+                            case ROB_END_KO_SPECULATIVE          : {state = ROB_END_KO                 ; break;}
+                            case ROB_END_BRANCH_MISS_SPECULATIVE : {state = ROB_END_BRANCH_MISS        ; break;}
+                            case ROB_END_LOAD_MISS_SPECULATIVE   : {state = ROB_END_LOAD_MISS_UPDATE   ; break;}
+                            default : {break;} // else, no change
+                            }
+                        }
+                    
+                      //------------------------------------------------------
+                      // test if instruction wait head and is the top of rob
+                      //------------------------------------------------------
+                      // TODO : retire OOO
+                      if (i == 0)
+                        {
+                          switch (state)
+                            {
+//                             case ROB_STORE_WAIT_HEAD_OK      : {state = ROB_STORE_HEAD_OK;        break;}
+                            case ROB_END_EXCEPTION_WAIT_HEAD : {state = ROB_END_EXCEPTION_UPDATE; break;}
+                            default : {break;} // else, no change
+                            }
+                        }
+                    
+                      // Write new state
+                      entry->state = state;
+                      
+                      // Test if this instruction is the last of event
+                      if ((reg_EVENT_STATE         [front_end_id][context_id] != COMMIT_EVENT_STATE_NO_EVENT) and
+                          (reg_EVENT_LAST_NUM_BANK [front_end_id][context_id] == num_bank            ) and
+                          (reg_EVENT_LAST_NUM_PTR  [front_end_id][context_id] == entry->ptr          ))
+                        {
+                          log_printf(TRACE,Commit_unit,FUNCTION,"  * Stop Scan !!!");
+                          
+                          EVENT_LAST [front_end_id][context_id] = true;
+                        }
+                    }
+                }
+            }
+        }
+
+
 
 #ifdef STATISTICS
@@ -709,4 +1025,9 @@
         *(_stat_bank_nb_inst [i]) += _rob[i].size();
 #endif
+      }
+
+    // ===================================================================
+    // =====[ OTHER ]=====================================================
+    // ===================================================================
 
 #if (DEBUG >= DEBUG_TRACE) and (DEBUG_Commit_unit == true)
@@ -715,4 +1036,5 @@
       log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_head : %d",reg_NUM_BANK_HEAD);
       log_printf(TRACE,Commit_unit,FUNCTION,"    * num_bank_tail : %d",reg_NUM_BANK_TAIL);
+      log_printf(TRACE,Commit_unit,FUNCTION,"    * num_ptr_tail  : %d",reg_NUM_PTR_TAIL );
       
       for (uint32_t i=0; i<_param->_nb_front_end; i++)
@@ -720,69 +1042,90 @@
           {
             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]);
-            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STOP   : %d",reg_EVENT_STOP  [i][j]);
-            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_ALL  : %d",reg_NB_INST_COMMIT_ALL[i][j]);
-            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_MEM  : %d",reg_NB_INST_COMMIT_MEM[i][j]);
-            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_CURRENT   : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
-            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_NEXT      : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STATE       : %s - %s",toString(reg_EVENT_STATE [i][j]).c_str(),toString(commit_event_state_to_event_state(reg_EVENT_STATE [i][j])).c_str());
+//          log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_FLUSH       : %d",reg_EVENT_FLUSH [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_STOP        : %d",reg_EVENT_STOP  [i][j]);
+//             log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT             : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_PACKET      : %d",reg_EVENT_PACKET[i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d",reg_EVENT_LAST [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * EVENT_LAST        : %d (bank %d, ptr %d)",((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_ALL       : %d",reg_NB_INST_COMMIT_ALL[i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * NB_INST_MEM       : %d",reg_NB_INST_COMMIT_MEM[i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_CURRENT        : %.8x (%.8x) - %d %d",reg_PC_CURRENT [i][j],reg_PC_CURRENT [i][j]<<2, reg_PC_CURRENT_IS_DS [i][j], reg_PC_CURRENT_IS_DS_TAKE [i][j]);
+            log_printf(TRACE,Commit_unit,FUNCTION,"      * PC_NEXT           : %.8x (%.8x)",reg_PC_NEXT [i][j],reg_PC_NEXT [i][j]<<2);
           }
 
+      std::list<entry_t*>::iterator iter [_param->_nb_bank];
       for (uint32_t i=0; i<_param->_nb_bank; i++)
         {
           uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
-
-          log_printf(TRACE,Commit_unit,FUNCTION,"      * Bank [%d] size : %d, ptr : %d",num_bank,(int)_rob[num_bank].size(), reg_BANK_PTR [i]);
+//           log_printf(TRACE,Commit_unit,FUNCTION,"      * Bank [%d] size : %d, ptr : %d",num_bank,(int)_rob[num_bank].size(), reg_BANK_PTR [i]);
+
+          iter [num_bank] = _rob[num_bank].begin();
+        }
+
+      bool all_empty = false;
+      while (not all_empty)
+        {
+          all_empty = true;
           
-          for (std::list<entry_t*>::iterator it=_rob[num_bank].begin();
-               it!=_rob[num_bank].end();
-               it++)
+          for (uint32_t i=0; i<_param->_nb_bank; i++)
             {
-              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                     ,
-                         (((*it)->ptr << _param->_shift_num_slot) | num_bank),
-                         (*it)->front_end_id            ,
-                         (*it)->context_id              ,
-                         (*it)->rename_unit_id          ,
-                         (*it)->depth                   ,
-                         (*it)->type                    ,
-                         (*it)->operation               ,
-                         (*it)->is_delay_slot           ,
-                         (*it)->use_store_queue         ,
-                         (*it)->store_queue_ptr_write   ,
-                         (*it)->use_load_queue          ,
-                         (*it)->load_queue_ptr_write    ,
-                         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          ,
-                         (*it)->num_reg_ra_phy          ,
-                         (*it)->read_rb                 ,
-                         (*it)->num_reg_rb_log          ,
-                         (*it)->num_reg_rb_phy          ,
-                         (*it)->read_rc                 ,
-                         (*it)->num_reg_rc_log          ,
-                         (*it)->num_reg_rc_phy          ,
-                         (*it)->write_rd                ,
-                         (*it)->num_reg_rd_log          ,
-                         (*it)->num_reg_rd_phy_old      ,
-                         (*it)->num_reg_rd_phy_new      ,
-                         (*it)->write_re                ,
-                         (*it)->num_reg_re_log          ,
-                         (*it)->num_reg_re_phy_old      ,
-                         (*it)->num_reg_re_phy_new      );
-              
-              log_printf(TRACE,Commit_unit,FUNCTION,"                     %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)",
-                         (*it)->exception_use ,
-                         (*it)->exception     ,
-                         (*it)->flags         ,
-                         (*it)->no_sequence   ,
-                         (*it)->speculative   ,
-                         (*it)->address       ,
-                         (*it)->address<<2    ,
-                         (*it)->address_next  ,
-                         (*it)->address_next<<2
-                         );
+              uint32_t num_bank = (reg_NUM_BANK_HEAD+i)%_param->_nb_bank;
+      
+              std::list<entry_t*>::iterator it = iter[num_bank];        
+              if (it != _rob[num_bank].end())
+                {
+                  all_empty = false;
+
+                  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                     ,
+                             (((*it)->ptr << _param->_shift_num_slot) | num_bank),
+                             (*it)->front_end_id            ,
+                             (*it)->context_id              ,
+                             (*it)->rename_unit_id          ,
+                             (*it)->depth                   ,
+                             (*it)->type                    ,
+                             (*it)->operation               ,
+                             (*it)->is_delay_slot           ,
+                             (*it)->use_store_queue         ,
+                             (*it)->store_queue_ptr_write   ,
+                             (*it)->use_load_queue          ,
+                             (*it)->load_queue_ptr_write    ,
+                             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          ,
+                             (*it)->num_reg_ra_phy          ,
+                             (*it)->read_rb                 ,
+                             (*it)->num_reg_rb_log          ,
+                             (*it)->num_reg_rb_phy          ,
+                             (*it)->read_rc                 ,
+                             (*it)->num_reg_rc_log          ,
+                             (*it)->num_reg_rc_phy          ,
+                             (*it)->write_rd                ,
+                             (*it)->num_reg_rd_log          ,
+                             (*it)->num_reg_rd_phy_old      ,
+                             (*it)->num_reg_rd_phy_new      ,
+                             (*it)->write_re                ,
+                             (*it)->num_reg_re_log          ,
+                             (*it)->num_reg_re_phy_old      ,
+                             (*it)->num_reg_re_phy_new      );
+                  
+                  log_printf(TRACE,Commit_unit,FUNCTION,"                     %.2d %.2d %.1d %.1d %.1d - %.8x (%.8x) %.8x (%.8x)",
+                             (*it)->exception_use ,
+                             (*it)->exception     ,
+                             (*it)->flags         ,
+                             (*it)->no_sequence   ,
+                             (*it)->speculative   ,
+                             (*it)->address       ,
+                             (*it)->address<<2    ,
+                             (*it)->address_next  ,
+                             (*it)->address_next<<2
+                             );
+                  
+                  iter [num_bank] ++;
+                }
             }
         }
@@ -822,5 +1165,5 @@
               )
           if (entry->address != reg_PC_CURRENT[entry->front_end_id][entry->context_id])
-            throw ERRORMORPHEO(FUNCTION,toString(_("Rob top address (%x) is different of reg_PC_CURRENT[%d][%d] (%x).\n"),
+            throw ERRORMORPHEO(FUNCTION,toString(_("Rob top address (0x%x) is different of reg_PC_CURRENT[%d][%d] (0x%x).\n"),
                                                  entry->address,
                                                  entry->front_end_id,
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Parameters_msg_error.cpp	(revision 122)
@@ -40,6 +40,6 @@
       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"));
+//     if (_nb_inst_reexecute != 1)
+//       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)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Issue_queue.h	(revision 122)
@@ -77,4 +77,6 @@
   public    : SC_IN (Ttype_t           )  ***  in_ISSUE_IN_TYPE                  ;//[nb_rename_unit][nb_inst_rename]
   public    : SC_IN (Tlsq_ptr_t        )  ***  in_ISSUE_IN_STORE_QUEUE_PTR_WRITE ;//[nb_rename_unit][nb_inst_rename]
+  public    : SC_IN (Tlsq_ptr_t        )  ***  in_ISSUE_IN_STORE_QUEUE_PTR_READ  ;//[nb_rename_unit][nb_inst_rename]
+  public    : SC_IN (Tcontrol_t        )  ***  in_ISSUE_IN_STORE_QUEUE_EMPTY     ;//[nb_rename_unit][nb_inst_rename]
   public    : SC_IN (Tlsq_ptr_t        )  ***  in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  ;//[nb_rename_unit][nb_inst_rename]
   public    : SC_IN (Tcontrol_t        )  ***  in_ISSUE_IN_HAS_IMMEDIAT          ;//[nb_rename_unit][nb_inst_rename]
@@ -100,4 +102,6 @@
   public    : SC_IN (Ttype_t           )   **  in_REEXECUTE_TYPE                 ;//[nb_inst_reexecute]
   public    : SC_IN (Tlsq_ptr_t        )   **  in_REEXECUTE_STORE_QUEUE_PTR_WRITE;//[nb_inst_reexecute]
+  public    : SC_IN (Tlsq_ptr_t        )   **  in_REEXECUTE_STORE_QUEUE_PTR_READ ;//[nb_inst_reexecute]
+  public    : SC_IN (Tcontrol_t        )   **  in_REEXECUTE_STORE_QUEUE_EMPTY    ;//[nb_inst_reexecute]
   public    : SC_IN (Tlsq_ptr_t        )   **  in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ;//[nb_inst_reexecute]
   public    : SC_IN (Tcontrol_t        )   **  in_REEXECUTE_HAS_IMMEDIAT         ;//[nb_inst_reexecute]
@@ -123,4 +127,6 @@
   public    : SC_OUT(Ttype_t           )   ** out_ISSUE_OUT_TYPE                 ;//[nb_inst_issue]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE;//[nb_inst_issue]
+  public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_OUT_STORE_QUEUE_PTR_READ ;//[nb_inst_issue]
+  public    : SC_OUT(Tcontrol_t        )   ** out_ISSUE_OUT_STORE_QUEUE_EMPTY    ;//[nb_inst_issue]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ;//[nb_inst_issue]
   public    : SC_OUT(Tcontrol_t        )   ** out_ISSUE_OUT_HAS_IMMEDIAT         ;//[nb_inst_issue]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/include/Types.h	(revision 122)
@@ -33,4 +33,6 @@
   public : Ttype_t            _type                  ;
   public : Tlsq_ptr_t         _store_queue_ptr_write ;
+  public : Tlsq_ptr_t         _store_queue_ptr_read  ;
+  public : Tcontrol_t         _store_queue_empty     ;
   public : Tlsq_ptr_t         _load_queue_ptr_write  ;
   public : Tcontrol_t         _has_immediat          ;
@@ -53,4 +55,6 @@
 		    Ttype_t            type                  ,
 		    Tlsq_ptr_t         store_queue_ptr_write ,
+		    Tlsq_ptr_t         store_queue_ptr_read  ,
+		    Tcontrol_t         store_queue_empty     ,
 		    Tlsq_ptr_t         load_queue_ptr_write  ,
 		    Tcontrol_t         has_immediat          ,
@@ -73,4 +77,6 @@
       _type                  = type                 ;
       _store_queue_ptr_write = store_queue_ptr_write;
+      _store_queue_ptr_read  = store_queue_ptr_read ;
+      _store_queue_empty     = store_queue_empty    ;
       _load_queue_ptr_write  = load_queue_ptr_write ;
       _has_immediat          = has_immediat         ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_allocation.cpp	(revision 122)
@@ -69,4 +69,6 @@
       _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
       _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
+      _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
+      _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1                             ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
       _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr  ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
       _ALLOC2_SIGNAL_IN ( in_ISSUE_IN_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1]);
@@ -98,4 +100,6 @@
       ALLOC1_SIGNAL_IN ( in_REEXECUTE_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            );
       ALLOC1_SIGNAL_IN ( in_REEXECUTE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_IN ( in_REEXECUTE_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_IN ( in_REEXECUTE_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_IN ( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr  );
       ALLOC1_SIGNAL_IN ( in_REEXECUTE_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             );
@@ -127,4 +131,6 @@
       ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            );
       ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr  );
       ALLOC1_SIGNAL_OUT(out_ISSUE_OUT_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_deallocation.cpp	(revision 122)
@@ -36,4 +36,6 @@
 	DELETE2_SIGNAL( in_ISSUE_IN_TYPE                 ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_type            );
 	DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_WRITE,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_store_queue_ptr );
+	DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_PTR_READ ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_store_queue_ptr );
+	DELETE2_SIGNAL( in_ISSUE_IN_STORE_QUEUE_EMPTY    ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1);
 	DELETE2_SIGNAL( in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],_param->_size_load_queue_ptr  );
 	DELETE2_SIGNAL( in_ISSUE_IN_HAS_IMMEDIAT         ,_param->_nb_rename_unit, _param->_nb_inst_rename[it1],1                             );
@@ -58,4 +60,6 @@
         DELETE1_SIGNAL( in_REEXECUTE_TYPE                 ,_param->_nb_inst_reexecute,_param->_size_type            );
         DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_reexecute,_param->_size_store_queue_ptr );
+        DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_PTR_READ ,_param->_nb_inst_reexecute,_param->_size_store_queue_ptr );
+        DELETE1_SIGNAL( in_REEXECUTE_STORE_QUEUE_EMPTY    ,_param->_nb_inst_reexecute,1);
         DELETE1_SIGNAL( in_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_reexecute,_param->_size_load_queue_ptr  );
         DELETE1_SIGNAL( in_REEXECUTE_HAS_IMMEDIAT         ,_param->_nb_inst_reexecute,1                             );
@@ -80,4 +84,6 @@
         DELETE1_SIGNAL(out_ISSUE_OUT_TYPE                 ,_param->_nb_inst_issue,_param->_size_type            );
         DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_issue,_param->_size_store_queue_ptr );
+        DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_issue,_param->_size_store_queue_ptr );
+        DELETE1_SIGNAL(out_ISSUE_OUT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_issue,1);
         DELETE1_SIGNAL(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_issue,_param->_size_load_queue_ptr  );
         DELETE1_SIGNAL(out_ISSUE_OUT_HAS_IMMEDIAT         ,_param->_nb_inst_issue,1                             );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_genMealy_issue_out.cpp	(revision 122)
@@ -57,4 +57,6 @@
 	  PORT_WRITE(out_ISSUE_OUT_TYPE                  [index], entry->_type                 );
 	  PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [index], entry->_store_queue_ptr_write);
+	  PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_READ  [index], entry->_store_queue_ptr_read );
+	  PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_EMPTY     [index], entry->_store_queue_empty    );
 	  if (_param->_have_port_load_queue_ptr)
 	  PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [index], entry->_load_queue_ptr_write );
@@ -130,4 +132,6 @@
               PORT_WRITE(out_ISSUE_OUT_TYPE                  [index], entry->_type                 );
               PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [index], entry->_store_queue_ptr_write);
+              PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_READ  [index], entry->_store_queue_ptr_read );
+              PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_EMPTY     [index], entry->_store_queue_empty    );
               if (_param->_have_port_load_queue_ptr)
               PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [index], entry->_load_queue_ptr_write );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_in_order_transition.cpp	(revision 122)
@@ -66,4 +66,6 @@
 		                                         PORT_READ(in_ISSUE_IN_TYPE                  [i][j]),
 		                                         PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_READ  [i][j]),
+		                                         PORT_READ(in_ISSUE_IN_STORE_QUEUE_EMPTY     [i][j]),
                      (_param->_have_port_load_queue_ptr)?PORT_READ(in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  [i][j]):0,
 		                                         PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT          [i][j]),
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_genMoore.cpp	(revision 122)
@@ -125,4 +125,6 @@
 	        PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
 	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
+	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_READ  [i], entry->_store_queue_ptr_read );
+	        PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_EMPTY     [i], entry->_store_queue_empty    );
 	        if (_param->_have_port_load_queue_ptr)
 	        PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
@@ -186,4 +188,6 @@
 	            PORT_WRITE(out_ISSUE_OUT_TYPE                  [i], entry->_type                 );
 	            PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_WRITE [i], entry->_store_queue_ptr_write);
+	            PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_PTR_READ  [i], entry->_store_queue_ptr_read );
+	            PORT_WRITE(out_ISSUE_OUT_STORE_QUEUE_EMPTY     [i], entry->_store_queue_empty    );
 	            if (_param->_have_port_load_queue_ptr)
 	            PORT_WRITE(out_ISSUE_OUT_LOAD_QUEUE_PTR_WRITE  [i], entry->_load_queue_ptr_write );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_function_out_of_order_transition.cpp	(revision 122)
@@ -65,4 +65,6 @@
 			                                 PORT_READ(in_ISSUE_IN_TYPE                  [x][y]),
 			                                 PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_WRITE [x][y]),
+			                                 PORT_READ(in_ISSUE_IN_STORE_QUEUE_PTR_READ  [x][y]),
+			                                 PORT_READ(in_ISSUE_IN_STORE_QUEUE_EMPTY     [x][y]),
                      (_param->_have_port_load_queue_ptr)?PORT_READ(in_ISSUE_IN_LOAD_QUEUE_PTR_WRITE  [x][y]):0,
 			                                 PORT_READ(in_ISSUE_IN_HAS_IMMEDIAT          [x][y]),
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Issue_queue/src/Issue_queue_transition.cpp	(revision 122)
@@ -53,4 +53,6 @@
 			                             PORT_READ(in_REEXECUTE_TYPE                  [i]),
 			                             PORT_READ(in_REEXECUTE_STORE_QUEUE_PTR_WRITE [i]),
+			                             PORT_READ(in_REEXECUTE_STORE_QUEUE_PTR_READ  [i]),
+			                             PORT_READ(in_REEXECUTE_STORE_QUEUE_EMPTY     [i]),
                  (_param->_have_port_load_queue_ptr)?PORT_READ(in_REEXECUTE_LOAD_QUEUE_PTR_WRITE  [i]):0,
 			                             PORT_READ(in_REEXECUTE_HAS_IMMEDIAT          [i]),
@@ -119,5 +121,5 @@
         for (std::list<entry_t*>::iterator it=_issue_queue[i].begin();it!=_issue_queue[i].end(); ++it)
           {
-            log_printf(TRACE,Issue_queue,FUNCTION,"      [%.4d] %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d",
+            log_printf(TRACE,Issue_queue,FUNCTION,"      [%.4d] %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d %.1d %.2d, %.1d %.8x, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d",
                        j,
                        
@@ -130,4 +132,6 @@
                        
                        (*it)->_store_queue_ptr_write,
+                       (*it)->_store_queue_ptr_read ,
+                       (*it)->_store_queue_empty    ,
                        (*it)->_load_queue_ptr_write ,
                        
@@ -161,5 +165,5 @@
       for (std::list<entry_t*>::iterator it=_reexecute_queue.begin();it!=_reexecute_queue.end(); ++it)
         {
-          log_printf(TRACE,Issue_queue,FUNCTION,"      [%.4d] %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d, %.1d %.8x, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d",
+          log_printf(TRACE,Issue_queue,FUNCTION,"      [%.4d] %.2d %.2d %.4d, %.2d %.3d, %.2d %.2d %.1d %.2d, %.1d %.8x, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d, %.1d %.4d",
                      i,
                      
@@ -172,4 +176,6 @@
                      
                      (*it)->_store_queue_ptr_write,
+                     (*it)->_store_queue_ptr_read ,
+                     (*it)->_store_queue_empty    ,
                      (*it)->_load_queue_ptr_write ,
                      
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/OOO_Engine_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/OOO_Engine_Glue.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/include/OOO_Engine_Glue.h	(revision 122)
@@ -90,4 +90,6 @@
   public    : SC_IN (Tgeneral_data_t    ) ***  in_INSERT_RENAME_UNIT_IMMEDIAT                  ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Tlsq_ptr_t         ) ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     ;//[nb_rename_unit][nb_inst_insert]
+  public    : SC_IN (Tlsq_ptr_t         ) ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ      ;//[nb_rename_unit][nb_inst_insert]
+  public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY         ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Tlsq_ptr_t         ) ***  in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_IN (Tcontrol_t         ) ***  in_INSERT_RENAME_UNIT_READ_RA                   ;//[nb_rename_unit][nb_inst_insert]
@@ -136,4 +138,6 @@
   public    : SC_OUT(Ttype_t            ) *** out_INSERT_ISSUE_QUEUE_TYPE                      ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t         ) *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     ;//[nb_rename_unit][nb_inst_insert]
+  public    : SC_OUT(Tlsq_ptr_t         ) *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ      ;//[nb_rename_unit][nb_inst_insert]
+  public    : SC_OUT(Tcontrol_t         ) *** out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY         ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t         ) *** out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      ;//[nb_rename_unit][nb_inst_insert]
   public    : SC_OUT(Tcontrol_t         ) *** out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              ;//[nb_rename_unit][nb_inst_insert]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue.cpp	(revision 122)
@@ -152,4 +152,6 @@
                         << (*(in_INSERT_RENAME_UNIT_IMMEDIAT              [i][j]))
                         << (*(in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE [i][j]))
+                        << (*(in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ  [i][j]))
+                        << (*(in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY     [i][j]))
                         << (*(in_INSERT_RENAME_UNIT_READ_RA               [i][j]))
                         << (*(in_INSERT_RENAME_UNIT_NUM_REG_RA_PHY        [i][j]))
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_allocation.cpp	(revision 122)
@@ -93,4 +93,6 @@
       _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_IMMEDIAT                  ,"RENAME_UNIT_IMMEDIAT"                  ,Tgeneral_data_t    ,_param->_size_general_data    ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     ,"RENAME_UNIT_STORE_QUEUE_PTR_WRITE"     ,Tlsq_ptr_t         ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+      _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ      ,"RENAME_UNIT_STORE_QUEUE_PTR_READ"      ,Tlsq_ptr_t         ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+      _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY         ,"RENAME_UNIT_STORE_QUEUE_EMPTY"         ,Tcontrol_t         ,1                             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      ,"RENAME_UNIT_LOAD_QUEUE_PTR_WRITE"      ,Tlsq_ptr_t         ,_param->_size_load_queue_ptr  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_IN ( in_INSERT_RENAME_UNIT_READ_RA                   ,"RENAME_UNIT_READ_RA"                   ,Tcontrol_t         ,1                             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
@@ -139,4 +141,6 @@
       _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_TYPE                      ,"ISSUE_QUEUE_TYPE"                      ,Ttype_t            ,_param->_size_type            ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE     ,"ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE"     ,Tlsq_ptr_t         ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+      _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ      ,"ISSUE_QUEUE_STORE_QUEUE_PTR_READ"      ,Tlsq_ptr_t         ,_param->_size_store_queue_ptr ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
+      _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY         ,"ISSUE_QUEUE_STORE_QUEUE_EMPTY"         ,Tcontrol_t         ,1                             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE      ,"ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE"      ,Tlsq_ptr_t         ,_param->_size_load_queue_ptr  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
       _ALLOC2_SIGNAL_OUT(out_INSERT_ISSUE_QUEUE_HAS_IMMEDIAT              ,"ISSUE_QUEUE_HAS_IMMEDIAT"              ,Tcontrol_t         ,1                             ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_deallocation.cpp	(revision 122)
@@ -48,4 +48,6 @@
         DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_IMMEDIAT                  ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_general_data    );
         DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE     ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr );
+        DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_store_queue_ptr );
+        DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY         ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                             );
         DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE      ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],_param->_size_load_queue_ptr  );
         DELETE2_SIGNAL( in_INSERT_RENAME_UNIT_READ_RA                   ,_param->_nb_rename_unit,_param->_nb_inst_insert[it1],1                             );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/OOO_Engine_Glue/src/OOO_Engine_Glue_genMealy_insert.cpp	(revision 122)
@@ -36,4 +36,6 @@
           Tgeneral_data_t    IMMEDIAT              = PORT_READ(in_INSERT_RENAME_UNIT_IMMEDIAT              [i][j]);
           Tlsq_ptr_t         STORE_QUEUE_PTR_WRITE = PORT_READ(in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_WRITE [i][j]);
+          Tlsq_ptr_t         STORE_QUEUE_PTR_READ  = PORT_READ(in_INSERT_RENAME_UNIT_STORE_QUEUE_PTR_READ  [i][j]);
+          Tcontrol_t         STORE_QUEUE_EMPTY     = PORT_READ(in_INSERT_RENAME_UNIT_STORE_QUEUE_EMPTY     [i][j]);
           Tlsq_ptr_t         LOAD_QUEUE_PTR_WRITE  = (_param->_have_port_load_queue_ptr)?PORT_READ(in_INSERT_RENAME_UNIT_LOAD_QUEUE_PTR_WRITE [i][j]):0;
           Tcontrol_t         READ_RA               = PORT_READ(in_INSERT_RENAME_UNIT_READ_RA               [i][j]);
@@ -91,4 +93,6 @@
           PORT_WRITE(out_INSERT_ISSUE_QUEUE_OPERATION             [i][j],OPERATION            );
           PORT_WRITE(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE [i][j],STORE_QUEUE_PTR_WRITE);
+          PORT_WRITE(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_PTR_READ  [i][j],STORE_QUEUE_PTR_READ );
+          PORT_WRITE(out_INSERT_ISSUE_QUEUE_STORE_QUEUE_EMPTY     [i][j],STORE_QUEUE_EMPTY    );
           if (_param->_have_port_load_queue_ptr)
           PORT_WRITE(out_INSERT_ISSUE_QUEUE_LOAD_QUEUE_PTR_WRITE  [i][j],LOAD_QUEUE_PTR_WRITE );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/include/Reexecute_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/include/Reexecute_unit.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/include/Reexecute_unit.h	(revision 122)
@@ -129,4 +129,6 @@
   public    : SC_OUT(Ttype_t            )  ** out_REEXECUTE_TYPE                       ;//[nb_inst_reexecute]
   public    : SC_OUT(Tlsq_ptr_t         )  ** out_REEXECUTE_STORE_QUEUE_PTR_WRITE      ;//[nb_inst_reexecute]
+  public    : SC_OUT(Tlsq_ptr_t         )  ** out_REEXECUTE_STORE_QUEUE_PTR_READ       ;//[nb_inst_reexecute] //*
+  public    : SC_OUT(Tcontrol_t         )  ** out_REEXECUTE_STORE_QUEUE_EMPTY          ;//[nb_inst_reexecute] //*
   public    : SC_OUT(Tlsq_ptr_t         )  ** out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       ;//[nb_inst_reexecute] //*
   public    : SC_OUT(Tcontrol_t         )  ** out_REEXECUTE_HAS_IMMEDIAT               ;//[nb_inst_reexecute]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_allocation.cpp	(revision 122)
@@ -143,4 +143,6 @@
       ALLOC1_SIGNAL_OUT(out_REEXECUTE_TYPE                 ,"type"                 ,Ttype_t           ,_param->_size_type            );
       ALLOC1_SIGNAL_OUT(out_REEXECUTE_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_OUT(out_REEXECUTE_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr );
+      ALLOC1_SIGNAL_OUT(out_REEXECUTE_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1);
       ALLOC1_SIGNAL_OUT(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr  );
       ALLOC1_SIGNAL_OUT(out_REEXECUTE_HAS_IMMEDIAT         ,"has_immediat"         ,Tcontrol_t        ,1                             );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_deallocation.cpp	(revision 122)
@@ -83,4 +83,6 @@
         DELETE1_SIGNAL(out_REEXECUTE_TYPE                       , _param->_nb_inst_reexecute,_param->_size_type               );
         DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_WRITE      , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr    );
+        DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_PTR_READ       , _param->_nb_inst_reexecute,_param->_size_store_queue_ptr    );
+        DELETE1_SIGNAL(out_REEXECUTE_STORE_QUEUE_EMPTY          , _param->_nb_inst_reexecute,1);
         DELETE1_SIGNAL(out_REEXECUTE_LOAD_QUEUE_PTR_WRITE       , _param->_nb_inst_reexecute,_param->_size_load_queue_ptr     );
         DELETE1_SIGNAL(out_REEXECUTE_HAS_IMMEDIAT               , _param->_nb_inst_reexecute,1                                );
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 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Reexecute_unit/src/Reexecute_unit_genMealy_reexecute.cpp	(revision 122)
@@ -56,4 +56,6 @@
 	    PORT_WRITE(out_REEXECUTE_TYPE                  [i],entry->type          );
 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_WRITE [i],0);
+// 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_READ  [i], 0);
+// 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_EMPTY     [i], 0);
 	    PORT_WRITE(out_REEXECUTE_HAS_IMMEDIAT          [i],1);
 	    PORT_WRITE(out_REEXECUTE_IMMEDIAT              [i],entry->data          );
@@ -82,4 +84,6 @@
 	    PORT_WRITE(out_REEXECUTE_TYPE                  [i], PORT_READ(in_REEXECUTE_ROB_TYPE                    [i]));
 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_WRITE [i], PORT_READ(in_REEXECUTE_ROB_STORE_QUEUE_PTR_WRITE   [i]));
+// 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_PTR_READ  [i], 0);
+// 	    PORT_WRITE(out_REEXECUTE_STORE_QUEUE_EMPTY     [i], 0);
 	    PORT_WRITE(out_REEXECUTE_HAS_IMMEDIAT          [i], 0);
 	    PORT_WRITE(out_REEXECUTE_IMMEDIAT              [i], 0);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/include/Load_Store_pointer_unit.h	(revision 122)
@@ -70,4 +70,6 @@
   public    : SC_IN (Toperation_t   )      **  in_INSERT_OPERATION            ; // [nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_STORE_QUEUE_PTR_WRITE; // [nb_inst_insert]
+  public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_STORE_QUEUE_PTR_READ ; // [nb_inst_insert]
+  public    : SC_OUT(Tcontrol_t     )      ** out_INSERT_STORE_QUEUE_EMPTY    ; // [nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t     )      ** out_INSERT_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_insert]
 
@@ -84,23 +86,31 @@
   public    : SC_IN (Tlsq_ptr_t     )      **  in_RETIRE_LOAD_QUEUE_PTR_WRITE ; // [nb_inst_retire]
 
+    // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL            ;//[nb_front_end][nb_context]
+  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
+
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_PTR_WRITE; // [nb_load_store_queue]
-  public    : bool                          ** reg_STORE_QUEUE_USE      ; // [nb_load_store_queue][size_store_queue]
-  public    : Tlsq_ptr_t                     * reg_STORE_QUEUE_NB_USE   ; // [nb_load_store_queue]
-  public    : Tlsq_ptr_t                     * reg_LOAD_QUEUE_PTR_WRITE ; // [nb_load_store_queue]
-  public    : bool                          ** reg_LOAD_QUEUE_USE       ; // [nb_load_store_queue][size_load_queue]
+  private   : Tlsq_ptr_t                     * reg_STORE_QUEUE_PTR_WRITE; // [nb_load_store_queue]
+  private   : Tlsq_ptr_t                    ** reg_STORE_QUEUE_PTR_READ ; // [nb_front_end][nb_context]
+  private   : bool                          ** reg_STORE_QUEUE_EMPTY    ; // [nb_front_end][nb_context]
+  private   : bool                          ** reg_STORE_QUEUE_USE      ; // [nb_load_store_queue][size_store_queue]
+  private   : Tlsq_ptr_t                     * reg_STORE_QUEUE_NB_USE   ; // [nb_load_store_queue]
+  private   : Tlsq_ptr_t                     * reg_LOAD_QUEUE_PTR_WRITE ; // [nb_load_store_queue]
+  private   : bool                          ** reg_LOAD_QUEUE_USE       ; // [nb_load_store_queue][size_load_queue]
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  public    : Tcontrol_t                     * internal_INSERT_ACK          ; // [nb_inst_insert]
-  public    : operation_use_t                * internal_INSERT_OPERATION_USE; // [nb_inst_insert]
-  public    : uint32_t                       * internal_INSERT_LSQ          ; // [nb_inst_insert]
-  public    : Tlsq_ptr_t                     * internal_INSERT_PTR          ; // [nb_inst_insert]
+  private   : Tcontrol_t                     * internal_INSERT_ACK          ; // [nb_inst_insert]
+  private   : operation_use_t                * internal_INSERT_OPERATION_USE; // [nb_inst_insert]
+  private   : uint32_t                       * internal_INSERT_LSQ          ; // [nb_inst_insert]
+  private   : Tlsq_ptr_t                     * internal_INSERT_PTR          ; // [nb_inst_insert]
 
-  public    : Tcontrol_t                     * internal_RETIRE_ACK          ; // [nb_inst_retire]
-  public    : operation_use_t                * internal_RETIRE_OPERATION_USE; // [nb_inst_retire]
-  public    : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
-  public    : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
+  private   : Tcontrol_t                     * internal_RETIRE_ACK          ; // [nb_inst_retire]
+  private   : operation_use_t                * internal_RETIRE_OPERATION_USE; // [nb_inst_retire]
+  private   : uint32_t                       * internal_RETIRE_LSQ          ; // [nb_inst_retire]
+  private   : Tlsq_ptr_t                     * internal_RETIRE_PTR          ; // [nb_inst_retire]
+  private   : Tcontrol_t                    ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
 
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit.cpp	(revision 122)
@@ -74,4 +74,14 @@
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
+
+	// Constant : accepted already transaction
+        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+            {
+              internal_RETIRE_EVENT_ACK [i][j] = 1;
+              
+              PORT_WRITE(out_RETIRE_EVENT_ACK[i][j],internal_RETIRE_EVENT_ACK [i][j]);
+            }
+
 	log_printf(INFO,Load_Store_pointer_unit,FUNCTION,"Method - transition");
 
@@ -101,34 +111,34 @@
 
 # ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
-	  {
-	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_VAL                   [i]));
-	    if (_param->_have_port_front_end_id)
-	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_FRONT_END_ID          [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_CONTEXT_ID            [i]));
-	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_TYPE                  [i]));
-	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_OPERATION             [i]));
+// 	// List dependency information
+// 	for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
+// 	  {
+// 	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_VAL                   [i]));
+// 	    if (_param->_have_port_front_end_id)
+// 	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_FRONT_END_ID          [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_CONTEXT_ID            [i]));
+// 	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_TYPE                  [i]));
+// 	    (*(out_INSERT_ACK                   [i])) (*( in_INSERT_OPERATION             [i]));
   
-	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_VAL                   [i]));
-	    if (_param->_have_port_front_end_id)
-	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_FRONT_END_ID          [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_CONTEXT_ID            [i]));
-	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_TYPE                  [i]));
-	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_OPERATION             [i]));
+// 	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_VAL                   [i]));
+// 	    if (_param->_have_port_front_end_id)
+// 	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_FRONT_END_ID          [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_CONTEXT_ID            [i]));
+// 	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_TYPE                  [i]));
+// 	    (*(out_INSERT_STORE_QUEUE_PTR_WRITE [i])) (*( in_INSERT_OPERATION             [i]));
   
-	    if (_param->_have_port_load_queue_ptr)
-	      {
-	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_VAL                   [i]));
-	    if (_param->_have_port_front_end_id)
-	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_FRONT_END_ID          [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_CONTEXT_ID            [i]));
-	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_TYPE                  [i]));
-	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_OPERATION             [i]));
-	      }
-	  }
+// 	    if (_param->_have_port_load_queue_ptr)
+// 	      {
+// 	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_VAL                   [i]));
+// 	    if (_param->_have_port_front_end_id)
+// 	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_FRONT_END_ID          [i]));
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_CONTEXT_ID            [i]));
+// 	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_TYPE                  [i]));
+// 	    (*(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i])) (*( in_INSERT_OPERATION             [i]));
+// 	      }
+// 	  }
 # endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_allocation.cpp	(revision 122)
@@ -67,4 +67,6 @@
       ALLOC1_SIGNAL_IN ( in_INSERT_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
       ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t  ,_param->_size_store_queue_ptr);
+      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t  ,_param->_size_store_queue_ptr);
+      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t  ,1                            );
       ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t  ,_param->_size_load_queue_ptr );
 
@@ -80,6 +82,6 @@
       ALLOC1_SIGNAL_IN ( in_RETIRE_FRONT_END_ID         ,"front_end_id"         ,Tcontext_t  ,_param->_size_front_end_id   );
       ALLOC1_SIGNAL_IN ( in_RETIRE_CONTEXT_ID           ,"context_id"           ,Tcontext_t  ,_param->_size_context_id     );
-//       ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
-//       ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
+//    ALLOC1_SIGNAL_IN ( in_RETIRE_TYPE                 ,"type"                 ,Ttype_t     ,_param->_size_type           );
+//    ALLOC1_SIGNAL_IN ( in_RETIRE_OPERATION            ,"operation"            ,Toperation_t,_param->_size_operation      );
       ALLOC1_SIGNAL_IN ( in_RETIRE_USE_STORE_QUEUE      ,"use_store_queue"      ,Tcontrol_t  ,1);
       ALLOC1_SIGNAL_IN ( in_RETIRE_USE_LOAD_QUEUE       ,"use_load_queue"       ,Tcontrol_t  ,1);
@@ -90,7 +92,20 @@
     }
 
+    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
+
+      _ALLOC2_VALACK_IN ( in_RETIRE_EVENT_VAL           ,VAL,_param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
+
+      ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
+    }
+
     if (usage_is_set(_usage,USE_SYSTEMC))
       {
     ALLOC1(reg_STORE_QUEUE_PTR_WRITE     ,Tlsq_ptr_t     ,_param->_nb_load_store_queue);
+    ALLOC2(reg_STORE_QUEUE_PTR_READ      ,Tlsq_ptr_t     ,_param->_nb_front_end, _param->_nb_context[it1]);
+    ALLOC2(reg_STORE_QUEUE_EMPTY         ,bool           ,_param->_nb_front_end, _param->_nb_context[it1]);
     ALLOC2(reg_STORE_QUEUE_USE           ,bool           ,_param->_nb_load_store_queue,_param->_size_store_queue [it1]);
     ALLOC1(reg_STORE_QUEUE_NB_USE        ,Tlsq_ptr_t     ,_param->_nb_load_store_queue);
@@ -107,5 +122,8 @@
     ALLOC1(internal_RETIRE_LSQ           ,uint32_t       ,_param->_nb_inst_retire);
     ALLOC1(internal_RETIRE_PTR           ,Tlsq_ptr_t     ,_param->_nb_inst_retire);
+
+    ALLOC2(internal_RETIRE_EVENT_ACK     ,Tcontrol_t     ,_param->_nb_front_end,_param->_nb_context[it1]);
       }
+
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_deallocation.cpp	(revision 122)
@@ -36,4 +36,6 @@
         DELETE1_SIGNAL( in_INSERT_OPERATION            ,_param->_nb_inst_insert,_param->_size_operation      );
         DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert,_param->_size_store_queue_ptr);
+        DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert,_param->_size_store_queue_ptr);
+        DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_insert,1);
         DELETE1_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert,_param->_size_load_queue_ptr );
 
@@ -49,5 +51,11 @@
         DELETE1_SIGNAL( in_RETIRE_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_retire,_param->_size_load_queue_ptr );
 
+        DELETE2_SIGNAL( in_RETIRE_EVENT_VAL            ,_param->_nb_front_end, _param->_nb_context[it1],1);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
+
         DELETE1(reg_STORE_QUEUE_PTR_WRITE     ,_param->_nb_load_store_queue);
+        DELETE2(reg_STORE_QUEUE_PTR_READ      ,_param->_nb_front_end, _param->_nb_context[it1]);
+        DELETE2(reg_STORE_QUEUE_EMPTY         ,_param->_nb_front_end, _param->_nb_context[it1]);
         DELETE2(reg_STORE_QUEUE_USE           ,_param->_nb_load_store_queue,_param->_size_store_queue [it1]);
         DELETE1(reg_STORE_QUEUE_NB_USE        ,_param->_nb_load_store_queue);
@@ -64,4 +72,6 @@
         DELETE1(internal_RETIRE_LSQ           ,_param->_nb_inst_retire);
         DELETE1(internal_RETIRE_PTR           ,_param->_nb_inst_retire);
+
+        DELETE2(internal_RETIRE_EVENT_ACK     ,_param->_nb_front_end,_param->_nb_context[it1]);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_insert.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_insert.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_genMealy_insert.cpp	(revision 122)
@@ -54,6 +54,6 @@
 	Tcontrol_t ack                   = false;
 
-	if ( (PORT_READ(in_INSERT_VAL  [i]) == true       ) and
-	     (PORT_READ(in_INSERT_TYPE [i]) == TYPE_MEMORY))
+	if ((PORT_READ(in_INSERT_VAL  [i]) == true       ) and
+	    (PORT_READ(in_INSERT_TYPE [i]) == TYPE_MEMORY))
 	  {
             log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * type is memory");
@@ -75,5 +75,8 @@
 		uint32_t   ptr;
 
-                PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_WRITE [i], STORE_QUEUE_PTR_WRITE [lsq]);
+                PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_WRITE [i],     STORE_QUEUE_PTR_WRITE [lsq]);
+//                 PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ  [i], ((reg_STORE_QUEUE_PTR_READ  [front_end_id][context_id]+1)%_param->_size_load_queue[lsq]));
+                PORT_WRITE(out_INSERT_STORE_QUEUE_PTR_READ  [i], reg_STORE_QUEUE_PTR_READ  [front_end_id][context_id]);
+                PORT_WRITE(out_INSERT_STORE_QUEUE_EMPTY     [i], reg_STORE_QUEUE_EMPTY     [front_end_id][context_id]);
                 if (_param->_have_port_load_queue_ptr)
                 PORT_WRITE(out_INSERT_LOAD_QUEUE_PTR_WRITE  [i], LOAD_QUEUE_PTR_WRITE  [lsq]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_transition.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Load_Store_pointer_unit/src/Load_Store_pointer_unit_transition.cpp	(revision 122)
@@ -38,4 +38,10 @@
 	      reg_LOAD_QUEUE_USE  [i][j] = false;
 	  }
+        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+            {
+              reg_STORE_QUEUE_PTR_READ  [i][j] = 0;
+              reg_STORE_QUEUE_EMPTY     [i][j] = true;
+            }
       }
     else
@@ -56,4 +62,6 @@
  		    log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * use STORE_QUEUE");
 
+		    Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_INSERT_FRONT_END_ID [i]):0;
+		    Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_INSERT_CONTEXT_ID   [i]):0;
 		    uint32_t   lsq = internal_INSERT_LSQ [i];
 		    Tlsq_ptr_t ptr = internal_INSERT_PTR [i];
@@ -62,4 +70,5 @@
  		    log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * ptr : %d",ptr);
 
+		    reg_STORE_QUEUE_EMPTY     [front_end_id][context_id] = false; // new element
 		    reg_STORE_QUEUE_PTR_WRITE [lsq]      = (ptr+1)%_param->_size_store_queue[lsq];
 		    reg_STORE_QUEUE_NB_USE    [lsq]      ++;
@@ -109,5 +118,7 @@
  		    log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * lsq : %d",lsq);
  		    log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * ptr : %d",ptr);
-		    
+	
+                    // TODO : if ROB retire ooo context, can retire store ooo.
+
 // 		    reg_STORE_QUEUE_PTR_WRITE [lsq]      = ((ptr==0)?_param->_size_store_queue[lsq]:ptr)-1;
 		    reg_STORE_QUEUE_NB_USE    [lsq]      --;
@@ -137,6 +148,36 @@
 		}	
 	    }
+        
+        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+            {
+              uint32_t lsq = _param->_link_load_store_unit_with_thread[i][j];
+                    
+              if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_NO_EVENT)
+                {
+                  uint32_t ptr_old =  reg_STORE_QUEUE_PTR_READ[i][j];
+                  uint32_t ptr_new = (reg_STORE_QUEUE_PTR_READ[i][j]+1)%_param->_size_store_queue[lsq];
+
+                  if ((reg_STORE_QUEUE_USE [lsq][ptr_old] == false) and
+		      (reg_STORE_QUEUE_EMPTY    [i][j] == false))
+                    {
+                      reg_STORE_QUEUE_PTR_READ [i][j] = ptr_new;
+                      if (ptr_new == reg_STORE_QUEUE_PTR_WRITE [lsq])
+                      reg_STORE_QUEUE_EMPTY    [i][j] = true;
+                    }
+                }
+              
+              if (PORT_READ(in_RETIRE_EVENT_VAL[i][j]) and internal_RETIRE_EVENT_ACK [i][j])
+                if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT)
+                  {
+		    log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"  * EVENT [%d][%d]",i,j);
+
+                    // reset ptr_read
+                    reg_STORE_QUEUE_PTR_READ [i][j] = reg_STORE_QUEUE_PTR_WRITE [lsq];
+                    reg_STORE_QUEUE_EMPTY    [i][j] = true;
+                  }
+            }
       }
-
+    
     // ===================================================================
     // =====[ OTHER ]=====================================================
@@ -150,4 +191,8 @@
         {
           log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"    * Load_Store_unit [%d]",i);
+          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_LOAD_QUEUE_PTR_WRITE  : %d", reg_LOAD_QUEUE_PTR_WRITE [i]);
+          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_LOAD_QUEUE_USE        :");
+          for (uint32_t j=0; j<_param->_size_load_queue [i]; ++j)
+          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"        [%d] %d",j,reg_LOAD_QUEUE_USE [i][j]);
           log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_STORE_QUEUE_NB_USE    : %d", reg_STORE_QUEUE_NB_USE   [i]);
           log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_STORE_QUEUE_PTR_WRITE : %d", reg_STORE_QUEUE_PTR_WRITE[i]);
@@ -155,9 +200,11 @@
           for (uint32_t j=0; j<_param->_size_store_queue [i]; ++j)
           log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"        [%d] %d",j,reg_STORE_QUEUE_USE [i][j]);
-          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_LOAD_QUEUE_PTR_WRITE  : %d", reg_LOAD_QUEUE_PTR_WRITE [i]);
-          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_LOAD_QUEUE_USE        :");
-          for (uint32_t j=0; j<_param->_size_load_queue [i]; ++j)
-          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"        [%d] %d",j,reg_LOAD_QUEUE_USE [i][j]);
         }
+      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,Load_Store_pointer_unit,FUNCTION,"      * reg_STORE_QUEUE_PTR_READ [%d][%d] : %d",i,j,reg_STORE_QUEUE_PTR_READ [i][j]);
+          log_printf(TRACE,Load_Store_pointer_unit,FUNCTION,"      * reg_STORE_QUEUE_EMPTY    [%d][%d] : %d",i,j,reg_STORE_QUEUE_EMPTY    [i][j]);
+          }
     }
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/include/Register_Address_Translation_unit.h	(revision 122)
@@ -100,6 +100,6 @@
   public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_LOG    ;//[nb_inst_retire]
   public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_LOG    ;//[nb_inst_retire]
-  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_OLD;//[nb_inst_retire]
-  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_OLD;//[nb_inst_retire]
+  public    : SC_IN (Tgeneral_address_t)   **  in_RETIRE_NUM_REG_RD_PHY_NEW;//[nb_inst_retire]
+  public    : SC_IN (Tspecial_address_t)   **  in_RETIRE_NUM_REG_RE_PHY_NEW;//[nb_inst_retire]
   public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
   public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
@@ -114,7 +114,12 @@
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-  private   : Tgeneral_address_t          *** rat_gpr;                      //[nb_front_end][nb_context][nb_general_register_logic]
+  private   : Tgeneral_address_t          *** rat_gpr_not_speculative;      //[nb_front_end][nb_context][nb_general_register_logic]
+  private   : Tgeneral_address_t          *** rat_gpr_speculative;          //[nb_front_end][nb_context][nb_general_register_logic]
+  private   : bool                        *** rat_gpr_speculative_valid;    //[nb_front_end][nb_context][nb_general_register_logic]
   private   : bool                        *** rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
-  private   : Tspecial_address_t          *** rat_spr;                      //[nb_front_end][nb_context][nb_special_register_logic]
+
+  private   : Tspecial_address_t          *** rat_spr_not_speculative;      //[nb_front_end][nb_context][nb_special_register_logic]
+  private   : Tspecial_address_t          *** rat_spr_speculative;          //[nb_front_end][nb_context][nb_special_register_logic]
+  private   : bool                        *** rat_spr_speculative_valid;    //[nb_front_end][nb_context][nb_special_register_logic]
   private   : bool                        *** rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
 
@@ -123,10 +128,12 @@
   private   : Tcontrol_t                    * internal_INSERT_ACK;          //[nb_inst_insert]
   private   : Tcontrol_t                    * internal_RETIRE_ACK;          //[nb_inst_retire]
-  public    : Tcontrol_t                   ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
-
-  private   : bool                        *** internal_rat_gpr_update_table;         //[nb_front_end][nb_context][nb_general_register_logic]
-  private   : bool                        *** internal_rat_spr_update_table;         //[nb_front_end][nb_context][nb_special_register_logic]
-  public    : Tcontrol_t                    * internal_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
-  public    : Tcontrol_t                    * internal_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
+  private   : Tcontrol_t                   ** internal_RETIRE_EVENT_ACK    ;//[nb_front_end][nb_context]
+
+  private   : bool                        *** internal_rat_gpr_update_table;//[nb_front_end][nb_context][nb_general_register_logic]
+  private   : bool                        *** internal_rat_spr_update_table;//[nb_front_end][nb_context][nb_special_register_logic]
+
+  private   : Tcontrol_t                    * internal_RETIRE_RESTORE           ;//[nb_inst_retire]
+  private   : Tcontrol_t                    * internal_RETIRE_RESTORE_RD_PHY_OLD;//[nb_inst_retire]
+  private   : Tcontrol_t                    * internal_RETIRE_RESTORE_RE_PHY_OLD;//[nb_inst_retire]
 
 #endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit.cpp	(revision 122)
@@ -129,4 +129,8 @@
                       << (*(in_RENAME_NUM_REG_RE_LOG [i]));
           }
+        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+            sensitive << (*(in_RETIRE_EVENT_VAL   [i][j]))
+                      << (*(in_RETIRE_EVENT_STATE [i][j]));
 
 # ifdef SYSTEMCASS_SPECIFIC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_allocation.cpp	(revision 122)
@@ -109,6 +109,6 @@
       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_LOG    ,"num_reg_rd_log"    ,Tgeneral_address_t,_param->_size_general_register_logic);
       ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_LOG    ,"num_reg_re_log"    ,Tspecial_address_t,_param->_size_special_register_logic);
-      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_OLD,"num_reg_rd_phy_old",Tgeneral_address_t,_param->_size_general_register);
-      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_OLD,"num_reg_re_phy_old",Tspecial_address_t,_param->_size_special_register);
+      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RD_PHY_NEW,"num_reg_rd_phy_new",Tgeneral_address_t,_param->_size_general_register);
+      ALLOC1_SIGNAL_IN ( in_RETIRE_NUM_REG_RE_PHY_NEW,"num_reg_re_phy_new",Tspecial_address_t,_param->_size_special_register);
       ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RD_PHY_OLD,"restore_rd_phy_old",Tcontrol_t        ,1);
       ALLOC1_SIGNAL_OUT(out_RETIRE_RESTORE_RE_PHY_OLD,"restore_re_phy_old",Tcontrol_t        ,1);
@@ -136,11 +136,18 @@
     ALLOC2(internal_RETIRE_EVENT_ACK ,Tcontrol_t,_param->_nb_front_end,_param->_nb_context[it1]);
 
-    ALLOC3(rat_gpr                      ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
-    ALLOC3(rat_spr                      ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
-    ALLOC3(rat_gpr_update_table         ,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
-    ALLOC3(rat_spr_update_table         ,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
-    ALLOC3(internal_rat_gpr_update_table,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
-    ALLOC3(internal_rat_spr_update_table,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+    ALLOC3(rat_gpr_not_speculative  ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+    ALLOC3(rat_gpr_speculative      ,Tgeneral_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+    ALLOC3(rat_gpr_speculative_valid,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+    ALLOC3(rat_gpr_update_table     ,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+    
+    ALLOC3(rat_spr_not_speculative  ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+    ALLOC3(rat_spr_speculative      ,Tspecial_address_t,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+    ALLOC3(rat_spr_speculative_valid,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+    ALLOC3(rat_spr_update_table     ,bool              ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
 
+    ALLOC3(internal_rat_gpr_update_table,bool, _param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+    ALLOC3(internal_rat_spr_update_table,bool, _param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+
+    ALLOC1(internal_RETIRE_RESTORE           ,Tcontrol_t,_param->_nb_inst_retire);
     ALLOC1(internal_RETIRE_RESTORE_RD_PHY_OLD,Tcontrol_t,_param->_nb_inst_retire);
     ALLOC1(internal_RETIRE_RESTORE_RE_PHY_OLD,Tcontrol_t,_param->_nb_inst_retire);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_deallocation.cpp	(revision 122)
@@ -64,6 +64,6 @@
         DELETE1_SIGNAL( in_RETIRE_NUM_REG_RD_LOG    ,_param->_nb_inst_retire,_param->_size_general_register_logic);
         DELETE1_SIGNAL( in_RETIRE_NUM_REG_RE_LOG    ,_param->_nb_inst_retire,_param->_size_special_register_logic);
-        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_OLD,_param->_nb_inst_retire,_param->_size_general_register);
-        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_OLD,_param->_nb_inst_retire,_param->_size_special_register);
+        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RD_PHY_NEW,_param->_nb_inst_retire,_param->_size_general_register);
+        DELETE1_SIGNAL( in_RETIRE_NUM_REG_RE_PHY_NEW,_param->_nb_inst_retire,_param->_size_special_register);
         DELETE1_SIGNAL(out_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire,1);
         DELETE1_SIGNAL(out_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire,1);
@@ -79,16 +79,23 @@
         DELETE2(internal_RETIRE_EVENT_ACK              ,_param->_nb_front_end,_param->_nb_context[it1]);
 
-        DELETE3(rat_gpr                      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
-        DELETE3(rat_spr                      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+        DELETE3(rat_gpr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+        DELETE3(rat_gpr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+        DELETE3(rat_gpr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
         DELETE3(rat_gpr_update_table         ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
+
+        DELETE3(rat_spr_not_speculative      ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+        DELETE3(rat_spr_speculative          ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+        DELETE3(rat_spr_speculative_valid    ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
         DELETE3(rat_spr_update_table         ,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
+
         DELETE3(internal_rat_gpr_update_table,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_general_register_logic);
         DELETE3(internal_rat_spr_update_table,_param->_nb_front_end,_param->_nb_context[it1],_param->_nb_special_register_logic);
         
+        DELETE1(internal_RETIRE_RESTORE           ,_param->_nb_inst_retire);
         DELETE1(internal_RETIRE_RESTORE_RD_PHY_OLD,_param->_nb_inst_retire);
         DELETE1(internal_RETIRE_RESTORE_RE_PHY_OLD,_param->_nb_inst_retire);
       }
 
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
     delete    _component;
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_rename.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_rename.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_rename.cpp	(revision 122)
@@ -26,4 +26,5 @@
     log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET) != 0)
     for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
       if (PORT_READ(in_RENAME_VAL [i])) // not in sensitive list : it's to have valide value to array access
@@ -33,7 +34,11 @@
 	Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
 	Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID   [i]):0;
+        bool       have_event   = (PORT_READ(in_RETIRE_EVENT_VAL [front_end_id][context_id]) and // always ack
+                                   (PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]) == EVENT_STATE_EVENT));
+
 
         log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id       : %d",front_end_id);
         log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id         : %d",context_id);
+        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * have_event         : %d",have_event);
 
         Tgeneral_address_t num_reg_ra_log    = PORT_READ(in_RENAME_NUM_REG_RA_LOG [i]); //%_param->_nb_general_register;
@@ -43,9 +48,13 @@
         Tspecial_address_t num_reg_re_log    = PORT_READ(in_RENAME_NUM_REG_RE_LOG [i]); //%_param->_nb_special_register;
                                             
-        Tgeneral_address_t num_reg_ra_phy    = rat_gpr[front_end_id][context_id][num_reg_ra_log];
-        Tgeneral_address_t num_reg_rb_phy    = rat_gpr[front_end_id][context_id][num_reg_rb_log];
-        Tspecial_address_t num_reg_rc_phy    = rat_spr[front_end_id][context_id][num_reg_rc_log];
-        Tgeneral_address_t num_reg_rd_phy_old= rat_gpr[front_end_id][context_id][num_reg_rd_log];
-        Tspecial_address_t num_reg_re_phy_old= rat_spr[front_end_id][context_id][num_reg_re_log];
+        // if rat_speculative is valid, 
+        // then read rat_speculative have the most valid alias register
+        // else, they have an previous event, the rat_not_speculative have the valid register
+
+        Tgeneral_address_t num_reg_ra_phy    = (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_ra_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_ra_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_ra_log];
+        Tgeneral_address_t num_reg_rb_phy    = (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_rb_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_rb_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_rb_log];
+        Tspecial_address_t num_reg_rc_phy    = (rat_spr_speculative_valid[front_end_id][context_id][num_reg_rc_log] and not have_event)?rat_spr_speculative[front_end_id][context_id][num_reg_rc_log]:rat_spr_not_speculative[front_end_id][context_id][num_reg_rc_log];
+        Tgeneral_address_t num_reg_rd_phy_old= (rat_gpr_speculative_valid[front_end_id][context_id][num_reg_rd_log] and not have_event)?rat_gpr_speculative[front_end_id][context_id][num_reg_rd_log]:rat_gpr_not_speculative[front_end_id][context_id][num_reg_rd_log];
+        Tspecial_address_t num_reg_re_phy_old= (rat_spr_speculative_valid[front_end_id][context_id][num_reg_re_log] and not have_event)?rat_spr_speculative[front_end_id][context_id][num_reg_re_log]:rat_spr_not_speculative[front_end_id][context_id][num_reg_re_log];
 
         log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_ra         : %d -> %d",num_reg_ra_log,num_reg_ra_phy    );
@@ -54,5 +63,4 @@
         log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd         : %d -> %d",num_reg_rd_log,num_reg_rd_phy_old);
         log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re         : %d -> %d",num_reg_re_log,num_reg_re_phy_old);
-        
 
 	PORT_WRITE(out_RENAME_NUM_REG_RA_PHY     [i], num_reg_ra_phy    );
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_retire.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_retire.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_genMealy_retire.cpp	(revision 122)
@@ -26,8 +26,12 @@
     log_function(Register_Address_Translation_unit,FUNCTION,_name.c_str());
 
+    if (PORT_READ(in_NRESET) != 0)
+      {
     // Init internal update table
     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,Register_Address_Translation_unit,FUNCTION,"  * init [%d][%d]",i,j);
+
           // An event occure
           // bool event = (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) != EVENT_STATE_NO_EVENT);
@@ -35,14 +39,15 @@
                                      (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT));
 
+          log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * reset_update_table : %d",reset_update_table);
+
           // not event -> update_table == 1 -> always update
           // event     -> update_table and not reset
           for (uint32_t k=0; k<_param->_nb_general_register_logic; ++k)
             internal_rat_gpr_update_table [i][j][k] = // not event or 
-                                                      (rat_gpr_update_table [i][j][k] and not reset_update_table);
+                                                      (not reset_update_table and rat_gpr_update_table [i][j][k]);
           for (uint32_t k=0; k<_param->_nb_special_register_logic; ++k)
             internal_rat_spr_update_table [i][j][k] = // not event or 
-                                                      (rat_spr_update_table [i][j][k] and not reset_update_table);
+                                                      (not reset_update_table and rat_spr_update_table [i][j][k]);
         }
-
 
     // RETIRE is in order -> also don't need test if an instruction is valid
@@ -55,14 +60,16 @@
         Tcontrol_t retire_restore_re_phy_old = false;
 
-        Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
-        Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
-        Tcontrol_t restore      = (PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]) != EVENT_STATE_NO_EVENT);
+        Tcontext_t front_end_id   = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
+        Tcontext_t context_id     = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
+        Tcontrol_t retire_restore = (PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]) != EVENT_STATE_NO_EVENT);
+
+        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id         : %d",front_end_id);
+        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id           : %d",context_id  );
+        log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore              : %d",retire_restore);
 
         // Test if event -> need restore ?
-        if (restore)
+        if (retire_restore)
           {
-            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Have event");
-            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id         : %d",front_end_id);
-            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id           : %d",context_id  );
+            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * Have event");
                         
             // Test and update update table
@@ -87,14 +94,16 @@
               }
 
-            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_rd_phy_old   : %d",retire_restore_rd_phy_old);
-            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_re_phy_old   : %d",retire_restore_re_phy_old);
+            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * restore_rd_phy_old   : %d",retire_restore_rd_phy_old);
+            log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * restore_re_phy_old   : %d",retire_restore_re_phy_old);
           }
 
-        internal_RETIRE_RESTORE_RD_PHY_OLD[i] = retire_restore_rd_phy_old;
-        internal_RETIRE_RESTORE_RE_PHY_OLD[i] = retire_restore_re_phy_old;
+        internal_RETIRE_RESTORE            [i] = retire_restore;
+        internal_RETIRE_RESTORE_RD_PHY_OLD [i] = retire_restore_rd_phy_old;
+        internal_RETIRE_RESTORE_RE_PHY_OLD [i] = retire_restore_re_phy_old;
               
-        PORT_WRITE(out_RETIRE_RESTORE_RD_PHY_OLD[i], internal_RETIRE_RESTORE_RD_PHY_OLD[i]);
-        PORT_WRITE(out_RETIRE_RESTORE_RE_PHY_OLD[i], internal_RETIRE_RESTORE_RE_PHY_OLD[i]);
-        PORT_WRITE(out_RETIRE_RESTORE           [i], restore);
+        PORT_WRITE(out_RETIRE_RESTORE           [i], internal_RETIRE_RESTORE            [i]);
+        PORT_WRITE(out_RETIRE_RESTORE_RD_PHY_OLD[i], internal_RETIRE_RESTORE_RD_PHY_OLD [i]);
+        PORT_WRITE(out_RETIRE_RESTORE_RE_PHY_OLD[i], internal_RETIRE_RESTORE_RE_PHY_OLD [i]);
+      }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/Register_Address_Translation_unit/src/Register_Address_Translation_unit_transition.cpp	(revision 122)
@@ -34,15 +34,20 @@
 	  for (uint32_t j=0; j<_param->_nb_context[i]; j++)
 	    {
-	      rat_gpr [i][j][0] = 0;
+	      rat_gpr_not_speculative   [i][j][0] = 0;
+              rat_gpr_speculative_valid [i][j][0] = false;
 
 	      for (uint32_t k=1; k<_param->_nb_general_register_logic; k++)
                 {
-                  rat_gpr             [i][j][k] = gpr++;
-//                rat_gpr_update_table[i][j][k] = 0;
+                  rat_gpr_not_speculative    [i][j][k] = gpr++;
+//                rat_gpr_speculative        [i][j][k] = gpr++;
+                  rat_gpr_speculative_valid  [i][j][k] = false;
+//                rat_gpr_update_table       [i][j][k] = false;
                 }
 	      for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
                 {
-                  rat_spr             [i][j][k] = spr++;
-//                rat_spr_update_table[i][j][k] = 0;
+                  rat_spr_not_speculative    [i][j][k] = spr++;
+//                rat_spr_speculative        [i][j][k] = spr++;
+                  rat_spr_speculative_valid  [i][j][k] = false;
+//                rat_spr_update_table       [i][j][k] = false;
                 }
 	    }
@@ -53,7 +58,32 @@
 
 	// =====================================================
+	// ====[ RETIRE_EVENT ]=================================
+	// =====================================================
+        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
+            if (PORT_READ(in_RETIRE_EVENT_VAL [i][j]) and internal_RETIRE_EVENT_ACK [i][j])
+              // Test if event have just occure
+              if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT)
+                {
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Reset Update Table");
+                  
+                  // Reset update_table and validity table
+                  for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
+                    {
+                      rat_gpr_update_table      [i][j][k] = false;
+                      rat_gpr_speculative_valid [i][j][k] = false;
+                    }
+                  for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
+                    {
+                      rat_spr_update_table      [i][j][k] = false;
+                      rat_spr_speculative_valid [i][j][k] = false;
+                    }
+                }
+
+	// =====================================================
 	// ====[ INSERT ]=======================================
 	// =====================================================
 	// First : interface insert
+        // this instruction is speculative !!!
 	for (uint32_t i=0; i<_param->_nb_inst_insert; i++)
 	  // Test transaction
@@ -64,41 +94,37 @@
 	      Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_FRONT_END_ID [i]):0;
 	      Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_CONTEXT_ID   [i]):0;
-
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end      : %d",front_end_id);
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context        : %d",context_id);
+              Tcontrol_t write_rd     = PORT_READ(in_INSERT_WRITE_RD [i]);
+              Tcontrol_t write_re     = PORT_READ(in_INSERT_WRITE_RE [i]);
+
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end          : %d",front_end_id);
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context            : %d",context_id);
 	      
-	      // Test if write
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_rd       : %d",PORT_READ(in_INSERT_WRITE_RD [i]));
-	      if (PORT_READ(in_INSERT_WRITE_RD [i]) == 1)
-                {
-                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy : %d",PORT_READ(in_INSERT_NUM_REG_RD_PHY [i]));
-                  rat_gpr[front_end_id][context_id][PORT_READ(in_INSERT_NUM_REG_RD_LOG [i])] = PORT_READ(in_INSERT_NUM_REG_RD_PHY [i]);
-                }
-
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_re       : %d",PORT_READ(in_INSERT_WRITE_RE [i]));
-	      if (PORT_READ(in_INSERT_WRITE_RE [i]) == 1)
-                {
-                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy : %d",PORT_READ(in_INSERT_NUM_REG_RE_PHY [i]));
-                  rat_spr[front_end_id][context_id][PORT_READ(in_INSERT_NUM_REG_RE_LOG [i])] = PORT_READ(in_INSERT_NUM_REG_RE_PHY [i]);
+	      // Test if write and modifie RAT
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_rd           : %d",write_rd);
+	      if (write_rd == 1)
+                {
+                  Tgeneral_address_t num_reg_rd_log = PORT_READ(in_INSERT_NUM_REG_RD_LOG [i]);
+                  Tgeneral_address_t num_reg_rd_phy = PORT_READ(in_INSERT_NUM_REG_RD_PHY [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_log     : %d",num_reg_rd_log);
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy     : %d",num_reg_rd_phy);
+
+                  rat_gpr_speculative       [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy;
+                  rat_gpr_speculative_valid [front_end_id][context_id][num_reg_rd_log] = true;
+                }
+
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_re           : %d",write_re);
+	      if (write_re == 1)
+                {
+                  Tspecial_address_t num_reg_re_log = PORT_READ(in_INSERT_NUM_REG_RE_LOG [i]);
+                  Tspecial_address_t num_reg_re_phy = PORT_READ(in_INSERT_NUM_REG_RE_PHY [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_log     : %d",num_reg_re_log);
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy     : %d",num_reg_re_phy);
+
+                  rat_spr_speculative       [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy;
+                  rat_spr_speculative_valid [front_end_id][context_id][num_reg_re_log] = true;
                 }
 	    }
-
-	// =====================================================
-	// ====[ RETIRE_EVENT ]=================================
-	// =====================================================
-        for (uint32_t i=0; i<_param->_nb_front_end; ++i)
-          for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
-            if (PORT_READ(in_RETIRE_EVENT_VAL [i][j]) and internal_RETIRE_EVENT_ACK [i][j])
-              // Test if event have just occure
-              if (PORT_READ(in_RETIRE_EVENT_STATE [i][j]) == EVENT_STATE_EVENT)
-                {
-                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * Reset Update Table");
-                  
-                  // Reset update_table
-                  for (uint32_t k=0; k<_param->_nb_general_register_logic; k++)
-                    rat_gpr_update_table [i][j][k] = 0;
-                  for (uint32_t k=0; k<_param->_nb_special_register_logic; k++)
-                    rat_spr_update_table [i][j][k] = 0;
-                }
 
 	// =====================================================
@@ -117,59 +143,61 @@
 	      // the retire interface became of the Re Order Buffer, also is in program sequence !
 
-              Tcontext_t         front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
-              Tcontext_t         context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
-              Tevent_state_t     event_state  = PORT_READ(in_RETIRE_EVENT_STATE [front_end_id][context_id]);
-
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id : %d",front_end_id);
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id   : %d",context_id);
-              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * event_state  : %d",event_state);
-
-// 	      if (event_state != EVENT_STATE_NO_EVENT)
-// 		{
- 		  // Test if write and have not a previous update
-		  if (PORT_READ(in_RETIRE_WRITE_RD [i]) == 1)
-		    {
-		      Tgeneral_address_t rd_log = PORT_READ(in_RETIRE_NUM_REG_RD_LOG [i]);
+              Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RETIRE_FRONT_END_ID [i]):0;
+              Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RETIRE_CONTEXT_ID   [i]):0;
+              Tcontrol_t write_rd     = PORT_READ(in_RETIRE_WRITE_RD [i]);
+              Tcontrol_t write_re     = PORT_READ(in_RETIRE_WRITE_RE [i]);
+              Tcontrol_t restore      = internal_RETIRE_RESTORE [i];
+
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * front_end_id       : %d",front_end_id);
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * context_id         : %d",context_id  );
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore            : %d",restore     );
+
+              // Test if write and have not a previous update
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_rd           : %d",write_rd);
+              if (PORT_READ(in_RETIRE_WRITE_RD [i]) == 1)
+                {
+                  Tgeneral_address_t num_reg_rd_log     = PORT_READ(in_RETIRE_NUM_REG_RD_LOG     [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_log     : %d",num_reg_rd_log    );
+
+                  if (not restore)
+                    {
+                  Tgeneral_address_t num_reg_rd_phy_new = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_NEW [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_rd_phy_new : %d",num_reg_rd_phy_new);
+
+                  rat_gpr_not_speculative [front_end_id][context_id][num_reg_rd_log] = num_reg_rd_phy_new;
+                    }
+
+                  Tcontrol_t         restore_rd         = internal_RETIRE_RESTORE_RD_PHY_OLD [i];
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_rd         : %d",restore_rd        );
                       
-		      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * retire RD");
-		      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * rd_log       : %d",rd_log);
-		      
-// #ifdef DEBUG_TEST
-//                       if (not (internal_RETIRE_RESTORE_RD_PHY_OLD [i] and ( (rat_gpr_update_table [front_end_id][context_id][rd_log] == 0)) and (event_state != EVENT_STATE_NO_EVENT)))
-//                         throw ERRORMORPHEO(FUNCTION,toString(_("restore_rd_phy_old [%d] = %d, but rat_gpr_update_table[%d][%d][%d] = %d\n"),
-//                                                              i,internal_RETIRE_RESTORE_RD_PHY_OLD [i],
-//                                                              front_end_id,context_id,rd_log,rat_gpr_update_table [front_end_id][context_id][rd_log]));
-// #endif
-
- 		      if (internal_RETIRE_RESTORE_RD_PHY_OLD [i])
-// 		      if (rat_gpr_update_table [front_end_id][context_id][rd_log] == 0)
-			{                      
-			  rat_gpr              [front_end_id][context_id][rd_log] = PORT_READ(in_RETIRE_NUM_REG_RD_PHY_OLD [i]);
-			  rat_gpr_update_table [front_end_id][context_id][rd_log] = 1;
-			}
-		    }
-
-		  if (PORT_READ(in_RETIRE_WRITE_RE [i]) == 1)
-		    {
-		      Tspecial_address_t re_log = PORT_READ(in_RETIRE_NUM_REG_RE_LOG [i]);
-
-		      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * retire RE");
-		      log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * re_log       : %d",re_log);
-
-// #ifdef DEBUG_TEST
-//                       if (not (internal_RETIRE_RESTORE_RE_PHY_OLD [i] and ((rat_spr_update_table [front_end_id][context_id][re_log] == 0) and (event_state != EVENT_STATE_NO_EVENT))))
-//                         throw ERRORMORPHEO(FUNCTION,toString(_("restore_re_phy_old [%d] = %d, but rat_spr_update_table[%d][%d][%d] = %d\n"),
-//                                                              i,internal_RETIRE_RESTORE_RE_PHY_OLD [i],
-//                                                              front_end_id,context_id,re_log,rat_spr_update_table [front_end_id][context_id][re_log]));
-// #endif
-
- 		      if (internal_RETIRE_RESTORE_RE_PHY_OLD [i])
-// 		      if (rat_spr_update_table [front_end_id][context_id][re_log] == 0)
-			{                      
-			  rat_spr              [front_end_id][context_id][re_log] = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_OLD [i]);
-			  rat_spr_update_table [front_end_id][context_id][re_log] = 1;
-			}
-		    }
-// 		}
+                  if (restore_rd)
+                  rat_gpr_update_table    [front_end_id][context_id][num_reg_rd_log] = true;
+                }
+
+              log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * write_re           : %d",write_re);
+              if (PORT_READ(in_RETIRE_WRITE_RE [i]) == 1)
+                {
+                  Tspecial_address_t num_reg_re_log     = PORT_READ(in_RETIRE_NUM_REG_RE_LOG     [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_log     : %d",num_reg_re_log    );
+
+                  if (not restore)
+                    {
+                  Tspecial_address_t num_reg_re_phy_new = PORT_READ(in_RETIRE_NUM_REG_RE_PHY_NEW [i]);
+
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * num_reg_re_phy_new : %d",num_reg_re_phy_new);
+
+                  rat_spr_not_speculative [front_end_id][context_id][num_reg_re_log] = num_reg_re_phy_new;
+                    }
+
+                  Tcontrol_t         restore_re         = internal_RETIRE_RESTORE_RE_PHY_OLD [i];
+                  log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"    * restore_re         : %d",restore_re        );
+                      
+                  if (restore_re)
+                  rat_spr_update_table    [front_end_id][context_id][num_reg_re_log] = true;
+                }
+
 	    }
       }
@@ -194,5 +222,5 @@
                       break;
                     else
-                      str+=toString("GPR[%.4d] - %.5d %.1d | ",index,rat_gpr[i][j][index],rat_gpr_update_table[i][j][index]);
+                      str+=toString("GPR[%.4d] - %.1d %.5d (%.5d) %.1d | ",index,rat_gpr_speculative_valid [i][j][index],rat_gpr_speculative [i][j][index],rat_gpr_not_speculative [i][j][index],rat_gpr_update_table[i][j][index]);
                   }
                 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
@@ -209,5 +237,5 @@
                       break;
                     else
-                      str+=toString("SPR[%.4d] - %.5d %.1d | ",index,rat_spr[i][j][index],rat_spr_update_table[i][j][index]);
+                      str+=toString("SPR[%.4d] - %.1d %.5d (%.5d) %.1d | ",index,rat_spr_speculative_valid [i][j][index],rat_spr_speculative [i][j][index],rat_spr_not_speculative [i][j][index],rat_spr_update_table[i][j][index]);
                   }
                 log_printf(TRACE,Register_Address_Translation_unit,FUNCTION,"      * %s",str.c_str());
@@ -218,20 +246,35 @@
 
 #ifdef DEBUG_TEST
-        if (1)
+# if 1
+    {
+      for (uint32_t i=0; i<_param->_nb_front_end; ++i)
+        for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
           {
-            for (uint32_t i=0; i<_param->_nb_front_end; ++i)
-              for (uint32_t j=0; j<_param->_nb_context[i]; ++j)
-                {
-                  for (uint32_t x=0; x<_param->_nb_general_register_logic; ++x)
-                    for (uint32_t y=x+1; y<_param->_nb_general_register_logic; ++y)
-                      if (rat_gpr[i][j][x] == rat_gpr[i][j][y])
-                        throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_gpr[%d][%d][%d] == rat_gpr[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_gpr[i][j][x]));
-                  for (uint32_t x=0; x<_param->_nb_special_register_logic; ++x)
-                    for (uint32_t y=x+1; y<_param->_nb_special_register_logic; ++y)
-                      if (rat_spr[i][j][x] == rat_spr[i][j][y])
-                        throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_spr[%d][%d][%d] == rat_spr[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_spr[i][j][x]));
-                }
-
+            for (uint32_t x=0; x<_param->_nb_general_register_logic; ++x)
+              for (uint32_t y=x+1; y<_param->_nb_general_register_logic; ++y)
+                {
+                  if (rat_gpr_speculative_valid [i][j][x] and
+                      rat_gpr_speculative_valid [i][j][y] and
+                      (rat_gpr_speculative[i][j][x] == rat_gpr_speculative[i][j][y]))
+                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_gpr_speculative[%d][%d][%d] == rat_gpr_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_gpr_speculative[i][j][x]));
+                  if (rat_gpr_not_speculative[i][j][x] == rat_gpr_not_speculative[i][j][y])
+                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_gpr_not_speculative[%d][%d][%d] == rat_gpr_not_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_gpr_not_speculative[i][j][x]));
+                  
+                }
+            for (uint32_t x=0; x<_param->_nb_special_register_logic; ++x)
+              for (uint32_t y=x+1; y<_param->_nb_special_register_logic; ++y)
+                {
+                  if(rat_spr_speculative_valid [i][j][x] and
+                     rat_spr_speculative_valid [i][j][y] and
+                     (rat_spr_speculative[i][j][x] == rat_spr_speculative[i][j][y]))
+                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_spr_speculative[%d][%d][%d] == rat_spr_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_spr_speculative[i][j][x]));
+                  if (rat_spr_not_speculative[i][j][x] == rat_spr_not_speculative[i][j][y])
+                    throw ERRORMORPHEO (FUNCTION,toString(_("In RAT, rat_spr_not_speculative[%d][%d][%d] == rat_spr_not_speculative[%d][%d][%d] == %d"),i,j,x,i,j,y,rat_spr_not_speculative[i][j][x]));
+                  
+                }
           }
+      
+    }
+# endif
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Register_translation_unit/src/Register_translation_unit_allocation.cpp	(revision 122)
@@ -361,8 +361,8 @@
 	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    ,
 		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_LOG"    );
-	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD",
-		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_OLD");
-	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD",
-		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_OLD");
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW",
+		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RD_PHY_NEW");
+	  PORT_MAP(_component,src , "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW",
+		              dest, "in_RETIRE_"+toString(i)+"_NUM_REG_RE_PHY_NEW");
 
 	  dest = _name+"_register_translation_unit_glue";
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/include/Rename_select.h	(revision 122)
@@ -125,5 +125,6 @@
 
     // ~~~~~[ Interface "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-  public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE      ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_FLUSH      ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_STOP       ;//[nb_front_end][nb_context]
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select.cpp	(revision 122)
@@ -125,5 +125,6 @@
 	for (uint32_t i=0; i<_param->_nb_front_end; i++)
 	  for (uint32_t j=0; j<_param->_nb_context [i]; j++)
-            sensitive << (*(in_RETIRE_EVENT_STATE [i][j]));
+            sensitive << (*(in_RETIRE_EVENT_FLUSH [i][j]))
+                      << (*(in_RETIRE_EVENT_STOP  [i][j]));
 
 	for (uint32_t i=0; i<_param->_nb_inst_rename; i++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_allocation.cpp	(revision 122)
@@ -130,5 +130,6 @@
       ALLOC2_INTERFACE_BEGIN("retire_event", IN,NORTH, _("Retire event"), _param->_nb_front_end, _param->_nb_context[it1]);
 
-      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_FLUSH         ,"flush"                ,Tcontrol_t        ,1                        , _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STOP          ,"stop"                 ,Tcontrol_t        ,1                        , _param->_nb_front_end, _param->_nb_context[it1]);
 
       ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_deallocation.cpp	(revision 122)
@@ -85,5 +85,6 @@
         DELETE1_SIGNAL(out_RENAME_OUT_EXCEPTION     ,_param->_nb_inst_rename,_param->_size_exception             );
 
-        DELETE2_SIGNAL( in_RETIRE_EVENT_STATE       ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_FLUSH       ,_param->_nb_front_end, _param->_nb_context[it1],1);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_STOP        ,_param->_nb_front_end, _param->_nb_context[it1],1);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_select/src/Rename_select_genMealy.cpp	(revision 122)
@@ -17,4 +17,5 @@
 namespace rename_select {
 
+// #define CONTINUE_ON_EVENT_STOP
 
 #undef  FUNCTION
@@ -59,63 +60,74 @@
                 PORT_READ(in_RENAME_IN_VAL[x][y]))
 	      {
-		// Find !!!
-		val [i]    = true;
-		ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]);
 
                 log_printf(TRACE,Rename_select,FUNCTION,"      * in_RENAME_OUT_ACK    : %d",PORT_READ(in_RENAME_OUT_ACK[i]));
                 Tcontext_t front_end_id = (_param->_have_port_front_end_id)?PORT_READ(in_RENAME_IN_FRONT_END_ID [x][y]):0;
                 Tcontext_t context_id   = (_param->_have_port_context_id  )?PORT_READ(in_RENAME_IN_CONTEXT_ID   [x][y]):0;
+		Tcontrol_t stop         = PORT_READ(in_RETIRE_EVENT_STOP  [x][context_id]);
 
 		log_printf(TRACE,Rename_select,FUNCTION,"      * front_end_id         : %d",front_end_id);
 		log_printf(TRACE,Rename_select,FUNCTION,"      * context_id           : %d",context_id);
+                log_printf(TRACE,Rename_select,FUNCTION,"      * stop                 : %d",stop);
                 
                 // Test if ROB is Flushed
-                Tevent_state_t event_state         = PORT_READ(in_RETIRE_EVENT_STATE [x][context_id]);
-		Tcontrol_t     have_event          = (event_state != EVENT_STATE_NO_EVENT);
-		Tcontrol_t     can_register_access = not have_event;
-		Tcontrol_t     no_execute          = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or have_event);
-		Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]) and can_register_access);
-		Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]) and can_register_access);
-		Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]) and can_register_access);
-		Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]) and can_register_access);
-		Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]) and can_register_access);
-// 		Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]));
-// 		Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]));
-// 		Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]));
-// 		Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]));
-// 		Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]));
-
-                log_printf(TRACE,Rename_select,FUNCTION,"      * event_state          : %d",event_state);
-                log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (before)  : %d",PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));
-                log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (after)   : %d",no_execute);
-
-		if (_param->_have_port_front_end_id)
-		PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i],front_end_id);
-		if (_param->_have_port_context_id)
-                PORT_WRITE(out_RENAME_OUT_CONTEXT_ID   [i],context_id);
-		if (_param->_have_port_depth)
-		PORT_WRITE(out_RENAME_OUT_DEPTH        [i],PORT_READ(in_RENAME_IN_DEPTH         [x][y]));
-		PORT_WRITE(out_RENAME_OUT_TYPE         [i],PORT_READ(in_RENAME_IN_TYPE          [x][y]));
-		PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
-		PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],no_execute);
-		PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
-#ifdef DEBUG
-		PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
+#ifndef CONTINUE_ON_EVENT_STOP
+                if (not stop)
 #endif
-		PORT_WRITE(out_RENAME_OUT_ADDRESS_NEXT [i],PORT_READ(in_RENAME_IN_ADDRESS_NEXT  [x][y]));
-		PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
-		PORT_WRITE(out_RENAME_OUT_IMMEDIAT     [i],PORT_READ(in_RENAME_IN_IMMEDIAT      [x][y]));
-		PORT_WRITE(out_RENAME_OUT_READ_RA      [i],read_ra);
-		PORT_WRITE(out_RENAME_OUT_NUM_REG_RA   [i],PORT_READ(in_RENAME_IN_NUM_REG_RA    [x][y]));
-		PORT_WRITE(out_RENAME_OUT_READ_RB      [i],read_rb);
-		PORT_WRITE(out_RENAME_OUT_NUM_REG_RB   [i],PORT_READ(in_RENAME_IN_NUM_REG_RB    [x][y]));
-		PORT_WRITE(out_RENAME_OUT_READ_RC      [i],read_rc);
-		PORT_WRITE(out_RENAME_OUT_NUM_REG_RC   [i],PORT_READ(in_RENAME_IN_NUM_REG_RC    [x][y]));
-		PORT_WRITE(out_RENAME_OUT_WRITE_RD     [i],write_rd);
-		PORT_WRITE(out_RENAME_OUT_NUM_REG_RD   [i],PORT_READ(in_RENAME_IN_NUM_REG_RD    [x][y]));
-		PORT_WRITE(out_RENAME_OUT_WRITE_RE     [i],write_re);
-		PORT_WRITE(out_RENAME_OUT_NUM_REG_RE   [i],PORT_READ(in_RENAME_IN_NUM_REG_RE    [x][y]));
-		PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y]));
-		PORT_WRITE(out_RENAME_OUT_EXCEPTION    [i],PORT_READ(in_RENAME_IN_EXCEPTION     [x][y]));
+                  {
+                    // Find !!!
+                    val [i]    = true;
+                    ack [x][y] = PORT_READ(in_RENAME_OUT_ACK [i]);
+                    
+		    Tcontrol_t     have_event          = (PORT_READ(in_RETIRE_EVENT_FLUSH [x][context_id]) 
+#ifdef CONTINUE_ON_EVENT_STOP
+                                                          or stop
+#endif
+                                                          );
+		    Tcontrol_t     can_register_access = not have_event;
+		    Tcontrol_t     no_execute          = (PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]) or have_event);
+		    Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]) and can_register_access);
+		    Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]) and can_register_access);
+		    Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]) and can_register_access);
+		    Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]) and can_register_access);
+		    Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]) and can_register_access);
+// 		    Tcontrol_t     read_ra             = (PORT_READ(in_RENAME_IN_READ_RA    [x][y]));
+// 		    Tcontrol_t     read_rb             = (PORT_READ(in_RENAME_IN_READ_RB    [x][y]));
+// 		    Tcontrol_t     read_rc             = (PORT_READ(in_RENAME_IN_READ_RC    [x][y]));
+// 		    Tcontrol_t     write_rd            = (PORT_READ(in_RENAME_IN_WRITE_RD   [x][y]));
+// 		    Tcontrol_t     write_re            = (PORT_READ(in_RENAME_IN_WRITE_RE   [x][y]));
+                    
+                    log_printf(TRACE,Rename_select,FUNCTION,"      * have_event           : %d",have_event);
+                    log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (before)  : %d",PORT_READ(in_RENAME_IN_NO_EXECUTE [x][y]));
+                    log_printf(TRACE,Rename_select,FUNCTION,"      * no_execute (after)   : %d",no_execute);
+                    
+		    if (_param->_have_port_front_end_id)
+		    PORT_WRITE(out_RENAME_OUT_FRONT_END_ID [i],front_end_id);
+		    if (_param->_have_port_context_id)
+                    PORT_WRITE(out_RENAME_OUT_CONTEXT_ID   [i],context_id);
+		    if (_param->_have_port_depth)
+		    PORT_WRITE(out_RENAME_OUT_DEPTH        [i],PORT_READ(in_RENAME_IN_DEPTH         [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_TYPE         [i],PORT_READ(in_RENAME_IN_TYPE          [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_OPERATION    [i],PORT_READ(in_RENAME_IN_OPERATION     [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_NO_EXECUTE   [i],no_execute);
+		    PORT_WRITE(out_RENAME_OUT_IS_DELAY_SLOT[i],PORT_READ(in_RENAME_IN_IS_DELAY_SLOT [x][y]));
+#ifdef DEBUG        
+		    PORT_WRITE(out_RENAME_OUT_ADDRESS      [i],PORT_READ(in_RENAME_IN_ADDRESS       [x][y]));
+#endif              
+		    PORT_WRITE(out_RENAME_OUT_ADDRESS_NEXT [i],PORT_READ(in_RENAME_IN_ADDRESS_NEXT  [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_HAS_IMMEDIAT [i],PORT_READ(in_RENAME_IN_HAS_IMMEDIAT  [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_IMMEDIAT     [i],PORT_READ(in_RENAME_IN_IMMEDIAT      [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_READ_RA      [i],read_ra);
+		    PORT_WRITE(out_RENAME_OUT_NUM_REG_RA   [i],PORT_READ(in_RENAME_IN_NUM_REG_RA    [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_READ_RB      [i],read_rb);
+		    PORT_WRITE(out_RENAME_OUT_NUM_REG_RB   [i],PORT_READ(in_RENAME_IN_NUM_REG_RB    [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_READ_RC      [i],read_rc);
+		    PORT_WRITE(out_RENAME_OUT_NUM_REG_RC   [i],PORT_READ(in_RENAME_IN_NUM_REG_RC    [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_WRITE_RD     [i],write_rd);
+		    PORT_WRITE(out_RENAME_OUT_NUM_REG_RD   [i],PORT_READ(in_RENAME_IN_NUM_REG_RD    [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_WRITE_RE     [i],write_re);
+		    PORT_WRITE(out_RENAME_OUT_NUM_REG_RE   [i],PORT_READ(in_RENAME_IN_NUM_REG_RE    [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_EXCEPTION_USE[i],PORT_READ(in_RENAME_IN_EXCEPTION_USE [x][y]));
+		    PORT_WRITE(out_RENAME_OUT_EXCEPTION    [i],PORT_READ(in_RENAME_IN_EXCEPTION     [x][y]));
+                  }
 	      }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/include/Rename_unit_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/include/Rename_unit_Glue.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/include/Rename_unit_Glue.h	(revision 122)
@@ -107,10 +107,18 @@
   public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_LOAD_STORE_QUEUE_POINTER_VAL           ;//[nb_inst_retire]
   public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_LOAD_STORE_QUEUE_POINTER_ACK           ;//[nb_inst_retire]
-//public    : SC_OUT(Ttype_t           )   ** out_RETIRE_LOAD_STORE_QUEUE_POINTER_TYPE          ;//[nb_inst_retire]
-//public    : SC_OUT(Toperation_t      )   ** out_RETIRE_LOAD_STORE_QUEUE_POINTER_OPERATION     ;//[nb_inst_retire]
 											        
   public    : SC_OUT(Tcontrol_t        )   ** out_RETIRE_REGISTER_TRANSLATION_VAL               ;//[nb_inst_retire]
   public    : SC_IN (Tcontrol_t        )   **  in_RETIRE_REGISTER_TRANSLATION_ACK               ;//[nb_inst_retire]
+
+    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_VAL                              ;//[nb_front_end][nb_context]
+  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK                              ;//[nb_front_end][nb_context]
 											        
+  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL     ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK     ;//[nb_front_end][nb_context]
+											        
+  public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL         ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK         ;//[nb_front_end][nb_context]
+
     // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~		        
   public    : SC_IN (Tspr_t            )  ***  in_SPR_READ_SR                                   ;//[nb_front_end][nb_context]
@@ -153,9 +161,10 @@
 					       
 #ifdef SYSTEMC				       
-  public  : void        transition                (void);
-//public  : void        genMoore                  (void);
-  public  : void        genMealy_insert_valack    (void);
-  public  : void        genMealy_retire_valack    (void);
-  public  : void        genMealy_insert           (void);
+  public  : void        transition                   (void);
+//public  : void        genMoore                     (void);
+  public  : void        genMealy_insert_valack       (void);
+  public  : void        genMealy_retire_valack       (void);
+  public  : void        genMealy_retire_event_valack (void);
+  public  : void        genMealy_insert              (void);
 #endif					       
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue.cpp	(revision 122)
@@ -126,4 +126,21 @@
 	    << (*(in_RETIRE_REGISTER_TRANSLATION_ACK     [i]))
 	    ;
+
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+# endif    
+
+	log_printf(INFO,Rename_unit_Glue,FUNCTION,_("<%s> : Method - genMealy_retire_event_valack"),_name.c_str());
+
+	SC_METHOD (genMealy_retire_event_valack);
+	dont_initialize ();
+// 	sensitive << (*(in_CLOCK)).neg(); // don't need internal register
+	for (uint32_t i=0; i<_param->_nb_front_end; i++)
+	  for (uint32_t j=0; j<_param->_nb_context[i]; j++)
+            sensitive 
+              << (*(in_RETIRE_EVENT_VAL                          [i][j]))
+              << (*(in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK [i][j]))
+              << (*(in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK     [i][j]))
+              ;
 
 # ifdef SYSTEMCASS_SPECIFIC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_allocation.cpp	(revision 122)
@@ -115,4 +115,18 @@
     }
 
+    // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC2_INTERFACE_BEGIN("retire_event",OUT,NORTH,_("Retire_Event interface"),_param->_nb_front_end,_param->_nb_context[it1]);
+
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_VAL                             ,"VAL"                                  ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_ACK                             ,"ACK"                                  ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL    ,"LOAD_STORE_QUEUE_POINTER_VAL"         ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK    ,"LOAD_STORE_QUEUE_POINTER_ACK"         ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_OUT(out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL        ,"REGISTER_TRANSLATION_VAL"             ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK        ,"REGISTER_TRANSLATION_ACK"             ,Tcontrol_t        ,1,_param->_nb_front_end,_param->_nb_context[it1]);
+
+      ALLOC2_INTERFACE_END(_param->_nb_front_end,_param->_nb_context[it1]);
+    }
+
     // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_deallocation.cpp	(revision 122)
@@ -72,4 +72,11 @@
         DELETE1_SIGNAL(out_RETIRE_REGISTER_TRANSLATION_VAL               ,_param->_nb_inst_retire,1);
         DELETE1_SIGNAL( in_RETIRE_REGISTER_TRANSLATION_ACK               ,_param->_nb_inst_retire,1);
+
+        DELETE2_SIGNAL( in_RETIRE_EVENT_VAL                              ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_ACK                              ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL     ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK     ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL(out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL         ,_param->_nb_front_end,_param->_nb_context[it1],1);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK         ,_param->_nb_front_end,_param->_nb_context[it1],1);
 									 
         DELETE2_SIGNAL( in_SPR_READ_SR                                   ,_param->_nb_front_end,_param->_nb_context[it1],_param->_size_spr);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_genMealy_retire_event_valack.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_genMealy_retire_event_valack.cpp	(revision 122)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/src/Rename_unit_Glue_genMealy_retire_event_valack.cpp	(revision 122)
@@ -0,0 +1,73 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/Rename_unit_Glue/include/Rename_unit_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_ooo_engine {
+namespace ooo_engine {
+namespace rename_unit {
+namespace rename_unit_glue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Rename_unit_Glue::genMealy_retire_event_valack"
+  void Rename_unit_Glue::genMealy_retire_event_valack (void)
+  {
+    log_begin(Rename_unit_Glue,FUNCTION);
+    log_function(Rename_unit_Glue,FUNCTION,_name.c_str());
+
+    for (uint32_t i=0; i<_param->_nb_front_end; i++)
+      for (uint32_t j=0; j<_param->_nb_context[i]; j++)
+        {
+          Tcontrol_t VAL                          = PORT_READ(in_RETIRE_EVENT_VAL                          [i][j]);
+          Tcontrol_t LOAD_STORE_QUEUE_POINTER_ACK = PORT_READ(in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK [i][j]);
+          Tcontrol_t REGISTER_TRANSLATION_ACK     = PORT_READ(in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK     [i][j]);
+          
+          Tcontrol_t ACK                          = (//VAL                            and
+                                                       LOAD_STORE_QUEUE_POINTER_ACK   and
+                                                       REGISTER_TRANSLATION_ACK     
+                                                     );
+          Tcontrol_t LOAD_STORE_QUEUE_POINTER_VAL = (
+                                                       VAL                            and
+                                                     //LOAD_STORE_QUEUE_POINTER_ACK   and
+                                                       REGISTER_TRANSLATION_ACK     
+                                                     );
+          Tcontrol_t REGISTER_TRANSLATION_VAL     = (
+                                                       VAL                            and
+                                                       LOAD_STORE_QUEUE_POINTER_ACK //and
+                                                     //REGISTER_TRANSLATION_ACK     
+                                                     );
+          
+          PORT_WRITE(out_RETIRE_EVENT_ACK                          [i][j], ACK                         );
+          PORT_WRITE(out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL [i][j], LOAD_STORE_QUEUE_POINTER_VAL);
+          PORT_WRITE(out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL     [i][j], REGISTER_TRANSLATION_VAL    );
+          
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"  * retire_event [%d][%d]",i,j);
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * val (commit_unit)            (r) : %d",VAL                         );
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * ack (commit_unit)            (w) : %d",ACK                         );
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * register_translation_val     (w) : %d",REGISTER_TRANSLATION_VAL    );
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * register_translation_ack     (r) : %d",REGISTER_TRANSLATION_ACK    );
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * load_store_queue_pointer_val (w) : %d",LOAD_STORE_QUEUE_POINTER_VAL);
+          log_printf(TRACE,Rename_unit_Glue,FUNCTION,"    * load_store_queue_pointer_ack (r) : %d",LOAD_STORE_QUEUE_POINTER_ACK);
+        }
+    
+    log_end(Rename_unit_Glue,FUNCTION);
+  };
+  
+}; // end namespace rename_unit_glue
+}; // end namespace rename_unit
+}; // end namespace ooo_engine
+}; // end namespace multi_ooo_engine
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/include/Rename_unit.h	(revision 122)
@@ -114,4 +114,6 @@
   public    : SC_OUT(Tgeneral_data_t   )   ** out_INSERT_IMMEDIAT             ;//[nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_INSERT_STORE_QUEUE_PTR_WRITE;//[nb_inst_insert]
+  public    : SC_OUT(Tlsq_ptr_t        )   ** out_INSERT_STORE_QUEUE_PTR_READ ;//[nb_inst_insert]
+  public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_STORE_QUEUE_EMPTY    ;//[nb_inst_insert]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_INSERT_LOAD_QUEUE_PTR_WRITE ;//[nb_inst_insert]
   public    : SC_OUT(Tcontrol_t        )   ** out_INSERT_READ_RA              ;//[nb_inst_insert]
@@ -171,4 +173,6 @@
   public    : SC_OUT(Tcontrol_t        )  *** out_RETIRE_EVENT_ACK            ;//[nb_front_end][nb_context]
   public    : SC_IN (Tevent_state_t    )  ***  in_RETIRE_EVENT_STATE          ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_FLUSH          ;//[nb_front_end][nb_context]
+  public    : SC_IN (Tcontrol_t        )  ***  in_RETIRE_EVENT_STOP           ;//[nb_front_end][nb_context]
 
     // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_allocation.cpp	(revision 122)
@@ -111,4 +111,6 @@
       ALLOC1_SIGNAL_OUT(out_INSERT_IMMEDIAT             ,"immediat"             ,Tgeneral_data_t   ,_param->_size_general_data          );
       ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_WRITE,"store_queue_ptr_write",Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
+      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_PTR_READ ,"store_queue_ptr_read" ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr       );
+      ALLOC1_SIGNAL_OUT(out_INSERT_STORE_QUEUE_EMPTY    ,"store_queue_empty"    ,Tcontrol_t        ,1                                   );
       ALLOC1_SIGNAL_OUT(out_INSERT_LOAD_QUEUE_PTR_WRITE ,"load_queue_ptr_write" ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr        );
       ALLOC1_SIGNAL_OUT(out_INSERT_EXCEPTION_USE        ,"exception_use"        ,Texception_t      ,_param->_size_exception_use         );
@@ -180,4 +182,6 @@
       _ALLOC2_VALACK_OUT(out_RETIRE_EVENT_ACK           ,ACK,_param->_nb_front_end, _param->_nb_context[it1]);
       _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STATE         ,"state"                ,Tevent_state_t    ,_param->_size_event_state, _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_FLUSH         ,"flush"                ,Tcontrol_t        ,1                        , _param->_nb_front_end, _param->_nb_context[it1]);
+      _ALLOC2_SIGNAL_IN ( in_RETIRE_EVENT_STOP          ,"stop"                 ,Tcontrol_t        ,1                        , _param->_nb_front_end, _param->_nb_context[it1]);
 
       ALLOC2_INTERFACE_END(_param->_nb_front_end, _param->_nb_context[it1]);
@@ -452,6 +456,8 @@
                                        dest,"retire_event_"+toString(i)+"_"+toString(j));
 #endif     
-	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
-                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
+	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH",
+                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_FLUSH");
+	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP",
+                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STOP");
           }
     }
@@ -637,5 +643,5 @@
         for (uint32_t j=0; j<_param->_nb_context[i]; j++)
           {
-            dest = _name;
+            dest = _name+"_glue";
             
 #ifdef POSITION
@@ -643,8 +649,15 @@
                                        dest,"retire_event_"+toString(i)+"_"+toString(j));
 #endif     
-            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  ,
-                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL"  );
-	    PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  ,
-                                dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK"  );
+            COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+                     "_VAL"  ,
+                                     dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_VAL"  );
+	    COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+                     "_ACK"  ,
+                                     dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_REGISTER_TRANSLATION_ACK"  );
+
+            dest = _name;
+
+#ifdef POSITION
+            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
+                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
+#endif     
 	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
                                 dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
@@ -680,4 +693,8 @@
 	  PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
 		              dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
+	  PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" ,
+		              dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_PTR_READ" );
+	  PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY"    ,
+		              dest,"out_INSERT_"+toString(i)+"_STORE_QUEUE_EMPTY"    );
 	  if (_param->_have_port_load_queue_ptr)
 	  PORT_MAP(_component,src ,"out_INSERT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
@@ -746,4 +763,28 @@
 	  //// in_RETIRE_OPERATION    - glue
 	}
+
+      for (uint32_t i=0; i<_param->_nb_front_end; i++)
+        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
+          {
+            dest = _name+"_glue";
+           
+#ifdef POSITION
+            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
+                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
+#endif     
+            COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+                         "_VAL"  ,
+                                     dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_VAL"  );
+	    COMPONENT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+                         "_ACK"  ,
+                                     dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_LOAD_STORE_QUEUE_POINTER_ACK"  );
+
+            dest = _name;
+            
+#ifdef POSITION
+            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
+                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
+#endif     
+	    PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE",
+                                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_STATE");
+          }
     }
 
@@ -844,4 +885,26 @@
 
       for (uint32_t i=0; i<_param->_nb_front_end; i++)
+        for (uint32_t j=0; j<_param->_nb_context[i]; j++)
+          {
+            dest = _name;
+            
+#ifdef POSITION
+            _component->interface_map (src ,"retire_event_"+toString(i)+"_"+toString(j),
+                                       dest,"retire_event_"+toString(i)+"_"+toString(j));
+#endif      
+            
+            PORT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL",
+		                dest, "in_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_VAL");
+            PORT_MAP(_component,src ,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK",
+		                dest,"out_RETIRE_EVENT_"+toString(i)+"_"+toString(j)+"_ACK");
+
+            //   out_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_VAL          - load_store_pointer_unit
+            //    in_RETIRE_EVENT_LOAD_STORE_QUEUE_POINTER_ACK          - load_store_pointer_unit
+            //   out_RETIRE_EVENT_REGISTER_TRANSLATION_VAL              - register_translation_unit
+            //    in_RETIRE_EVENT_REGISTER_TRANSLATION_ACK              - register_translation_unit
+          }
+
+
+      for (uint32_t i=0; i<_param->_nb_front_end; i++)
 	for (uint32_t j=0; j<_param->_nb_context[i]; j++)
 	  {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Rename_unit/src/Rename_unit_deallocation.cpp	(revision 122)
@@ -72,4 +72,6 @@
         DELETE1_SIGNAL(out_INSERT_IMMEDIAT             ,_param->_nb_inst_insert,_param->_size_general_data          );
         DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_PTR_WRITE,_param->_nb_inst_insert,_param->_size_store_queue_ptr       );
+        DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_PTR_READ ,_param->_nb_inst_insert,_param->_size_store_queue_ptr       );
+        DELETE1_SIGNAL(out_INSERT_STORE_QUEUE_EMPTY    ,_param->_nb_inst_insert,1                                   );
         DELETE1_SIGNAL(out_INSERT_LOAD_QUEUE_PTR_WRITE ,_param->_nb_inst_insert,_param->_size_load_queue_ptr        );
         DELETE1_SIGNAL(out_INSERT_EXCEPTION_USE        ,_param->_nb_inst_insert,_param->_size_exception_use         );
@@ -127,4 +129,6 @@
         DELETE2_SIGNAL(out_RETIRE_EVENT_ACK            ,_param->_nb_front_end, _param->_nb_context[it1],1);
         DELETE2_SIGNAL( in_RETIRE_EVENT_STATE          ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_event_state);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_FLUSH          ,_param->_nb_front_end, _param->_nb_context[it1],1);
+        DELETE2_SIGNAL( in_RETIRE_EVENT_STOP           ,_param->_nb_front_end, _param->_nb_context[it1],1);
         
         DELETE2_SIGNAL(in_SPR_READ_SR                  ,_param->_nb_front_end, _param->_nb_context[it1],_param->_size_spr);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/include/OOO_Engine.h	(revision 122)
@@ -105,4 +105,6 @@
   public    : SC_OUT(Toperation_t      )   ** out_ISSUE_OPERATION                  ;//[nb_inst_issue]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_STORE_QUEUE_PTR_WRITE      ;//[nb_inst_issue]
+  public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_STORE_QUEUE_PTR_READ       ;//[nb_inst_issue]
+  public    : SC_OUT(Tcontrol_t        )   ** out_ISSUE_STORE_QUEUE_EMPTY          ;//[nb_inst_issue]
   public    : SC_OUT(Tlsq_ptr_t        )   ** out_ISSUE_LOAD_QUEUE_PTR_WRITE       ;//[nb_inst_issue]
   public    : SC_OUT(Tcontrol_t        )   ** out_ISSUE_HAS_IMMEDIAT               ;//[nb_inst_issue]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_allocation.cpp	(revision 122)
@@ -100,4 +100,6 @@
       ALLOC1_SIGNAL_OUT (out_ISSUE_OPERATION                  ,"OPERATION"                 ,Toperation_t      ,_param->_size_operation              );
       ALLOC1_SIGNAL_OUT (out_ISSUE_STORE_QUEUE_PTR_WRITE      ,"STORE_QUEUE_PTR_WRITE"     ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr        );
+      ALLOC1_SIGNAL_OUT (out_ISSUE_STORE_QUEUE_PTR_READ       ,"STORE_QUEUE_PTR_READ"      ,Tlsq_ptr_t        ,_param->_size_store_queue_ptr        );
+      ALLOC1_SIGNAL_OUT (out_ISSUE_STORE_QUEUE_EMPTY          ,"STORE_QUEUE_EMPTY"         ,Tcontrol_t        ,1                                    );
       ALLOC1_SIGNAL_OUT (out_ISSUE_LOAD_QUEUE_PTR_WRITE       ,"LOAD_QUEUE_PTR_WRITE"      ,Tlsq_ptr_t        ,_param->_size_load_queue_ptr         );
       ALLOC1_SIGNAL_OUT (out_ISSUE_HAS_IMMEDIAT               ,"HAS_IMMEDIAT"              ,Tcontrol_t        ,1                                    );
@@ -561,4 +563,8 @@
             COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_STORE_QUEUE_PTR_WRITE",
                                      dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_STORE_QUEUE_PTR_WRITE");
+            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_STORE_QUEUE_PTR_READ" ,
+                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_STORE_QUEUE_PTR_READ" );
+            COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_STORE_QUEUE_EMPTY"    ,
+                                     dest, "in_INSERT_"+toString(i)+"_"+toString(j)+"_RENAME_UNIT_STORE_QUEUE_EMPTY"    );
             if (_param->_have_port_load_queue_ptr)
             COMPONENT_MAP(_component,src ,"out_INSERT_"+toString(j)+                            "_LOAD_QUEUE_PTR_WRITE" ,
@@ -655,5 +661,5 @@
           }
 
-        // ~~~~~[ Interface : "spr_read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+        // ~~~~~[ Interface : "retire_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         {
           std::vector<uint32_t>::iterator it = _param->_link_front_end_with_rename_unit[i].begin();
@@ -676,4 +682,8 @@
                     COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_STATE",
                                              dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_STATE");
+                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_FLUSH",
+                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_FLUSH");
+                    COMPONENT_MAP(_component,src , "in_RETIRE_EVENT_"+toString(x)+"_"+toString(k)+"_STOP",
+                                             dest,"out_RETIRE_EVENT_"+toString(j)+"_"+toString(k)+"_STOP");
                   }
                 x++;
@@ -850,5 +860,4 @@
             //  out_RETIRE_NUM_REG_RE_PHY_OLD        - component_rename_unit
             //  out_RETIRE_NUM_REG_RE_PHY_NEW        - component_rename_unit
-            //  out_RETIRE_EVENT_STATE               - component_rename_unit
     
             //  out_RETIRE_CONTEXT_ID                - component_rename_unit
@@ -872,4 +881,6 @@
         //  in_RETIRE_ACK         - rename_unit. in_RETIRE_ACK        
         // out_RETIRE_EVENT_STATE - rename_unit.out_RETIRE_EVENT_STATE
+        // out_RETIRE_EVENT_FLUSH - rename_unit.out_RETIRE_EVENT_FLUSH
+        // out_RETIRE_EVENT_STOP  - rename_unit.out_RETIRE_EVENT_STOP
   
 
@@ -1150,4 +1161,8 @@
             COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_WRITE",
                                      dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_STORE_QUEUE_PTR_WRITE");
+            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_PTR_READ" ,
+                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_STORE_QUEUE_PTR_READ" );
+            COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_STORE_QUEUE_EMPTY"    ,
+                                     dest,"out_INSERT_"  +toString(i)+"_"+toString(j)+"_ISSUE_QUEUE_STORE_QUEUE_EMPTY"    );
             if (_param->_have_port_load_queue_ptr)
             COMPONENT_MAP(_component,src , "in_ISSUE_IN_"+toString(i)+"_"+toString(j)+            "_LOAD_QUEUE_PTR_WRITE" ,
@@ -1212,4 +1227,8 @@
           COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
                                    dest,"out_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_WRITE");
+          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_READ" ,
+                                   dest,"out_REEXECUTE_"+toString(i)+"_STORE_QUEUE_PTR_READ" );
+          COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_STORE_QUEUE_EMPTY"    ,
+                                   dest,"out_REEXECUTE_"+toString(i)+"_STORE_QUEUE_EMPTY"    );
           if (_param->_have_port_load_queue_ptr)
           COMPONENT_MAP(_component,src , "in_REEXECUTE_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
@@ -1270,4 +1289,8 @@
           PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_STORE_QUEUE_PTR_WRITE",
                               dest,"out_ISSUE_"    +toString(i)+"_STORE_QUEUE_PTR_WRITE");
+          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_STORE_QUEUE_PTR_READ" ,
+                              dest,"out_ISSUE_"    +toString(i)+"_STORE_QUEUE_PTR_READ" );
+          PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_STORE_QUEUE_EMPTY"    ,
+                              dest,"out_ISSUE_"    +toString(i)+"_STORE_QUEUE_EMPTY"    );
           if (_param->_have_port_load_queue_ptr)
           PORT_MAP(_component,src ,"out_ISSUE_OUT_"+toString(i)+"_LOAD_QUEUE_PTR_WRITE" ,
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp	(revision 121)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/src/OOO_Engine_deallocation.cpp	(revision 122)
@@ -63,4 +63,6 @@
         DELETE1_SIGNAL(out_ISSUE_OPERATION                  ,_param->_nb_inst_issue,_param->_size_operation              );
         DELETE1_SIGNAL(out_ISSUE_STORE_QUEUE_PTR_WRITE      ,_param->_nb_inst_issue,_param->_size_store_queue_ptr        );
+        DELETE1_SIGNAL(out_ISSUE_STORE_QUEUE_PTR_READ       ,_param->_nb_inst_issue,_param->_size_store_queue_ptr        );
+        DELETE1_SIGNAL(out_ISSUE_STORE_QUEUE_EMPTY          ,_param->_nb_inst_issue,1                                    );
         DELETE1_SIGNAL(out_ISSUE_LOAD_QUEUE_PTR_WRITE       ,_param->_nb_inst_issue,_param->_size_load_queue_ptr         );
         DELETE1_SIGNAL(out_ISSUE_HAS_IMMEDIAT               ,_param->_nb_inst_issue,1                                    );
