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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 98)
@@ -27,4 +27,5 @@
   Tcontrol_t          take_good   ;
   Tcontrol_t          flag        ;
+  Tcontrol_t          no_sequence ;
   Tcontrol_t          is_accurate ;
   Thistory_t          history     ;
@@ -104,5 +105,5 @@
   ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ," in_BRANCH_COMPLETE_DEPTH          ",Tdepth_t           ,_param->_nb_inst_branch_complete);
   ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ," in_BRANCH_COMPLETE_ADDRESS        ",Taddress_t         ,_param->_nb_inst_branch_complete);
-  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG           ," in_BRANCH_COMPLETE_FLAG           ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_NO_SEQUENCE    ," in_BRANCH_COMPLETE_NO_SEQUENCE    ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
   ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,"out_BRANCH_COMPLETE_MISS_PREDICTION",Tcontrol_t         ,_param->_nb_inst_branch_complete);
   ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,"out_BRANCH_COMPLETE_TAKE           ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
@@ -112,6 +113,6 @@
   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,"out_BRANCH_EVENT_VAL            ",Tcontrol_t         ,_param->_nb_context);
   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ," in_BRANCH_EVENT_ACK            ",Tcontrol_t         ,_param->_nb_context);
-//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID     ," in_BRANCH_EVENT_CONTEXT_ID     ",Tcontext_t         ,_param->_nb_context);
-//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH          ," in_BRANCH_EVENT_DEPTH          ",Tdepth_t           ,_param->_nb_context);
+//   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,"out_BRANCH_EVENT_CONTEXT_ID     ",Tcontext_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH          ,"out_BRANCH_EVENT_DEPTH          ",Tdepth_t           ,_param->_nb_context);
 //   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,"out_BRANCH_EVENT_MISS_PREDICTION",Tcontrol_t         ,_param->_nb_context);
   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,"out_BRANCH_EVENT_ADDRESS_SRC    ",Taddress_t         ,_param->_nb_context);
@@ -194,5 +195,5 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
-  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_NO_SEQUENCE    ,_param->_nb_inst_branch_complete);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete);
@@ -202,10 +203,9 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL            ,_param->_nb_context);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ACK            ,_param->_nb_context);
-//   if (_param->_have_port_context_id)
-//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
-//   if (_param->_have_port_depth)
-//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
-//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS        ,_param->_nb_context);
-//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
+//if (_param->_have_port_context_id)
+//INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
+  if (_param->_have_port_depth)
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
+//INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST_VAL,_param->_nb_context);
@@ -347,4 +347,5 @@
               request.take_good        = 1;                                              
               request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+              request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
               request.is_accurate      = true;
               request.miss_ifetch      = false;
@@ -486,5 +487,5 @@
 		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
 		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_good);
-		  in_BRANCH_COMPLETE_FLAG       [port]->write(it_upt->flag        );
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
 
                   if (_param->_have_port_depth)
@@ -627,4 +628,5 @@
               request.take_good        = 1;                                              
               request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+              request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
               request.is_accurate      = true;
               request.miss_ifetch      = false;
@@ -704,4 +706,5 @@
           request.take_good        = 0;                                              
           request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+          request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
           request.is_accurate      = true;
           request.miss_ifetch      = false;
@@ -712,4 +715,5 @@
           request.ras_index        = (0x87654321)%_param->_size_ras_index[context];
           request.ufpt_ptr         = ufpt_top [context];
+          request.upt_ptr          = upt_top  [context];
         
           event = request;
@@ -786,5 +790,5 @@
 		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
 		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_good);
-		  in_BRANCH_COMPLETE_FLAG       [port]->write(it_upt->flag        );
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
 
                   if (_param->_have_port_depth)
@@ -910,5 +914,6 @@
                     LABEL("BRANCH_EVENT [%d] - Transaction accepted",port);
                     have_transaction = true;
-              
+
+                    TEST(Tdepth_t  ,out_BRANCH_EVENT_DEPTH            [port]->read(),event.upt_ptr);
                     TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC      [port]->read(),event.address_src);
                     TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take);
@@ -982,4 +987,5 @@
               request.take_good        = 1;                                              
               request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+              request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
               request.is_accurate      = true;
               request.miss_ifetch      = false;
@@ -1059,4 +1065,5 @@
           request.take_good        = 0;                                              
           request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+          request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
           request.is_accurate      = true;
           request.miss_ifetch      = false;
@@ -1067,4 +1074,5 @@
           request.ras_index        = (0x87654321)%_param->_size_ras_index[context];
           request.ufpt_ptr         = ufpt_top [context];
+          request.upt_ptr          = upt_top  [context];
 
           event = request;
