Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_meta_predictor.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_meta_predictor.cfg	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_meta_predictor.cfg	(revision 111)
@@ -0,0 +1,10 @@
+Meta_Predictor_Glue
+4       4       +1 # nb_inst_predict
+4       4       +1 # nb_inst_update
+3	3	+1 # nb_predictor                   
+8	8	+1 # predictor_size_history         [0] [nb_predictor]
+17	17	+1 # predictor_size_history         [1] [nb_predictor]
+4	4	+1 # predictor_size_history         [2] [nb_predictor]
+1	1	+1 # predictor_update_on_prediction [0] [nb_predictor]
+1	1	+1 # predictor_update_on_prediction [1] [nb_predictor]
+0	0	+1 # predictor_update_on_prediction [2] [nb_predictor]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_two_level.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_two_level.cfg	(revision 111)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/config_two_level.cfg	(revision 111)
@@ -0,0 +1,6 @@
+Meta_Predictor_Glue
+4       4       +1 # nb_inst_predict
+4       4       +1 # nb_inst_update
+1	1	+1 # nb_predictor                   
+16	16	+1 # predictor_size_history         [0] [nb_predictor]
+1	1	+1 # predictor_update_on_prediction [0] [nb_predictor]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/configuration.cfg	(revision 110)
+++ 	(revision )
@@ -1,1 +1,0 @@
-Meta_Predictor_Glue
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/main.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/main.cpp	(revision 111)
@@ -7,6 +7,7 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/include/test.h"
+#include "Behavioural/include/Selftest.h"
 
-#define NB_PARAMS 0
+#define NB_PARAMS 3
 
 void usage (int argc, char * argv[])
@@ -14,5 +15,9 @@
   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
   err (_("list_params is :\n"));
-  err (_(" *  ()\n"));
+  err (_(" * nb_inst_predict                               (uint32_t)\n"));
+  err (_(" * nb_inst_update                                (uint32_t)\n"));
+  err (_(" * nb_predictor                                  (uint32_t)\n"));
+  err (_(" * predictor_size_history         [nb_predictor] (uint32_t)\n"));
+  err (_(" * predictor_update_on_prediction [nb_predictor] (bool    )\n"));
 
   exit (1);
@@ -25,5 +30,5 @@
 #endif
 {
-  if (argc != static_cast<int>(2+NB_PARAMS))
+  if (argc <= static_cast<int>(2+NB_PARAMS))
     usage (argc, argv);
 
@@ -32,4 +37,20 @@
   string name = argv[x++];
 
+  uint32_t   _nb_inst_predict               ;
+  uint32_t   _nb_inst_update                ;
+  uint32_t   _nb_predictor                  ;
+  uint32_t * _predictor_size_history        ;//[nb_predictor]
+  bool     * _predictor_update_on_prediction;//[nb_predictor]
+
+  SELFTEST0(_nb_inst_predict               ,uint32_t,argv,x);
+  SELFTEST0(_nb_inst_update                ,uint32_t,argv,x);
+  SELFTEST0(_nb_predictor                  ,uint32_t,argv,x);
+
+  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_predictor))
+    usage (argc, argv);
+
+  SELFTEST1(_predictor_size_history        ,uint32_t,argv,x,_nb_predictor);
+  SELFTEST1(_predictor_update_on_prediction,bool    ,argv,x,_nb_predictor);
+ 
   int _return = EXIT_SUCCESS;
   try 
@@ -37,4 +58,9 @@
       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::meta_predictor::meta_predictor_glue::Parameters
 	(
+         _nb_inst_predict               ,
+         _nb_inst_update                ,
+         _nb_predictor                  ,
+         _predictor_size_history        ,
+         _predictor_update_on_prediction,
          true //is_toplevel
         );
@@ -63,4 +89,7 @@
     }
 
+  DELETE1(_predictor_update_on_prediction,_param->_nb_predictor);
+  DELETE1(_predictor_size_history        ,_param->_nb_predictor);
+
   return (_return);
 }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp	(revision 110)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Meta_Predictor_Glue/SelfTest/src/test.cpp	(revision 111)
@@ -51,4 +51,24 @@
   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(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);
