Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 119)
@@ -120,4 +120,5 @@
   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST_VAL,"out_BRANCH_EVENT_ADDRESS_DEST_VAL",Tcontrol_t         ,_param->_nb_context);
   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,"out_BRANCH_EVENT_ADDRESS_DEST   ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CAN_CONTINUE   ,"out_BRANCH_EVENT_CAN_CONTINUE"   ,Tcontrol_t         ,_param->_nb_context);
 
   ALLOC1_SC_SIGNAL(out_UPDATE_VAL                     ,"out_UPDATE_VAL                     ",Tcontrol_t         ,_param->_nb_inst_update);
@@ -216,4 +217,5 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST_VAL,_param->_nb_context);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_CAN_CONTINUE   ,_param->_nb_context);
 
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_VAL                     ,_param->_nb_inst_update);
@@ -948,4 +950,5 @@
                     if (event.take)
                     TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
+                    TEST(Taddress_t,out_BRANCH_EVENT_CAN_CONTINUE     [port]->read(),not event.miss_commit);
 
                     event.address_src  = 0;
@@ -1392,4 +1395,5 @@
                     if (event.take)
                     TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
+                    TEST(Taddress_t,out_BRANCH_EVENT_CAN_CONTINUE     [port]->read(),not event.miss_commit);
 
                     event.address_src  = 0;
@@ -2022,4 +2026,5 @@
                       if (event.take_good)
                       TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
+                      TEST(Taddress_t,out_BRANCH_EVENT_CAN_CONTINUE     [port]->read(),not event.miss_commit);
                       
                       event.address_src  = 0;
@@ -2681,5 +2686,6 @@
                       if (event.take_good)
                       TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_DEST     [port]->read(),event.address_good);
-                      
+                      TEST(Taddress_t,out_BRANCH_EVENT_CAN_CONTINUE     [port]->read(),not event.miss_commit);
+
                       event.address_src  = 0;
                       event.take         = 0;
@@ -2860,4 +2866,5 @@
   delete [] out_BRANCH_EVENT_ADDRESS_DEST_VAL;
   delete [] out_BRANCH_EVENT_ADDRESS_DEST   ;
+  delete [] out_BRANCH_EVENT_CAN_CONTINUE   ;
   
   // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 119)
@@ -72,4 +72,5 @@
   public : Tptr_t              _index_ras        ;
 //public : Tcontrol_t          _ifetch_prediction;
+//public : Tcontrol_t          _miss_commit      ;
   };
 
@@ -87,4 +88,5 @@
   public : Tptr_t              _index_ras        ;
   public : Tcontrol_t          _ifetch_prediction; // not in ufpt
+  public : Tcontrol_t          _miss_commit      ; // not in ufpt
 
     // to branchement_log_file
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 119)
@@ -125,4 +125,5 @@
   public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST_VAL  ; //[nb_context]
   public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST      ; //[nb_context]
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_CAN_CONTINUE      ; //[nb_context]
 
     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -193,4 +194,5 @@
   private   : Tcontrol_t                    * reg_EVENT_ADDRESS_DEST_VAL         ; //[nb_context] // if miss ifetch, decod issue branch, dest must be reload
   private   : Taddress_t                    * reg_EVENT_ADDRESS_DEST             ; //[nb_context] // Address dest
+  private   : bool                          * reg_EVENT_CAN_CONTINUE             ; //[nb_context]
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 119)
@@ -129,4 +129,5 @@
       ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST_VAL ,"address_dest_val",Tcontrol_t,1);
       ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST     ,"address_dest"    ,Taddress_t,_param->_size_instruction_address);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CAN_CONTINUE     ,"can_continue"    ,Tcontrol_t,1);
 
       ALLOC1_INTERFACE_END(_param->_nb_context);
@@ -232,4 +233,5 @@
     ALLOC1(reg_EVENT_ADDRESS_DEST_VAL       ,Tcontrol_t    ,_param->_nb_context);
     ALLOC1(reg_EVENT_ADDRESS_DEST           ,Taddress_t    ,_param->_nb_context);
+    ALLOC1(reg_EVENT_CAN_CONTINUE           ,Tcontrol_t    ,_param->_nb_context);
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 119)
@@ -81,4 +81,5 @@
         DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST_VAL ,_param->_nb_context,1);
         DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST     ,_param->_nb_context,_param->_size_instruction_address);