@@ -1141,5 +1149,5 @@
 		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
 		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_good);
-		  in_BRANCH_COMPLETE_FLAG       [port]->write(it_upt->flag        );
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
 
                   if (_param->_have_port_depth)
@@ -1345,4 +1353,5 @@
                     have_transaction = true;
               
+                    TEST(Tdepth_t  ,out_BRANCH_EVENT_DEPTH            [port]->read(),event.upt_ptr);
                     TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC      [port]->read(),event.address_src);
                     TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take);
@@ -1415,4 +1424,5 @@
                 request.take_good        = 1;                                              
                 request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
                 request.is_accurate      = true ;
                 request.miss_ifetch      = false;
@@ -1557,4 +1567,5 @@
                 request.take_good        = 1;                                              
                 request.flag             = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.take_good:(not request.take_good);
+                request.no_sequence      = (request.condition == BRANCH_CONDITION_FLAG_SET)?request.flag:not request.flag;
                 request.is_accurate      = true ;
                 request.miss_ifetch      = false;
@@ -1644,4 +1655,5 @@
                 it_event->address_good = it_event->address_dest;
                 it_event->flag         = not it_event->flag;
+                it_event->no_sequence  = not it_event->no_sequence;
                 it_event->take_good    = not it_event->take_good;
               }
@@ -1662,5 +1674,5 @@
 		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_event->upt_ptr     );
 		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_event->address_good);
-		  in_BRANCH_COMPLETE_FLAG       [port]->write(it_event->flag        );
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_event->no_sequence );
 
                   if (_param->_have_port_depth)
@@ -1675,9 +1687,10 @@
 		    {
 		      LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
-                      LABEL("  * CONTEXT_ID %d"  ,it_event->context     );
-                      LABEL("  * DEPTH      %d"  ,it_event->upt_ptr     );
-                      LABEL("  * CONDITION  %d"  ,it_event->condition   );
-                      LABEL("  * ADDRESS    %.8x",it_event->address_good);
-                      LABEL("  * FLAG       %d"  ,it_event->flag        );
+                      LABEL("  * CONTEXT_ID  : %d"  ,it_event->context     );
+                      LABEL("  * DEPTH       : %d"  ,it_event->upt_ptr     );
+                      LABEL("  * CONDITION   : %d"  ,it_event->condition   );
+                      LABEL("  * ADDRESS     : %.8x",it_event->address_good);
+                      LABEL("  * FLAG        : %d"  ,it_event->flag        );
+                      LABEL("  * NO_SEQUENCE : %d"  ,it_event->no_sequence );
 
 		      have_transaction = true;
@@ -1722,5 +1735,5 @@
 		  in_BRANCH_COMPLETE_DEPTH      [port]->write(it_upt->upt_ptr     );
 		  in_BRANCH_COMPLETE_ADDRESS    [port]->write(it_upt->address_dest);
-		  in_BRANCH_COMPLETE_FLAG       [port]->write(it_upt->flag        );
+		  in_BRANCH_COMPLETE_NO_SEQUENCE[port]->write(it_upt->no_sequence );
 
                   if (_param->_have_port_depth)
@@ -1735,9 +1748,10 @@
 		    {
 		      LABEL("BRANCH_COMPLETE [%d] - Transaction accepted",port);
-                      LABEL("  * CONTEXT_ID %d"  ,it_upt->context     );
-                      LABEL("  * DEPTH      %d"  ,it_upt->upt_ptr     );
-                      LABEL("  * CONDITION  %d"  ,it_upt->condition   );
-                      LABEL("  * ADDRESS    %.8x",it_upt->address_dest);
-                      LABEL("  * FLAG       %d"  ,it_upt->flag        );
+                      LABEL("  * CONTEXT_ID  : %d"  ,it_upt->context     );
+                      LABEL("  * DEPTH       : %d"  ,it_upt->upt_ptr     );
+                      LABEL("  * CONDITION   : %d"  ,it_upt->condition   );
+                      LABEL("  * ADDRESS     : %.8x",it_upt->address_dest);
+                      LABEL("  * FLAG        : %d"  ,it_upt->flag        );
+                      LABEL("  * NO_SEQUENCE : %d"  ,it_event->no_sequence );
 
 		      have_transaction = true;
@@ -1953,4 +1967,5 @@
                       LABEL("  * event.take         : %.8x,",event.take        );
                       
+                      TEST(Tdepth_t  ,out_BRANCH_EVENT_DEPTH            [port]->read(),event.upt_ptr);
                       TEST(Taddress_t,out_BRANCH_EVENT_ADDRESS_SRC      [port]->read(),event.address_src);
                       TEST(Tcontrol_t,out_BRANCH_EVENT_ADDRESS_DEST_VAL [port]->read(),event.take_good);
@@ -2120,5 +2135,5 @@
   delete []  in_BRANCH_COMPLETE_DEPTH          ;
   delete []  in_BRANCH_COMPLETE_ADDRESS        ;
-  delete []  in_BRANCH_COMPLETE_FLAG           ;
+  delete []  in_BRANCH_COMPLETE_NO_SEQUENCE    ;
   delete [] out_BRANCH_COMPLETE_MISS_PREDICTION;
   delete [] out_BRANCH_COMPLETE_TAKE           ;
@@ -2129,6 +2144,6 @@
   delete [] out_BRANCH_EVENT_VAL            ;
   delete []  in_BRANCH_EVENT_ACK            ;
-//delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
-//delete []  in_BRANCH_EVENT_DEPTH          ;
+//delete [] out_BRANCH_EVENT_CONTEXT_ID     ;
+  delete [] out_BRANCH_EVENT_DEPTH          ;
 //delete [] out_BRANCH_EVENT_MISS_PREDICTION;
   delete [] out_BRANCH_EVENT_ADDRESS_SRC    ;
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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 98)
@@ -106,5 +106,5 @@
   public    : SC_IN (Tdepth_t           )  **  in_BRANCH_COMPLETE_DEPTH          ; //[nb_inst_branch_complete]
   public    : SC_IN (Taddress_t         )  **  in_BRANCH_COMPLETE_ADDRESS        ; //[nb_inst_branch_complete]
-  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_FLAG           ; //[nb_inst_branch_complete]
+  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_NO_SEQUENCE    ; //[nb_inst_branch_complete]
   public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_MISS_PREDICTION; //[nb_inst_branch_complete]
   public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_TAKE           ; //[nb_inst_branch_complete]
@@ -116,5 +116,5 @@
   public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK               ; //[nb_context]
 //public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID        ; //[nb_context]
-//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH             ; //[nb_context]
+  public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH             ; //[nb_context]
 //public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION   ; //[nb_context] is always miss prediction
   public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC       ; //[nb_context]
@@ -176,4 +176,5 @@
 
   private   : event_state_t                 * reg_EVENT_STATE                    ; //[nb_context]
+  private   : Tdepth_t                      * reg_EVENT_DEPTH                    ; //[nb_context]
   private   : Taddress_t                    * reg_EVENT_ADDRESS_SRC              ; //[nb_context] // Address branch
   private   : Tcontrol_t                    * reg_EVENT_ADDRESS_DEST_VAL         ; //[nb_context] // if miss ifetch, decod issue branch, dest must be reload
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 98)
@@ -161,5 +161,5 @@
 	    if (_param->_have_port_depth)
 	    sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i]));
