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 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 94)
@@ -45,8 +45,7 @@
             reg_UPT_TOP              [i] = 0;
             reg_UPT_UPDATE           [i] = 0;
-            reg_UPT_NB_NEED_UPDATE   [i] = 0;
                                                                                     
             reg_IS_ACCURATE          [i] = true;
-
+            
             reg_EVENT_STATE          [i] = EVENT_STATE_OK;
           }
@@ -54,4 +53,8 @@
     else
       {
+        bool flush_UFPT [_param->_nb_context];
+	for (uint32_t i=0; i<_param->_nb_context; i++)
+          flush_UFPT [i] = false;
+
 	// ===================================================================
 	// =====[ GARBAGE COLLECTOR ]=========================================
@@ -166,4 +169,7 @@
               Tbranch_condition_t condition  ;
               Tcontrol_t          is_accurate;
+              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]);
 
               log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * DECOD[%d] - Accepted",i);
@@ -176,31 +182,27 @@
 		{
                   // Have a miss !!!
+#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)
+                    {
+                      // 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;
+                    }
+                  else
+                    {
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT (decod - miss - flush ufpt)",context);
+                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT;
+                    }
 
                   // Flush UPFT
-
-                  // It's to accelerate miss speculation
-                  if (reg_UFPT_NB_NEED_UPDATE [context] == 0)
-                    {
-                      // No entry need prediction, flush all entry -> Reset
-                      for (uint32_t j=0; j<_param->_size_ufpt_queue[context]; ++j)
-                        reg_UPDATE_FETCH_PREDICTION_TABLE [context][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
-                      reg_UFPT_BOTTOM [context] = 0;
-                      reg_UFPT_TOP    [context] = 0;
-//                    reg_UFPT_UPDATE [context] = 0;
-                    }
-                  else
-                    {
-                      reg_UFPT_UPDATE [context] = reg_UFPT_TOP [context];
-
-#ifdef DEBUG_TEST
-                      if (reg_EVENT_STATE [context] == EVENT_STATE_OK)
-                        throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state."));
-#endif
-                      
-                      // Change state
-                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT (decod - miss)",context);
-                      
-                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT;
-                    }
+                  flush_UFPT [context] = true;
+
+                  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)
@@ -209,7 +211,7 @@
 
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._condition         = condition;
-                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_src       = PORT_READ(in_DECOD_BTB_ADDRESS_SRC  [i]);
-                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._address_dest      = PORT_READ(in_DECOD_BTB_ADDRESS_DEST [i]);
-                  reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._last_take         = PORT_READ(in_DECOD_BTB_LAST_TAKE    [i]);
+                  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]._good_take;
                   reg_UPDATE_PREDICTION_TABLE [context][upt_ptr_write]._is_accurate       = is_accurate;
@@ -277,8 +279,4 @@
               reg_UPT_TOP     [context] = (upt_ptr_write+1)%_param->_size_upt_queue [context];
 //            reg_UPT_UPDATE  [context] = reg_UPT_TOP [context];
-              if (need_update(condition))
-                {
-                  reg_UPT_NB_NEED_UPDATE  [context] ++;
-                }
 	    }
 
@@ -296,56 +294,59 @@
 	      Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
 	      Tdepth_t   depth   = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
+              Tcontrol_t miss      = internal_BRANCH_COMPLETE_MISS_PREDICTION [i];
+              Tcontrol_t good_take = internal_BRANCH_COMPLETE_TAKE            [i];
+              Taddress_t good_addr = internal_BRANCH_COMPLETE_ADDRESS_DEST    [i];
 
 	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * BRANCH_COMPLETE[%d] - Accepted",i);
 	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context : %d",context);
 	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth   : %d",depth);
-	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss    : %d",internal_BRANCH_COMPLETE_MISS_PREDICTION [i]);
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * miss    : %d",miss);
 	      