+        DELETE1_SIGNAL(out_BRANCH_EVENT_CAN_CONTINUE     ,_param->_nb_context,1);
 
         // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -160,4 +161,5 @@
         DELETE1(reg_EVENT_ADDRESS_DEST_VAL       ,_param->_nb_context);
         DELETE1(reg_EVENT_ADDRESS_DEST           ,_param->_nb_context);
+        DELETE1(reg_EVENT_CAN_CONTINUE           ,_param->_nb_context);
        }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 119)
@@ -287,5 +287,6 @@
         PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST_VAL [i],reg_EVENT_ADDRESS_DEST_VAL [i]);
         PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST     [i],reg_EVENT_ADDRESS_DEST     [i]);
-
+        PORT_WRITE(out_BRANCH_EVENT_CAN_CONTINUE     [i],reg_EVENT_CAN_CONTINUE     [i]);
+        
 	internal_BRANCH_EVENT_VAL [i] = val;
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 117)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 119)
@@ -249,5 +249,5 @@
               Taddress_t          address_src   = PORT_READ(in_DECOD_BTB_ADDRESS_SRC  [i]);
               Taddress_t          address_dest  = PORT_READ(in_DECOD_BTB_ADDRESS_DEST [i]);
-              Tcontrol_t          last_take     = PORT_READ(in_DECOD_BTB_LAST_TAKE    [i]);
+              Tcontrol_t          direction     = PORT_READ(in_DECOD_BTB_LAST_TAKE    [i]);
 
               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * DECOD[%d] - Accepted",i);
@@ -259,39 +259,61 @@
               if (miss_ifetch or miss_decod)
 		{
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss !!!");
+
                   // Have a miss !!!
+                  condition   = PORT_READ(in_DECOD_BTB_CONDITION [i]);
+                  is_accurate = PORT_READ(in_DECOD_IS_ACCURATE   [i]);
+
+                  // if can_continue else don't wait the end of all instruction
+                  // can_continue = not miss_commit and the destination is accurate (know)
+                  Tcontrol_t can_continue = is_accurate;
+
 #ifdef DEBUG_TEST
                   if (reg_EVENT_STATE [context] != EVENT_STATE_OK)
                     throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state."));
 #endif
-                  if (reg_UFPT_NB_NEED_UPDATE [context] == 0)
+
+                  // miss_ifetch = branch is previously predict, but it's not the good
+                  //   * need flush ufpt
+                  // miss_decod  = branch was not detected
+                  //   * not necessary
+
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * can_continue: %d",can_continue);
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * direction   : %d",direction   );
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss_ifetch : %d",miss_ifetch );
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * change    : %d",(not (can_continue and not direction and not miss_ifetch)));
+
+                  // if can_continue (destination is know) and direction is not take, don't need flush fetch_unit.
+                  if (not (can_continue and not direction and not miss_ifetch))
                     {
-                      // Change state
-                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_UPDATE_CONTEXT (decod - miss - no flush ufpt)",context);
-                      reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
-//                       reg_EVENT_SOURCE[context] = EVENT_SOURCE_UFPT;
+                      if (reg_UFPT_NB_NEED_UPDATE [context] == 0)
+                        {
+                          // Change state
+                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_UPDATE_CONTEXT (decod - miss - no flush ufpt)",context);
+                          reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
+//                        reg_EVENT_SOURCE[context] = EVENT_SOURCE_UFPT;
+                        }
+                      else
+                        {
+                          log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT (decod - miss - flush ufpt)",context);
+                          reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT;
+                        }
+
+                      // Flush UPFT
+                      flush_UFPT [context] = true;
+
+                      reg_EVENT_IS_BRANCH       [context] = true;
+                      reg_EVENT_DEPTH           [context] = upt_ptr_write;
+                      reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
+                      reg_EVENT_ADDRESS_DEST_VAL[context] = direction;
+                      reg_EVENT_ADDRESS_DEST    [context] = address_dest;
+                      reg_EVENT_CAN_CONTINUE    [context] = can_continue;
                     }
-                  else
-                    {
-                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_MISS_FLUSH_UFPT (decod - miss - flush ufpt)",context);
-                      reg_EVENT_STATE [context] = EVENT_STATE_MISS_FLUSH_UFPT;
-                    }
-
-                  // Flush UPFT
-                  flush_UFPT [context] = true;
-
-                  reg_EVENT_IS_BRANCH       [context] = true;
-                  reg_EVENT_DEPTH           [context] = upt_ptr_write;
-                  reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
-                  reg_EVENT_ADDRESS_DEST_VAL[context] = last_take;
-                  reg_EVENT_ADDRESS_DEST    [context] = address_dest;
-
+                  
                   // Push upt (from decod interface)
-                  condition   = PORT_READ(in_DECOD_BTB_CONDITION [i]);
-                  is_accurate = PORT_READ(in_DECOD_IS_ACCURATE   [i]);
-
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._condition         = condition;
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_src       = address_src ;
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_dest      = address_dest;
-                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._last_take         = last_take   ;
+                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._last_take         = direction   ;
 //                reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._good_take;
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._is_accurate       = is_accurate;
@@ -336,5 +358,4 @@
                       reg_UFPT_NB_NEED_UPDATE [context] --;
                       log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UFPT_NB_NEED_UPDATE (after) : %d",reg_UFPT_NB_NEED_UPDATE [context]);
-
                     }
 		}