+  ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL          ,"out_PREDICT_PREDICTOR_VAL          ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict);
+  ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK          ," in_PREDICT_PREDICTOR_ACK          ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict);
+  ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY      ," in_PREDICT_PREDICTOR_HISTORY      ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_predict);
+  ALLOC2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION    ," in_PREDICT_PREDICTOR_DIRECTION    ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict);
+  ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,"out_PREDICT_PREDICTOR_DIRECTION_VAL",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction
+  ALLOC2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION    ,"out_PREDICT_PREDICTOR_DIRECTION    ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_predict); // if update_on_prediction
+  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_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);
+  ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL           ,"out_UPDATE_PREDICTOR_VAL           ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update);
+  ALLOC2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK           ," in_UPDATE_PREDICTOR_ACK           ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update);
+  ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY       ,"out_UPDATE_PREDICTOR_HISTORY       ",Thistory_t,_param->_nb_predictor,_param->_nb_inst_update);
+  ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION     ,"out_UPDATE_PREDICTOR_DIRECTION     ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update);
+  ALLOC2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS          ,"out_UPDATE_PREDICTOR_MISS          ",Tcontrol_t,_param->_nb_predictor,_param->_nb_inst_update);
+
   /********************************************************
    * Instanciation
@@ -60,4 +80,33 @@
   (*(_Meta_Predictor_Glue->in_NRESET))       (*(in_NRESET));
 
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_VAL                    ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_ACK                    ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_HISTORY                ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_DIRECTION              ,_param->_nb_inst_predict);
+
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_VAL          ,_param->_nb_predictor,_param->_nb_inst_predict);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_ACK          ,_param->_nb_predictor,_param->_nb_inst_predict);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_HISTORY      ,_param->_nb_predictor,_param->_nb_inst_predict);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_PREDICT_PREDICTOR_DIRECTION    ,_param->_nb_predictor,_param->_nb_inst_predict);
+  
+  for (uint32_t i=0; i<_param->_nb_predictor; ++i)
+    if (_param->_predictor_update_on_prediction [i])
+      {
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION_VAL[i],_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_PREDICT_PREDICTOR_DIRECTION    [i],_param->_nb_inst_predict);
+      }
+
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_VAL                     ,_param->_nb_inst_update);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_ACK                     ,_param->_nb_inst_update);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_HISTORY                 ,_param->_nb_inst_update);
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_DIRECTION               ,_param->_nb_inst_update);
+
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_VAL           ,_param->_nb_predictor,_param->_nb_inst_update);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue, in_UPDATE_PREDICTOR_ACK           ,_param->_nb_predictor,_param->_nb_inst_update);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_HISTORY       ,_param->_nb_predictor,_param->_nb_inst_update);
+  INSTANCE2_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_DIRECTION     ,_param->_nb_predictor,_param->_nb_inst_update);
+  for (uint32_t i=0; i<_param->_nb_predictor; ++i)
+    if (_param->_predictor_update_on_prediction [i])
+  INSTANCE1_SC_SIGNAL(_Meta_Predictor_Glue,out_UPDATE_PREDICTOR_MISS [i]                            ,_param->_nb_inst_update);
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -104,4 +153,27 @@
   delete in_CLOCK;
   delete in_NRESET;
+
+  DELETE1_SC_SIGNAL( in_PREDICT_VAL                    ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_ACK                    ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_HISTORY                ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_DIRECTION              ,_param->_nb_inst_predict);
+
+  DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_VAL          ,_param->_nb_predictor,_param->_nb_inst_predict);
+  DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_ACK          ,_param->_nb_predictor,_param->_nb_inst_predict);
+  DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_HISTORY      ,_param->_nb_predictor,_param->_nb_inst_predict);
+  DELETE2_SC_SIGNAL( in_PREDICT_PREDICTOR_DIRECTION    ,_param->_nb_predictor,_param->_nb_inst_predict);
+  DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION_VAL,_param->_nb_predictor,_param->_nb_inst_predict);
+  DELETE2_SC_SIGNAL(out_PREDICT_PREDICTOR_DIRECTION    ,_param->_nb_predictor,_param->_nb_inst_predict);
+
+  DELETE1_SC_SIGNAL( in_UPDATE_VAL                     ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL(out_UPDATE_ACK                     ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_HISTORY                 ,_param->_nb_inst_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_DIRECTION               ,_param->_nb_inst_update);
+
+  DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_VAL           ,_param->_nb_predictor,_param->_nb_inst_update);
+  DELETE2_SC_SIGNAL( in_UPDATE_PREDICTOR_ACK           ,_param->_nb_predictor,_param->_nb_inst_update);
+  DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_HISTORY       ,_param->_nb_predictor,_param->_nb_inst_update);
+  DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_DIRECTION     ,_param->_nb_predictor,_param->_nb_inst_update);
+  DELETE2_SC_SIGNAL(out_UPDATE_PREDICTOR_MISS          ,_param->_nb_predictor,_param->_nb_inst_update);
     }
 #endif