-	      if (internal_BRANCH_COMPLETE_MISS_PREDICTION [i])
+              if (miss)
 		{
-		  // Miss case
-// //                breakpoint("Branch_complete and miss ...");
-
-//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_EVENT (branch_complete)",context,depth);
-// 		  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
-
-// 		  // Another prediction (prediction with depth higer)
-// 		  Tdepth_t top                = reg_TOP [context];
-// 		  uint32_t nb_elt_miss        = ((top> depth)?top:(top+_param->_size_queue[context]))-depth;
-// 		  uint32_t nb_elt_need_update = 1;
-// 		  for (uint32_t j=1; j<nb_elt_miss; j++)
-// 		    {
-// 		      uint32_t k=(depth+j)%_param->_size_queue[context];
-		      
-// 		      // Ifetch have make a prediction and it's a miss
-// 		      // When ifetch predict :
-// 		      //   * btb is not change       -> needn't update
-// 		      //   * direction is not change -> needn't update
-// 		      //   * ras have change         -> need    update
-
-// 		      Tbranch_condition_t cond = reg_UPDATE_PREDICTION_TABLE [context][k]._condition;
-// 		      if ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
-// 			  (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
-// 			  (cond == BRANCH_CONDITION_READ_STACK))
-// 			{
-//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch miss, update ras)",context,k);
-
-// 			  nb_elt_need_update ++;
-// 			  reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_KO;
-// 			}
-// 		      else
-// 			{
-//                           log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_END (branch_complete, ifetch miss, don't update ras)",context,k);
-
-// 			  reg_UPDATE_PREDICTION_TABLE [context][k]._state = UPDATE_PREDICTION_STATE_END;
-// 			}
-// 		    }
-// 		  reg_NB_ELT_NEED_UPDATE [context] += nb_elt_need_update;
-
-// 		  // Update pointer :
-// 		  reg_TOP                [context]  = depth;
-// 		  reg_NB_ELT             [context] -= nb_elt_miss;
-// 	      reg_UPDATE_PREDICTION_TABLE [context][depth]._address_dest = internal_BRANCH_COMPLETE_ADDRESS_DEST [i];
-
+                  // Have a miss !!!
+                  // Flush UPFT
+                  flush_UFPT [context] = true;
+                  
+                  // Flush UPT
+                  uint32_t top        = reg_UPT_TOP [context];
+                  uint32_t new_update = ((top==0)?_param->_size_upt_queue[context]:top)-1; 
+                  for (uint32_t j=(depth+1)%_param->_size_upt_queue[context];
+                                j!=top; 
+                                j=(j+1)%_param->_size_upt_queue[context])
+                    reg_UPDATE_PREDICTION_TABLE [context][j]._state = UPDATE_PREDICTION_STATE_EVENT;
+                  
+                  // TOP is next write slot : last slot is TOP-1
+                  reg_UPT_UPDATE [context] = new_update;
+                  
+//                reg_UPT_BOTTOM [context];
+                  reg_UPT_TOP    [context] = depth;
+
+#ifdef DEBUG_TEST
+                  if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_WAIT_END)
+                    throw ERRORMORPHEO(FUNCTION,_("Branch complete : invalid upt state."));
+#endif
+                  
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * UPT  [%d][%d].state <- UPDATE_PREDICTION_STATE_KO (branch_complete, ifetch hit)",context,depth);
+                  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;
+                  
+
+                  Taddress_t          address_src = reg_UPDATE_PREDICTION_TABLE [context][depth]._address_src;
+
+                  if (reg_UFPT_NB_NEED_UPDATE [context] > 0)
+                    {
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT_AND_UPT (branch_complete - miss)",context);
+                      reg_EVENT_STATE [context] = EVENT_STATE_FLUSH_UFPT_AND_UPT;
+                    }
+                  else
+                    {
+                      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_FLUSH_UFPT_RAS (branch_complete - miss)",context);
+                      // have ras prediction ?
+                      reg_EVENT_STATE [context] = (new_update!=depth)?EVENT_STATE_FLUSH_UPT_RAS:EVENT_STATE_UPDATE_CONTEXT;
+                    }
+
+                  reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
+                  reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
+                  reg_EVENT_ADDRESS_DEST    [context] = good_addr;
 		}
 	      else
@@ -363,5 +364,5 @@
 
 	      // In all case : update good_take
-	      reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take = internal_BRANCH_COMPLETE_TAKE [i];
+	      reg_UPDATE_PREDICTION_TABLE [context][depth]._good_take = good_take;
             }
 