-	    sensitive << (*(in_BRANCH_COMPLETE_FLAG    [i]))
+	    sensitive << (*(in_BRANCH_COMPLETE_NO_SEQUENCE [i]))
 		      << (*(in_BRANCH_COMPLETE_ADDRESS [i]));
 	  }
@@ -173,5 +173,5 @@
 	    if (_param->_have_port_depth)
 	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
-	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
+	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));
 	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_ADDRESS    [i]));
 
@@ -180,5 +180,5 @@
 	    if (_param->_have_port_depth)
 	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
-	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
+	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_NO_SEQUENCE[i]));
 
 	    if (_param->_have_port_context_id)
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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 98)
@@ -103,5 +103,5 @@
       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_instruction_address);
-      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_NO_SEQUENCE    ,"no_sequence"    ,Tcontrol_t,1);
       ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
       ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE           ,"take"           ,Tcontrol_t,1);
@@ -117,5 +117,5 @@
       ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK              ,ACK);
 //    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID       ,"context_id"      ,Tcontext_t,_param->_size_context_id);
-//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH            ,"depth"           ,Tdepth_t  ,_param->_size_depth);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH            ,"depth"           ,Tdepth_t  ,_param->_size_depth);
 //    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION  ,"miss_prediction" ,Tcontrol_t,1);
       ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC      ,"address_src"     ,Taddress_t,_param->_size_instruction_address);
@@ -203,4 +203,5 @@
 
     ALLOC1(reg_EVENT_STATE                  ,event_state_t,_param->_nb_context);
+    ALLOC1(reg_EVENT_DEPTH                  ,Tdepth_t     ,_param->_nb_context);
     ALLOC1(reg_EVENT_ADDRESS_SRC            ,Taddress_t   ,_param->_nb_context);
     ALLOC1(reg_EVENT_ADDRESS_DEST_VAL       ,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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 98)
@@ -73,5 +73,5 @@
 	delete []  in_BRANCH_COMPLETE_DEPTH          ;
 	delete []  in_BRANCH_COMPLETE_ADDRESS        ;
