Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp	(revision 112)
@@ -51,26 +51,28 @@
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
 
-  ALLOC1_SC_SIGNAL( in_PREDICT_VAL                  ," in_PREDICT_VAL                  ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_ACK                  ,"out_PREDICT_ACK                  ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS_SRC          ," in_PREDICT_ADDRESS_SRC          ",Taddress_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_STATIC               ," in_PREDICT_STATIC               ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_LAST_TAKE            ," in_PREDICT_LAST_TAKE            ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY              ,"out_PREDICT_HISTORY              ",Thistory_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION            ,"out_PREDICT_DIRECTION            ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL        ,"out_PREDICT_PREDICTOR_VAL        ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK        ," in_PREDICT_PREDICTOR_ACK        ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_PREDICTOR_ADDRESS_SRC,"out_PREDICT_PREDICTOR_ADDRESS_SRC",Taddress_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY    ," in_PREDICT_PREDICTOR_HISTORY    ",Thistory_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION  ," in_PREDICT_PREDICTOR_DIRECTION  ",Tcontrol_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_UPDATE_VAL                   ," in_UPDATE_VAL                   ",Tcontrol_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL(out_UPDATE_ACK                   ,"out_UPDATE_ACK                   ",Tcontrol_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS               ," in_UPDATE_ADDRESS               ",Taddress_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY               ," in_UPDATE_HISTORY               ",Thistory_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION             ," in_UPDATE_DIRECTION             ",Tcontrol_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL         ,"out_UPDATE_PREDICTOR_VAL         ",Tcontrol_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK         ," in_UPDATE_PREDICTOR_ACK         ",Tcontrol_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_ADDRESS     ,"out_UPDATE_PREDICTOR_ADDRESS     ",Taddress_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY     ,"out_UPDATE_PREDICTOR_HISTORY     ",Thistory_t,_param->_nb_inst_update);
-  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION   ,"out_UPDATE_PREDICTOR_DIRECTION   ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_PREDICT_VAL                        ," in_PREDICT_VAL                        ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_ACK                        ,"out_PREDICT_ACK                        ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_ADDRESS_SRC                ," in_PREDICT_ADDRESS_SRC                ",Taddress_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_STATIC                     ," in_PREDICT_STATIC                     ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_LAST_TAKE                  ," in_PREDICT_LAST_TAKE                  ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_HISTORY                    ,"out_PREDICT_HISTORY                    ",Thistory_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_DIRECTION                  ,"out_PREDICT_DIRECTION                  ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL              ,"out_PREDICT_PREDICTOR_VAL              ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK              ," in_PREDICT_PREDICTOR_ACK              ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_PREDICTOR_ADDRESS_SRC      ,"out_PREDICT_PREDICTOR_ADDRESS_SRC      ",Taddress_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY          ," in_PREDICT_PREDICTOR_HISTORY          ",Thistory_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION        ," in_PREDICT_PREDICTOR_DIRECTION        ",Tcontrol_t,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL( in_UPDATE_VAL                         ," in_UPDATE_VAL                         ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_ACK                         ,"out_UPDATE_ACK                         ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_ADDRESS                     ," in_UPDATE_ADDRESS                     ",Taddress_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_HISTORY                     ," in_UPDATE_HISTORY                     ",Thistory_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_DIRECTION                   ," in_UPDATE_DIRECTION                   ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_PREDICTION_IFETCH           ," in_UPDATE_PREDICTION_IFETCH           ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL               ,"out_UPDATE_PREDICTOR_VAL               ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK               ," in_UPDATE_PREDICTOR_ACK               ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_ADDRESS           ,"out_UPDATE_PREDICTOR_ADDRESS           ",Taddress_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY           ,"out_UPDATE_PREDICTOR_HISTORY           ",Thistory_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION         ,"out_UPDATE_PREDICTOR_DIRECTION         ",Tcontrol_t,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_PREDICTOR_PREDICTION_IFETCH ,"out_UPDATE_PREDICTOR_PREDICTION_IFETCH ",Tcontrol_t,_param->_nb_inst_update);
 
   /********************************************************
@@ -83,36 +85,38 @@
   (*(_Direction_Glue->in_NRESET))       (*(in_NRESET));
 
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_VAL                  ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_ACK                  ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_ADDRESS_SRC          ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_STATIC               ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_LAST_TAKE            ,_param->_nb_inst_predict);
-  if (_param->_have_port_history)
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_HISTORY              ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_DIRECTION            ,_param->_nb_inst_predict);
-  if (_param->_have_component_meta_predictor)
-    {
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_PREDICTOR_VAL        ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_ACK        ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_PREDICTOR_ADDRESS_SRC,_param->_nb_inst_predict);
-  if (_param->_have_port_history)
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_HISTORY    ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_DIRECTION  ,_param->_nb_inst_predict);
-    }
-
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_VAL                   ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_ACK                   ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_ADDRESS               ,_param->_nb_inst_update );
-  if (_param->_have_port_history)
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_HISTORY               ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_DIRECTION             ,_param->_nb_inst_update );
-  if (_param->_have_component_meta_predictor)
-    {
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_VAL         ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_PREDICTOR_ACK         ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_ADDRESS     ,_param->_nb_inst_update );
-  if (_param->_have_port_history)
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_HISTORY     ,_param->_nb_inst_update );
-  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_DIRECTION   ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_VAL                        ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_ACK                        ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_ADDRESS_SRC                ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_STATIC                     ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_LAST_TAKE                  ,_param->_nb_inst_predict);
+  if (_param->_have_port_history)                                            
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_HISTORY                    ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_DIRECTION                  ,_param->_nb_inst_predict);
+  if (_param->_have_component_meta_predictor)                                
+    {                                                                        
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_PREDICTOR_VAL              ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_ACK              ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_PREDICT_PREDICTOR_ADDRESS_SRC      ,_param->_nb_inst_predict);
+  if (_param->_have_port_history)                                            
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_HISTORY          ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_PREDICT_PREDICTOR_DIRECTION        ,_param->_nb_inst_predict);
+    }                                                                        
+                                                                             
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_VAL                         ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_ACK                         ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_ADDRESS                     ,_param->_nb_inst_update );
+  if (_param->_have_port_history)                                            
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_HISTORY                     ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_DIRECTION                   ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_PREDICTION_IFETCH           ,_param->_nb_inst_update );
+  if (_param->_have_component_meta_predictor)                                
+    {                                                                        
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_VAL               ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue, in_UPDATE_PREDICTOR_ACK               ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_ADDRESS           ,_param->_nb_inst_update );
+  if (_param->_have_port_history)                                            
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_HISTORY           ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_DIRECTION         ,_param->_nb_inst_update );
+  INSTANCE1_SC_SIGNAL(_Direction_Glue,out_UPDATE_PREDICTOR_PREDICTION_IFETCH ,_param->_nb_inst_update );
     }
 
@@ -163,4 +167,5 @@
 	  in_UPDATE_HISTORY              [i]->write(range<Thistory_t>(rand(),_param->_size_history));
 	  in_UPDATE_DIRECTION            [i]->write(rand()%2);
+	  in_UPDATE_PREDICTION_IFETCH    [i]->write(rand()%2);
 	  in_UPDATE_PREDICTOR_ACK        [i]->write(rand()%2);
 	}
@@ -228,9 +233,10 @@
 	    case PREDICTOR_CUSTOM      :
 	      {
-		TEST(Tcontrol_t,out_UPDATE_ACK                 [i]->read(), in_UPDATE_PREDICTOR_ACK [i]->read());
-		TEST(Tcontrol_t,out_UPDATE_PREDICTOR_VAL       [i]->read(), in_UPDATE_VAL           [i]->read());
-		TEST(Taddress_t,out_UPDATE_PREDICTOR_ADDRESS   [i]->read(), in_UPDATE_ADDRESS       [i]->read());
-		TEST(Thistory_t,out_UPDATE_PREDICTOR_HISTORY   [i]->read(), in_UPDATE_HISTORY       [i]->read());
-		TEST(Tcontrol_t,out_UPDATE_PREDICTOR_DIRECTION [i]->read(), in_UPDATE_DIRECTION     [i]->read());
+		TEST(Tcontrol_t,out_UPDATE_ACK                        [i]->read(), in_UPDATE_PREDICTOR_ACK       [i]->read());
+		TEST(Tcontrol_t,out_UPDATE_PREDICTOR_VAL              [i]->read(), in_UPDATE_VAL                 [i]->read());
+		TEST(Taddress_t,out_UPDATE_PREDICTOR_ADDRESS          [i]->read(), in_UPDATE_ADDRESS             [i]->read());
+		TEST(Thistory_t,out_UPDATE_PREDICTOR_HISTORY          [i]->read(), in_UPDATE_HISTORY             [i]->read());
+		TEST(Tcontrol_t,out_UPDATE_PREDICTOR_DIRECTION        [i]->read(), in_UPDATE_DIRECTION           [i]->read());
+		TEST(Tcontrol_t,out_UPDATE_PREDICTOR_PREDICTION_IFETCH[i]->read(), in_UPDATE_PREDICTION_IFETCH   [i]->read());
 		
 		break;
@@ -281,4 +287,5 @@
   delete []  in_UPDATE_HISTORY               ;
   delete []  in_UPDATE_DIRECTION             ;
+  delete []  in_UPDATE_PREDICTION_IFETCH     ;
   delete [] out_UPDATE_PREDICTOR_VAL         ;
   delete []  in_UPDATE_PREDICTOR_ACK         ;
@@ -286,4 +293,5 @@
   delete [] out_UPDATE_PREDICTOR_HISTORY     ;
   delete [] out_UPDATE_PREDICTOR_DIRECTION   ;
+  delete [] out_UPDATE_PREDICTOR_PREDICTION_IFETCH;
 #endif
 