@@ -381,4 +382,14 @@
               if (internal_UPDATE_FROM_UFPT [i])
                 {
+                // if free a slot, also all queue is updated
+                // Last slot ?
+                if (reg_UFPT_UPDATE [context] == reg_UFPT_BOTTOM [context])
+                  switch (reg_EVENT_STATE [context])
+                    {
+                    case EVENT_STATE_FLUSH_UFPT         : reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT; break;
+                    case EVENT_STATE_FLUSH_UFPT_AND_UPT : reg_EVENT_STATE [context] = (reg_UPT_UPDATE[context]!=reg_UPT_TOP[context])?EVENT_STATE_FLUSH_UPT_RAS:EVENT_STATE_UPDATE_CONTEXT;  break;
+                    default : break;
+                    }
+                
                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Update Fetch Prediction Table");
                   
@@ -393,7 +404,9 @@
                   reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._state = UPDATE_FETCH_PREDICTION_STATE_END;
 
+
                   // Update pointer
-                  reg_UFPT_UPDATE [context] = (depth==0)?(_param->_size_ufpt_queue[context]-1):(depth-1);
-
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UFPT_UPDATE (before) : %d",reg_UFPT_UPDATE [context]);
+                  reg_UFPT_UPDATE [context] = ((depth==0)?_param->_size_ufpt_queue[context]:depth)-1;
+                  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UFPT_UPDATE (after ) : %d",reg_UFPT_UPDATE [context]);
                   // Free a register that need update ?
                   if (need_update(reg_UPDATE_FETCH_PREDICTION_TABLE [context][depth]._condition))
@@ -405,9 +418,16 @@
                   
                   // Change state
-#ifdef DEBUG_TEST
-                  if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_OK   ) and
-                      (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ) and
-                      (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_EVENT))
-                    throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
+#ifdef DEBUG_TEST 
+                  if (internal_UPDATE_RAS [i])
+                    {
+                      if (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_EVENT)
+                        throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
+                    }
+                  else
+                    {
+                      if ((reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_OK   ) and
+                          (reg_UPDATE_PREDICTION_TABLE [context][depth]._state != UPDATE_PREDICTION_STATE_KO   ))
+                        throw ERRORMORPHEO(FUNCTION,_("Update : invalid upt state."));
+                    }
 #endif
 
@@ -417,15 +437,25 @@
 
                   // Update pointer
+                  bool end_event = (reg_UPT_UPDATE [context] == reg_UPT_TOP [context]);
+
                   if (internal_UPDATE_RAS [i])
-                    reg_UPT_UPDATE [context] = (depth==0)?(_param->_size_upt_queue[context]-1):(depth-1);
+                    {
+                      reg_UPT_UPDATE [context] = (end_event)?reg_UPT_BOTTOM[context]:(((depth==0)?_param->_size_upt_queue[context]:depth)-1);
+                    }
                   else
-                    reg_UPT_UPDATE [context] = (depth+1)%_param->_size_upt_queue[context];
-
-                  // Free a register that need update ?
-                  if (need_update(reg_UPDATE_PREDICTION_TABLE [context][depth]._condition))
-                    reg_UPT_NB_NEED_UPDATE [context] --;
+                    {
+                      reg_UPT_UPDATE [context] = (depth+1)%_param->_size_upt_queue[context];
+                    }
+                  
+                  // End and event ?
+                  if (end_event and
+                      (reg_EVENT_STATE [context] != EVENT_STATE_OK))
+                    {
+                      reg_EVENT_STATE [context] = EVENT_STATE_UPDATE_CONTEXT;
+                    }
+
                   // Free the branch with no accurate ?
                   if (reg_UPDATE_PREDICTION_TABLE [context][depth]._is_accurate == false)
-                    reg_IS_ACCURATE [i] = true;
+                    reg_IS_ACCURATE [context] = true;
                 }
 	    }
@@ -434,30 +464,67 @@
 	reg_UPDATE_PRIORITY = (reg_UPDATE_PRIORITY+1)%_param->_nb_context;
 