-	delete []  in_BRANCH_COMPLETE_FLAG           ;
+	delete []  in_BRANCH_COMPLETE_NO_SEQUENCE    ;
 	delete [] out_BRANCH_COMPLETE_MISS_PREDICTION;
 	delete [] out_BRANCH_COMPLETE_TAKE           ;
@@ -83,5 +83,5 @@
         DELETE1_SIGNAL( in_BRANCH_EVENT_ACK              ,_param->_nb_context,1);
 //      DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID       ,_param->_nb_context,_param->_size_context_id);
-//      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
+        DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH            ,_param->_nb_context,_param->_size_depth);
 //      DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION  ,_param->_nb_context,1);
         DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC      ,_param->_nb_context,_param->_size_instruction_address);
@@ -156,4 +156,5 @@
         
         DELETE1(reg_EVENT_STATE                  ,_param->_nb_context);
+        DELETE1(reg_EVENT_DEPTH                  ,_param->_nb_context);
         DELETE1(reg_EVENT_ADDRESS_SRC            ,_param->_nb_context);
         DELETE1(reg_EVENT_ADDRESS_DEST_VAL       ,_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_genMealy_branch_complete.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 98)
@@ -40,5 +40,5 @@
 	Tbranch_condition_t condition = reg_UPDATE_PREDICTION_TABLE [context][depth]._condition   ;
 
-        Tcontrol_t          flag      = PORT_READ(in_BRANCH_COMPLETE_FLAG [i]);
+        Tcontrol_t          no_sequence = PORT_READ(in_BRANCH_COMPLETE_NO_SEQUENCE [i]);
         Taddress_t          addr_good = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
 
@@ -46,5 +46,5 @@
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * depth          : %d",depth  );
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * condition      : %s",toString(condition).c_str());
-        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * flag           : %d",flag);
+        log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * no_sequence    : %d",no_sequence);
         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * address_good   : %.8x",addr_good);
 
@@ -74,28 +74,13 @@
 	    }
 	  case BRANCH_CONDITION_FLAG_UNSET                        : // l.bnf
-	    {
-	      //addr_dest : compute in decod stage
-              //miss if the direction is bad
-              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * BRANCH_CONDITION_FLAG_UNSET");
-
-              Tcontrol_t take_good = not flag; // flag set = not take
-
-	      miss = (take != take_good);
-	      take = take_good;
-
-#ifdef DEBUG_TEST
-//               if (addr_dest != addr_good)
-//                 throw ERRORMORPHEO(FUNCTION,toString("Branch_complete[%d] (condition %s) : bad destination address.",i,toString(condition).c_str()));
-#endif
-
-	      break;
-	    }
 	  case BRANCH_CONDITION_FLAG_SET                          : // l.bf
 	    {
 	      //addr_dest : compute in decod stage
               //miss if the direction is bad
-              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * BRANCH_CONDITION_FLAG_SET");
+              log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * BRANCH_CONDITION_FLAG");
 
-              Tcontrol_t take_good = flag; // flag set = take
+//               Tcontrol_t take_good = not flag; // flag set = not take
+//               Tcontrol_t take_good = flag; // flag set = take
+              Tcontrol_t take_good = no_sequence;
 
 	      miss = (take != take_good);
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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 98)
@@ -253,4 +253,6 @@
 
         PORT_WRITE(out_BRANCH_EVENT_VAL              [i],val);
+        if (_param->_have_port_depth)
+        PORT_WRITE(out_BRANCH_EVENT_DEPTH            [i],reg_EVENT_DEPTH            [i]);
         PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC      [i],reg_EVENT_ADDRESS_SRC      [i]);
         PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST_VAL [i],reg_EVENT_ADDRESS_DEST_VAL [i]);
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 97)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 98)
@@ -213,4 +213,5 @@
                   flush_UFPT [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;
@@ -303,6 +304,6 @@
 	  if (PORT_READ(in_BRANCH_COMPLETE_VAL[i]) and internal_BRANCH_COMPLETE_ACK [i])
 	    {
-	      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;
+	      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];
@@ -375,4 +376,5 @@
                   // else no update
 
+                  reg_EVENT_DEPTH           [context] = depth;
                   reg_EVENT_ADDRESS_SRC     [context] = address_src; // delay_slot is compute in Context_State
                   reg_EVENT_ADDRESS_DEST_VAL[context] = good_take;
@@ -668,4 +670,5 @@
         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_DEPTH           : %d"  ,reg_EVENT_DEPTH           [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_DEST_VAL: %d"  ,reg_EVENT_ADDRESS_DEST_VAL[i]);