@@ -349,5 +370,6 @@
               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_WAIT_END (decod - hit)",context,upt_ptr_write);
               reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._state = UPDATE_PREDICTION_STATE_WAIT_END;
-              reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._retire_ok = false;
+              reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._retire_ok   = false;
+              reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._miss_commit = false;
 
               // Write new accurate 
@@ -356,4 +378,7 @@
                 throw ERRORMORPHEO(FUNCTION,_("Decod : invalid accurate flag."));
 #endif
+
+              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * is_accurate : %d",is_accurate);
+
               reg_IS_ACCURATE [context] = is_accurate;
               
@@ -728,5 +753,8 @@
                       reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
                       reg_EVENT_ADDRESS_DEST    [context] = good_addr;
+                      reg_EVENT_CAN_CONTINUE    [context] = false;
+
                     }
+                  reg_UPDATE_PREDICTION_TABLE [context][depth]._miss_commit = true;
                 }
 	      else
@@ -770,9 +798,8 @@
 
               // if different : an other branch is occured
-              if (reg_EVENT_STATE [i] == EVENT_STATE_UPDATE_CONTEXT)
+              if (reg_EVENT_STATE        [i] == EVENT_STATE_UPDATE_CONTEXT)
                 {
                   // Change state
                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_WAIT_END_EVENT (branch_event)",i);
-                  
                   reg_EVENT_STATE [i] = EVENT_STATE_WAIT_END_EVENT;
                 }
@@ -809,25 +836,28 @@
                   {
                     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * type  : EVENT_TYPE_BRANCH_MISS_SPECULATION");
+
+// #ifdef DEBUG_TEST
+//                     if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
+//                       throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
+// #endif
+                    // Special case : test if event and branch_complete !
+                    if (reg_EVENT_STATE [i] == EVENT_STATE_WAIT_END_EVENT)
+                      {
                     
-#ifdef DEBUG_TEST
-                    if (reg_EVENT_STATE [i] != EVENT_STATE_WAIT_END_EVENT)
-                      throw ERRORMORPHEO(FUNCTION,_("Event : invalid event state."));
-#endif
-                    
-                    // Change state
-                    log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
-                    
-                    reg_EVENT_STATE [i] = EVENT_STATE_OK;
-                    reg_IS_ACCURATE [i] = true;
-
-                    Tdepth_t depth = reg_EVENT_UPT_PTR [i];
-
-                    if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_END_KO)
-                      {
-                        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END (event)",i,depth);
+                        // Change state
+                        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (event)",i);
                         
-                        reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END;
-                      }
-
+                        reg_EVENT_STATE [i] = EVENT_STATE_OK;
+                        reg_IS_ACCURATE [i] = true;
+                        
+                        Tdepth_t depth = reg_EVENT_UPT_PTR [i];
+                        
+                        if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_END_KO)
+                          {
+                            log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_END (event)",i,depth);
+                            
+                            reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END;
+                          }
+                        
 #ifdef DEBUG_TEST
 //                     if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state != UPDATE_PREDICTION_STATE_END_KO_WAIT_END)
@@ -840,5 +870,5 @@
                     
 //                     reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_END_KO;
-                    
+                      }
                     break;
                   }
@@ -1191,4 +1221,5 @@
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST_VAL: %d"  ,reg_EVENT_ADDRESS_DEST_VAL[i]);
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_DEST    : %.8x (%.8x)",reg_EVENT_ADDRESS_DEST    [i],reg_EVENT_ADDRESS_DEST    [i]<<2);
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_CAN_CONTINUE    : %d"  ,reg_EVENT_CAN_CONTINUE    [i]);
 
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update_Fetch_Prediction_Table   [%d]",i);