-// 	// ===================================================================
-// 	// =====[ BRANCH_EVENT ]==============================================
-// 	// ===================================================================
-// 	for (uint32_t i=0; i<_param->_nb_context; i++)
-// 	  if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i]))
-//             {
-//               Tdepth_t depth = internal_BRANCH_EVENT_DEPTH [i];
-
-//               if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_EVENT)
-//                 {
-//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_KO (branch_event)",i,depth);
-                  
-//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_KO;
-//                 }
-//               else
-//                 {
-// #ifdef DEBUG_TEST
-//                   if (reg_UPDATE_PREDICTION_TABLE [i][depth]._state == UPDATE_PREDICTION_STATE_WAITEND_AND_EVENT)
-//                     throw ERRORMORPHEO(FUNCTION,_("Branche event : invalid state"));
-// #endif
-              
-//                   log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * state [%d][%d] <- UPDATE_PREDICTION_STATE_WAITEND (branch_event)",i,depth);
-                  
-//                   reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_WAITEND;
-//                 }
-//             }
+ 	// ===================================================================
+	// =====[ BRANCH_EVENT ]==============================================
+	// ===================================================================
+	for (uint32_t i=0; i<_param->_nb_context; i++)
+	  if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i]))
+            {
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * UPDATE[%d] - Accepted",i);
+
+#ifdef DEBUG_TEST
+              if (reg_EVENT_STATE [i] != EVENT_STATE_UPDATE_CONTEXT)
+                throw ERRORMORPHEO(FUNCTION,_("Decod : invalid event state."));
+#endif
+              
+              // Change state
+              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * EVENT [%d] <- EVENT_STATE_OK (branch_event)",i);
+              
+              reg_EVENT_STATE [i] = EVENT_STATE_OK;
+            }
+
+ 	// ===================================================================
+	// =====[ FLUSH ]=====================================================
+	// ===================================================================
+
+        for (uint32_t i=0; i<_param->_nb_context; ++i)
+          {
+            if (flush_UFPT [i])
+              {
+                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Flush Update Fetch Prediction Table");
+                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * context                          : %d",i);
+                log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UFPT_NB_NEED_UPDATE          : %d",reg_UFPT_NB_NEED_UPDATE [i]);
+
+              // It's to accelerate miss speculation
+              if (reg_UFPT_NB_NEED_UPDATE [i] == 0)
+                {
+
+                  // No entry need prediction, flush all entry -> Reset
+                  for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
+                    reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EMPTY;
+                  reg_UFPT_BOTTOM [i] = 0;
+                  reg_UFPT_TOP    [i] = 0;
+//                reg_UFPT_UPDATE [i];
+                }
+              else
+                {
+                  for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; ++j)
+                    reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state = UPDATE_FETCH_PREDICTION_STATE_EVENT;
+                  
+                  // TOP is next write slot : last slot is TOP-1
+                  uint32_t top = reg_UFPT_TOP [i];
+                  reg_UFPT_UPDATE [i] = ((top==0)?_param->_size_ufpt_queue[i]:top)-1;
+                  
+//                reg_UFPT_BOTTOM [i];
+//                reg_UFPT_TOP    [i];
+                }
+
+              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_UFPT_UPDATE         (after ) : %d",reg_UFPT_UPDATE [i]);
+
+              }
+          }
+
+ 	// ===================================================================
+	// =====[ PRINT ]=====================================================
+	// ===================================================================
 
 #if (DEBUG >= DEBUG_TRACE)
@@ -468,7 +535,6 @@
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_IS_ACCURATE           : %d",reg_IS_ACCURATE        [i]);
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_STATE           : %s"  ,toString(reg_EVENT_STATE [i]).c_str());
-        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_RAS_CORRUPTED   : %d"  ,reg_EVENT_RAS_CORRUPTED   [i]);
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC     : %.8x",reg_EVENT_ADDRESS_SRC     [i]);
-        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_EVENT_ADDRESS_SRC_VAL : %d"  ,reg_EVENT_ADDRESS_SRC_VAL [i]);
+        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",reg_EVENT_ADDRESS_DEST    [i]);
 
@@ -476,4 +542,5 @@
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_BOTTOM         : %d",reg_UFPT_BOTTOM         [i]);
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_TOP            : %d",reg_UFPT_TOP            [i]);
+	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_UPDATE         : %d",reg_UFPT_UPDATE         [i]);
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_NB_NEED_UPDATE : %d",reg_UFPT_NB_NEED_UPDATE [i]);
 	for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; j++)
@@ -495,5 +562,4 @@
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_TOP             : %d",reg_UPT_TOP            [i]);
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_UPDATE          : %d",reg_UPT_UPDATE         [i]);
-	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_NB_NEED_UPDATE  : %d",reg_UPT_NB_NEED_UPDATE [i]);
 	for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++)
 	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x %.8x, %.1d %.1d %.1d, %.8d %.8x %.4d - %s",
