Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor.cpp	(revision 42)
@@ -33,4 +33,8 @@
     log_printf(FUNC,Two_Level_Branch_Predictor,"Two_Level_Branch_Predictor","Begin");
 
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
 #ifdef STATISTICS
     // Allocation of statistics
@@ -38,13 +42,4 @@
 			    param_statistics          ,
 			    param);
-#endif
-
-#ifdef VHDL_TESTBENCH
-    // Creation of a testbench
-    //  -> port
-    //  -> clock's signals
-    _vhdl_testbench = new Vhdl_Testbench (_name);
-    vhdl_testbench_port           ();
-    _vhdl_testbench->set_clock    ("in_CLOCK",true);
 #endif
 
@@ -55,6 +50,4 @@
 
 #ifdef SYSTEMC
-    allocation ();
-
 #if (defined(STATISTICS) || defined (VHDL_TESTBENCH))
     SC_METHOD (transition);
@@ -79,10 +72,4 @@
     log_printf(FUNC,Two_Level_Branch_Predictor,"~Two_Level_Branch_Predictor","Begin");
 
-#ifdef VHDL_TESTBENCH
-    // generate the test bench
-    _vhdl_testbench->generate_file();
-    delete _vhdl_testbench;
-#endif
-
 #ifdef STATISTICS
     _stat->generate_file(statistics(0));
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_allocation.cpp	(revision 42)
@@ -22,6 +22,30 @@
     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");
 
-     in_CLOCK  = new SC_CLOCK           ("in_CLOCK");
-     in_NRESET = new SC_IN (Tcontrol_t) ("in_NRESET");
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Two_Level_Branch_Predictor"
+#ifdef POSITION
+					     ,MIXTE
+#endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      Interface * interface = _interfaces->set_interface(""
+#ifdef POSITION
+							 , IN  
+							 , SOUTH
+							 , "Generalist interface"
+#endif
+							 );
+      
+      in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+    }
+    
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
      in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
@@ -32,56 +56,25 @@
     if (_param._have_pht)
     out_PREDICT_PHT_HISTORY         = new SC_OUT(Tpht_history_t) * [_param._nb_prediction     ];
-    if (_param._have_bht)
-      {
-    signal_PREDICT_BHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
-    signal_PREDICT_BHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
-      }
-    if (_param._have_pht)
-      {
-    signal_PREDICT_PHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
-    signal_PREDICT_PHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
-      }
 
     for (uint32_t i=0; i<_param._nb_prediction; i++)
       {
-	rename = "in_PREDICT_VAL_"         +toString(i);
-	 in_PREDICT_VAL                 [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-
-	rename = "out_PREDICT_ACK_"        +toString(i);
-	out_PREDICT_ACK                 [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
-
-	rename = "in_PREDICT_ADDRESS_"     +toString(i);
-	 in_PREDICT_ADDRESS             [i] = new SC_IN (Taddress_t)     (rename.c_str());
-
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
+	 in_PREDICT_VAL                 [i] = interface->set_signal_valack_in            ("val"    , VAL);
+	out_PREDICT_ACK                 [i] = interface->set_signal_valack_out           ("ack"    , ACK);
+	 in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address", _param._size_address);
 	if (_param._have_bht)
-	  {
-	rename = "out_PREDICT_BHT_HISTORY_"+toString(i);
-	out_PREDICT_BHT_HISTORY         [i] = new SC_OUT(Tbht_history_t) (rename.c_str());
-	  }
-
+	out_PREDICT_BHT_HISTORY         [i] = interface->set_signal_out <Tbht_history_t> ("bht_history", _param._bht_size_shifter);
 	if (_param._have_pht)
-	  {
-    	rename = "out_PREDICT_PHT_HISTORY_"+toString(i);
-	out_PREDICT_PHT_HISTORY         [i] = new SC_OUT(Tpht_history_t) (rename.c_str());
-	  }
-
-	if (_param._have_bht)
-	  {
-	rename = "signal_PREDICT_BHT_ACK_"    +toString(i);
-	signal_PREDICT_BHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
-
-	rename = "signal_PREDICT_BHT_ADDRESS_"+toString(i);
-	signal_PREDICT_BHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
-	  }
-
-	if (_param._have_pht)
-	  {
-	rename = "signal_PREDICT_PHT_ACK_"    +toString(i);
-	signal_PREDICT_PHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
-
-	rename = "signal_PREDICT_PHT_ADDRESS_"+toString(i);
-	signal_PREDICT_PHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
-	  }
-      }
+	out_PREDICT_PHT_HISTORY         [i] = interface->set_signal_out <Tpht_history_t> ("pht_history", _param._pht_size_counter);
+      }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
      in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
@@ -93,54 +86,15 @@
      in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];
      in_BRANCH_COMPLETE_DIRECTION   = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
-    if (_param._have_bht)
-      {
-    signal_BRANCH_COMPLETE_BHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
-    signal_BRANCH_COMPLETE_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete]; 
-      }
-    if (_param._have_pht)
-      {
-    signal_BRANCH_COMPLETE_PHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
-    signal_BRANCH_COMPLETE_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete]; 
-      }
 
     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
       {
-	rename = "in_BRANCH_COMPLETE_VAL_"         +toString(i);
-	 in_BRANCH_COMPLETE_VAL         [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-
-	rename = "out_BRANCH_COMPLETE_ACK_"        +toString(i);
-	out_BRANCH_COMPLETE_ACK         [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
-
-	rename = "in_BRANCH_COMPLETE_ADDRESS_"     +toString(i);
-	 in_BRANCH_COMPLETE_ADDRESS     [i] = new SC_IN (Taddress_t)     (rename.c_str());
-
+	 in_BRANCH_COMPLETE_VAL         [i] = new interface->set_signal_valack_in            ("val"        , VAL);		   
+	out_BRANCH_COMPLETE_ACK         [i] = new interface->set_signal_valack_out           ("ack"        , ACK);		   
+	 in_BRANCH_COMPLETE_ADDRESS     [i] = new interface->set_signal_in  <Taddress_t    > ("address"    , _param._size_address);
 	if (_param._have_bht)
-	  {
-    	rename = "in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);
-	 in_BRANCH_COMPLETE_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str());
-	  }
+	 in_BRANCH_COMPLETE_BHT_HISTORY [i] = new interface->set_signal_in  <Tbht_history_t> ("bht_history", _param._bht_size_shifter);
 	if (_param._have_pht)
-	  {
-	rename = "in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);
-	 in_BRANCH_COMPLETE_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str());
-	  }
-	rename = "in_BRANCH_COMPLETE_DIRECTION_"  +toString(i);
-	 in_BRANCH_COMPLETE_DIRECTION   [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-	if (_param._have_bht)
-	  {
-	rename = "signal_BRANCH_COMPLETE_BHT_ACK_"    +toString(i);
-	signal_BRANCH_COMPLETE_BHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
-
-	rename = "signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i); 
-	signal_BRANCH_COMPLETE_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str()); 
-	  }
-	if (_param._have_pht)
-	  {
-	rename = "signal_BRANCH_COMPLETE_PHT_ACK_"    +toString(i);
-	signal_BRANCH_COMPLETE_PHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
-
-	rename = "signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i); 
-	signal_BRANCH_COMPLETE_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str()); 
-	  }
+	 in_BRANCH_COMPLETE_PHT_HISTORY [i] = new interface->set_signal_in  <Tpht_history_t> ("pht_history", _param._pht_size_counter);
+	 in_BRANCH_COMPLETE_DIRECTION   [i] = new interface->set_signal_in  <Tcontrol_t    > ("direction"  , 1);
       }
 
@@ -152,35 +106,21 @@
       {
 	name_component = _name+"_Branch_History_Table";
-
-	log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
-	
-	component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str()               ,
+	
+	component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str()
 #ifdef STATISTICS
-																						       _param_statistics                    ,
-#endif
-																						       *(_param._param_branch_history_table));
-	
-	// Instantiation
-	(*(component_Branch_History_Table->in_CLOCK ))        (*(in_CLOCK ));
-	(*(component_Branch_History_Table->in_NRESET))        (*(in_NRESET));
-
-	for (uint32_t i=0; i<_param._nb_prediction; i++)
-	  {
-	    (*(component_Branch_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
-	    (*(component_Branch_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_BHT_ACK      [i]));
-	    (*(component_Branch_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_BHT_ADDRESS  [i]));
-	    (*(component_Branch_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_BHT_HISTORY  [i]));
-	  }
-	
-	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-	  {
-	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
-	    (*(component_Branch_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_BHT_ACK     [i]));
-	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));
-	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_BHT_HISTORY [i]));
-	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
-	  }
-      }
-
+																						       ,_param_statistics
+#endif
+																						       ,*(_param._param_counter));
+	
+	_component->set_component (component_Branch_History_Table->_component
+#ifdef POSITION
+				   , 75
+				   , 25
+				   , 10
+				   , 10
+#endif
+				   );
+      }
+    
     // =====[ component_Pattern_History_Table ]===========================    
     if (_param._have_pht)
@@ -188,68 +128,140 @@
 	name_component = _name+"_Pattern_History_Table";
 	
-	log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
-	
-	component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table (name_component.c_str()               ,
+	component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table ::Pattern_History_Table (name_component.c_str()
 #ifdef STATISTICS
-																							 _param_statistics                    ,
-#endif
-																							 *(_param._param_pattern_history_table));
-	
-	// Instantiation
-	(*(component_Pattern_History_Table->in_CLOCK))        (*(in_CLOCK));
-	(*(component_Pattern_History_Table->in_NRESET))       (*(in_NRESET));
-	
+																							  ,_param_statistics
+#endif
+																							  ,*(_param._param_counter));
+	
+	_component->set_component (component_Pattern_History_Table->_component
+#ifdef POSITION
+				   , 75
+				   , 75
+				   , 10
+				   , 10
+#endif
+				   );
+      }
+
+    // =====[ component_Two_Level_Branch_Predictor_Glue ]=================
+
+    name_component = _name+"_Two_Level_Branch_Predictor_Glue";
+
+    component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str()
+#ifdef STATISTICS
+																										   ,_param_statistics
+#endif
+																										   ,*(_param._param_counter));
+    
+    _component->set_component (component_Pattern_History_Table->_component
+#ifdef POSITION
+			       , 50
+			       , 75
+			       , 10
+			       , 10
+#endif
+			       );
+    
+    // ~~~~~[ Component - Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    
+    // =====[ component_Branch_History_Table - Instanciation ]============
+    if (_param._have_bht)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Branch_History_Table","",
+				   _name                        ,"");
+#endif
+	
+	_component->port_map(_name+"_Branch_History_Table", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Branch_History_Table", "in_NRESET", _name,"in_NRESET");
+
 	for (uint32_t i=0; i<_param._nb_prediction; i++)
 	  {
-	    (*(component_Pattern_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
-	    (*(component_Pattern_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_PHT_ACK      [i]));
-	    (*(component_Pattern_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_PHT_ADDRESS  [i]));
-	    (*(component_Pattern_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_PHT_HISTORY  [i]));
+#ifdef POSITION
+	    _component->interface_map (_name+"_Branch_History_Table","predict_"+toString(i),
+				       _name                        ,"predict_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Branch_History_Table", "in_PREDICT_"+toString(i)+"_VAL"    , _name                                   , "in_PREDICT_"+toString(i)+"_VAL"        );
+	    _component->port_map(_name+"_Branch_History_Table","out_PREDICT_"+toString(i)+"_ACK"    , _name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_ACK"    );
+	    _component->port_map(_name+"_Branch_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS", _name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_BHT_ADDRESS");
+	    _component->port_map(_name+"_Branch_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name                                   ,"out_PREDICT_"+toString(i)+"_BHT_HISTORY");
 	  }
 	
 	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
 	  {
-	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
-	    (*(component_Pattern_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_PHT_ACK     [i]));
-	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));
-	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_PHT_HISTORY [i]));
-	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
-	  }
-      }
-
-    // =====[ component_Two_Level_Branch_Predictor_Glue ]===========================    
-    name_component = _name+"_Two_Level_Branch_Predictor_Glue";
-    
-    log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
-    
-    component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str()               ,
-#ifdef STATISTICS
-																										   _param_statistics                    ,
-#endif
-																										   *(_param._param_two_level_branch_predictor_glue));
-    
-    // Instantiation
-#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
-    (*(component_Two_Level_Branch_Predictor_Glue->in_CLOCK))        (*(in_CLOCK));
-#endif	
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Branch_History_Table","branch_complete_"+toString(i),
+				       _name                        ,"branch_complete_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"      , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"          );
+	    _component->port_map(_name+"_Branch_History_Table","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"      , _name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"      );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"  , _name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS"  );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"  );
+	    _component->port_map(_name+"_Branch_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION", _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"    );
+	  }
+      }
+    
+    // =====[ component_Pattern_History_Table - Instanciation ]===========
+    if (_param._have_pht)
+      {
+#ifdef POSITION
+	_component->interface_map (_name+"_Pattern_History_Table","",
+				   _name                         ,"");
+#endif
+	
+	_component->port_map(_name+"_Pattern_History_Table", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Pattern_History_Table", "in_NRESET", _name,"in_NRESET");
+
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Pattern_History_Table","predict_"+toString(i),
+				       _name                         ,"predict_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_VAL"    , _name                                   , "in_PREDICT_"+toString(i)+"_VAL"        );
+	    _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_ACK"    , _name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_PHT_ACK"    );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_PREDICT_"+toString(i)+"_ADDRESS", _name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_PHT_ADDRESS");
+	    _component->port_map(_name+"_Pattern_History_Table","out_PREDICT_"+toString(i)+"_HISTORY", _name                                   ,"out_PREDICT_"+toString(i)+"_PHT_HISTORY");
+	  }
+	
+	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+	  {
+#ifdef POSITION
+	    _component->interface_map (_name+"_Pattern_History_Table","branch_complete_"+toString(i),
+				       _name                        ,"branch_complete_"+toString(i));
+#endif
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"      , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"          );
+	    _component->port_map(_name+"_Pattern_History_Table","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"      , _name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"      );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"  , _name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"  );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_HISTORY"  , _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_HISTORY"  );
+	    _component->port_map(_name+"_Pattern_History_Table", "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION", _name                                   , "in_BRANCH_COMPLETE_"+toString(i)+"_DIRECTION"    );
+	  }
+      }
+
+    // =====[ component_Two_Level_Branch_Predictor_Glue - Instanciation ]=
+#ifdef POSITION
+	_component->interface_map (_name+"_Two_Level_Branch_Predictor_Glue","",
+				   _name                                   ,"");
+#endif
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_CLOCK" , _name,"in_CLOCK" );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_NRESET", _name,"in_NRESET");
+
+	for (uint32_t i=0; i<_param._nb_prediction; i++)
+	  {
 	if (_param._have_bht)
 	  {
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK             [i])) (*(signal_PREDICT_BHT_ACK              [i]));
-	    (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS         [i])) (*(signal_PREDICT_BHT_ADDRESS          [i]));
-	  }											   										  
-	if (_param._have_pht)								   							  
-	  {											   										  
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK             [i])) (*(signal_PREDICT_PHT_ACK              [i]));
-	    (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS         [i])) (*(signal_PREDICT_PHT_ADDRESS          [i]));
-	  }											   										  
-	if (_param._have_bht and _param._have_pht)						   					  
-	  {											   										  
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY         [i])) (*(   out_PREDICT_BHT_HISTORY          [i]));
-	  }											   										  
-	(*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK                 [i])) (*(   out_PREDICT_ACK                  [i]));
-	(*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS              [i]));
-      }
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_PREDICT_"+toString(i)+"_BHT_ACK"    , _name+"_Branch_History_Table" , "out_PREDICT_"+toString(i)+"_BHT_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" ,  "in_PREDICT_"+toString(i)+"_BHT_ADDRESS");
+	  }
+	if (_param._have_pht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_PREDICT_"+toString(i)+"_PHT_ACK"    , _name+"_Pattern_History_Table", "out_PREDICT_"+toString(i)+"_PHT_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_PREDICT_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table",  "in_PREDICT_"+toString(i)+"_PHT_ADDRESS");
+	  }
+	if (_param._have_bht and _param._have_pht)
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_BHT_HISTORY" , _name                         , "in_PREDICT_"+toString(i)+"_BHT_HISTORY");
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_PREDICT_"+toString(i)+"_ACK"         , _name                         ,"out_PREDICT_"+toString(i)+"_ACK");
+        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_PREDICT_"+toString(i)+"_ADDRESS"     , _name                         , "in_PREDICT_"+toString(i)+"_ADDRESS");
+	  }
     
     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
@@ -257,22 +269,314 @@
 	if (_param._have_bht)
 	  {
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK      [i]));
-	    (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS  [i]));
-	  }										   					       				  
-	if (_param._have_pht)							   					       	  
-	  {										   					       				  
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK      [i]));
-	    (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS  [i]));
-	  }										   					       				  
-	if (_param._have_bht and _param._have_pht)					   					  
-	  {										   					       				  
-	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(    in_BRANCH_COMPLETE_BHT_HISTORY  [i]));
-	  }										   					       				  
-	(*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK         [i])) (*(   out_BRANCH_COMPLETE_ACK          [i]));
-	(*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS      [i]));
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"    , _name+"_Branch_History_Table" , "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS", _name+"_Branch_History_Table" ,  "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS");
+	  }
+	if (_param._have_pht)
+	  {
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"    , _name+"_Pattern_History_Table", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK"    );
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS", _name+"_Pattern_History_Table",  "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS");
+	  }
+	if (_param._have_bht and _param._have_pht)
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY" , _name                         , "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY");
+	_component->port_map(_name+"_Two_Level_Branch_Predictor_Glue","out_BRANCH_COMPLETE_"+toString(i)+"_ACK"         , _name                         ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK");
+        _component->port_map(_name+"_Two_Level_Branch_Predictor_Glue", "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"     , _name                         , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS");
       }
   
+#ifdef POSITION
+    _component->generate_file();
+#endif
+
     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");
   };
+
+
+
+
+
+
+
+//   void Two_Level_Branch_Predictor::allocation (void)
+//   {
+//     string rename;
+
+//     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","Begin");
+
+//     _component   = new Component ();
+
+//     Entity * entity = _component->set_entity (_name                 
+// #ifdef POSITION
+// 					     ,"Two_Level_Branch_Predictor"
+// 					     ,MIXTE
+// #endif
+// 					      );
+    
+//     _interfaces = entity->set_interfaces();
+
+//     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+//     {
+//       Interface * interface = _interfaces->set_interface(""
+// #ifdef POSITION
+// 							 , IN  
+// 							 , SOUTH
+// 							 , "Generalist interface"
+// #endif
+// 							 );
+      
+//       in_CLOCK              = interface->set_signal_clk              ("clock" ,1);
+//       in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_YES);
+//     }
+    
+//     // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+//      in_PREDICT_VAL                 = new SC_IN (Tcontrol_t)     * [_param._nb_prediction     ];
+//     out_PREDICT_ACK                 = new SC_OUT(Tcontrol_t)     * [_param._nb_prediction     ];
+//      in_PREDICT_ADDRESS             = new SC_IN (Taddress_t)     * [_param._nb_prediction     ];
+//     if (_param._have_bht)
+//     out_PREDICT_BHT_HISTORY         = new SC_OUT(Tbht_history_t) * [_param._nb_prediction     ];
+//     if (_param._have_pht)
+//     out_PREDICT_PHT_HISTORY         = new SC_OUT(Tpht_history_t) * [_param._nb_prediction     ];
+// //     if (_param._have_bht)
+// //       {
+// //     signal_PREDICT_BHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
+// //     signal_PREDICT_BHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
+// //       }
+// //     if (_param._have_pht)
+// //       {
+// //     signal_PREDICT_PHT_ACK          = new SC_SIGNAL(Tcontrol_t)     * [_param._nb_prediction];
+// //     signal_PREDICT_PHT_ADDRESS      = new SC_SIGNAL(Taddress_t)     * [_param._nb_prediction];
+// //       }
+
+//     for (uint32_t i=0; i<_param._nb_prediction; i++)
+//       {
+// 	rename = "in_PREDICT_VAL_"         +toString(i);
+// 	 in_PREDICT_VAL                 [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
+
+// 	rename = "out_PREDICT_ACK_"        +toString(i);
+// 	out_PREDICT_ACK                 [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
+
+// 	rename = "in_PREDICT_ADDRESS_"     +toString(i);
+// 	 in_PREDICT_ADDRESS             [i] = new SC_IN (Taddress_t)     (rename.c_str());
+
+// 	if (_param._have_bht)
+// 	  {
+// 	rename = "out_PREDICT_BHT_HISTORY_"+toString(i);
+// 	out_PREDICT_BHT_HISTORY         [i] = new SC_OUT(Tbht_history_t) (rename.c_str());
+// 	  }
+
+// 	if (_param._have_pht)
+// 	  {
+//     	rename = "out_PREDICT_PHT_HISTORY_"+toString(i);
+// 	out_PREDICT_PHT_HISTORY         [i] = new SC_OUT(Tpht_history_t) (rename.c_str());
+// 	  }
+
+// // 	if (_param._have_bht)
+// // 	  {
+// // 	rename = "signal_PREDICT_BHT_ACK_"    +toString(i);
+// // 	signal_PREDICT_BHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
+
+// // 	rename = "signal_PREDICT_BHT_ADDRESS_"+toString(i);
+// // 	signal_PREDICT_BHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
+// // 	  }
+
+// // 	if (_param._have_pht)
+// // 	  {
+// // 	rename = "signal_PREDICT_PHT_ACK_"    +toString(i);
+// // 	signal_PREDICT_PHT_ACK          [i] = new SC_SIGNAL(Tcontrol_t)     (rename.c_str());
+
+// // 	rename = "signal_PREDICT_PHT_ADDRESS_"+toString(i);
+// // 	signal_PREDICT_PHT_ADDRESS      [i] = new SC_SIGNAL(Taddress_t)     (rename.c_str());
+// // 	  }
+//       }
+
+//      in_BRANCH_COMPLETE_VAL         = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+//     out_BRANCH_COMPLETE_ACK         = new SC_OUT(Tcontrol_t)     * [_param._nb_branch_complete];
+//      in_BRANCH_COMPLETE_ADDRESS     = new SC_IN (Taddress_t)     * [_param._nb_branch_complete];
+//     if (_param._have_bht)
+//      in_BRANCH_COMPLETE_BHT_HISTORY = new SC_IN (Tbht_history_t) * [_param._nb_branch_complete];
+//     if (_param._have_pht)
+//      in_BRANCH_COMPLETE_PHT_HISTORY = new SC_IN (Tpht_history_t) * [_param._nb_branch_complete];
+//      in_BRANCH_COMPLETE_DIRECTION   = new SC_IN (Tcontrol_t)     * [_param._nb_branch_complete];
+// //     if (_param._have_bht)
+// //       {
+// //     signal_BRANCH_COMPLETE_BHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
+// //     signal_BRANCH_COMPLETE_BHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete]; 
+// //       }
+// //     if (_param._have_pht)
+// //       {
+// //     signal_BRANCH_COMPLETE_PHT_ACK     = new SC_SIGNAL(Tcontrol_t) * [_param._nb_branch_complete];
+// //     signal_BRANCH_COMPLETE_PHT_ADDRESS = new SC_SIGNAL(Taddress_t) * [_param._nb_branch_complete]; 
+// //       }
+
+//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+//       {
+// 	rename = "in_BRANCH_COMPLETE_VAL_"         +toString(i);
+// 	 in_BRANCH_COMPLETE_VAL         [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
+
+// 	rename = "out_BRANCH_COMPLETE_ACK_"        +toString(i);
+// 	out_BRANCH_COMPLETE_ACK         [i] = new SC_OUT(Tcontrol_t)     (rename.c_str());
+
+// 	rename = "in_BRANCH_COMPLETE_ADDRESS_"     +toString(i);
+// 	 in_BRANCH_COMPLETE_ADDRESS     [i] = new SC_IN (Taddress_t)     (rename.c_str());
+
+// 	if (_param._have_bht)
+// 	  {
+//     	rename = "in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);
+// 	 in_BRANCH_COMPLETE_BHT_HISTORY [i] = new SC_IN (Tbht_history_t) (rename.c_str());
+// 	  }
+// 	if (_param._have_pht)
+// 	  {
+// 	rename = "in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i);
+// 	 in_BRANCH_COMPLETE_PHT_HISTORY [i] = new SC_IN (Tpht_history_t) (rename.c_str());
+// 	  }
+// 	rename = "in_BRANCH_COMPLETE_DIRECTION_"  +toString(i);
+// 	 in_BRANCH_COMPLETE_DIRECTION   [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
+// // 	if (_param._have_bht)
+// // 	  {
+// // 	rename = "signal_BRANCH_COMPLETE_BHT_ACK_"    +toString(i);
+// // 	signal_BRANCH_COMPLETE_BHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
+
+// // 	rename = "signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i); 
+// // 	signal_BRANCH_COMPLETE_BHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str()); 
+// // 	  }
+// // 	if (_param._have_pht)
+// // 	  {
+// // 	rename = "signal_BRANCH_COMPLETE_PHT_ACK_"    +toString(i);
+// // 	signal_BRANCH_COMPLETE_PHT_ACK     [i] = new SC_SIGNAL(Tcontrol_t) (rename.c_str());
+
+// // 	rename = "signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i); 
+// // 	signal_BRANCH_COMPLETE_PHT_ADDRESS [i] = new SC_SIGNAL(Taddress_t) (rename.c_str()); 
+// // 	  }
+//       }
+
+//     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+//     string name_component;
+
+//     // =====[ component_Branch_History_Table ]============================    
+//     if (_param._have_bht)
+//       {
+// 	name_component = _name+"_Branch_History_Table";
+
+// 	log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
+	
+// 	component_Branch_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::branch_history_table ::Branch_History_Table (name_component.c_str()               ,
+// #ifdef STATISTICS
+// 																						       _param_statistics                    ,
+// #endif
+// 																						       *(_param._param_branch_history_table));
+	
+// 	// Instantiation
+// 	(*(component_Branch_History_Table->in_CLOCK ))        (*(in_CLOCK ));
+// 	(*(component_Branch_History_Table->in_NRESET))        (*(in_NRESET));
+
+// 	for (uint32_t i=0; i<_param._nb_prediction; i++)
+// 	  {
+// 	    (*(component_Branch_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
+// 	    (*(component_Branch_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_BHT_ACK      [i]));
+// 	    (*(component_Branch_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_BHT_ADDRESS  [i]));
+// 	    (*(component_Branch_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_BHT_HISTORY  [i]));
+// 	  }
+	
+// 	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+// 	  {
+// 	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
+// 	    (*(component_Branch_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_BHT_ACK     [i]));
+// 	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_BHT_ADDRESS [i]));
+// 	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_BHT_HISTORY [i]));
+// 	    (*(component_Branch_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
+// 	  }
+//       }
+
+//     // =====[ component_Pattern_History_Table ]===========================    
+//     if (_param._have_pht)
+//       {
+// 	name_component = _name+"_Pattern_History_Table";
+	
+// 	log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
+	
+// 	component_Pattern_History_Table = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::pattern_history_table::Pattern_History_Table (name_component.c_str()               ,
+// #ifdef STATISTICS
+// 																							 _param_statistics                    ,
+// #endif
+// 																							 *(_param._param_pattern_history_table));
+	
+// 	// Instantiation
+// 	(*(component_Pattern_History_Table->in_CLOCK))        (*(in_CLOCK));
+// 	(*(component_Pattern_History_Table->in_NRESET))       (*(in_NRESET));
+	
+// 	for (uint32_t i=0; i<_param._nb_prediction; i++)
+// 	  {
+// 	    (*(component_Pattern_History_Table-> in_PREDICT_VAL             [i]))    (*(    in_PREDICT_VAL          [i]));
+// 	    (*(component_Pattern_History_Table->out_PREDICT_ACK             [i]))    (*(signal_PREDICT_PHT_ACK      [i]));
+// 	    (*(component_Pattern_History_Table-> in_PREDICT_ADDRESS         [i]))    (*(signal_PREDICT_PHT_ADDRESS  [i]));
+// 	    (*(component_Pattern_History_Table->out_PREDICT_HISTORY         [i]))    (*(   out_PREDICT_PHT_HISTORY  [i]));
+// 	  }
+	
+// 	for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+// 	  {
+// 	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))    (*(    in_BRANCH_COMPLETE_VAL         [i]));
+// 	    (*(component_Pattern_History_Table->out_BRANCH_COMPLETE_ACK       [i]))    (*(signal_BRANCH_COMPLETE_PHT_ACK     [i]));
+// 	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))    (*(signal_BRANCH_COMPLETE_PHT_ADDRESS [i]));
+// 	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))    (*(    in_BRANCH_COMPLETE_PHT_HISTORY [i]));
+// 	    (*(component_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))    (*(    in_BRANCH_COMPLETE_DIRECTION   [i]));
+// 	  }
+//       }
+
+//     // =====[ component_Two_Level_Branch_Predictor_Glue ]===========================    
+//     name_component = _name+"_Two_Level_Branch_Predictor_Glue";
+    
+//     log_printf(INFO,Two_Level_Branch_Predictor,"allocation","Allocation : %s",name_component.c_str());
+    
+//     component_Two_Level_Branch_Predictor_Glue = new morpheo::behavioural::stage_1_ifetch::predictor::meta_predictor::two_level_branch_predictor::two_level_branch_predictor_glue::Two_Level_Branch_Predictor_Glue (name_component.c_str()               ,
+// #ifdef STATISTICS
+// 																										   _param_statistics                    ,
+// #endif
+// 																										   *(_param._param_two_level_branch_predictor_glue));
+    
+//     // Instantiation
+// #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
+//     (*(component_Two_Level_Branch_Predictor_Glue->in_CLOCK))        (*(in_CLOCK));
+// #endif	
+//     for (uint32_t i=0; i<_param._nb_prediction; i++)
+//       {
+// 	if (_param._have_bht)
+// 	  {
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_ACK             [i])) (*(signal_PREDICT_BHT_ACK              [i]));
+// 	    (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_BHT_ADDRESS         [i])) (*(signal_PREDICT_BHT_ADDRESS          [i]));
+// 	  }											   										  
+// 	if (_param._have_pht)								   							  
+// 	  {											   										  
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_PHT_ACK             [i])) (*(signal_PREDICT_PHT_ACK              [i]));
+// 	    (*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_PHT_ADDRESS         [i])) (*(signal_PREDICT_PHT_ADDRESS          [i]));
+// 	  }											   										  
+// 	if (_param._have_bht and _param._have_pht)						   					  
+// 	  {											   										  
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_BHT_HISTORY         [i])) (*(   out_PREDICT_BHT_HISTORY          [i]));
+// 	  }											   										  
+// 	(*(component_Two_Level_Branch_Predictor_Glue->out_PREDICT_ACK                 [i])) (*(   out_PREDICT_ACK                  [i]));
+// 	(*(component_Two_Level_Branch_Predictor_Glue-> in_PREDICT_ADDRESS             [i])) (*(    in_PREDICT_ADDRESS              [i]));
+//       }
+    
+//     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
+//       {
+// 	if (_param._have_bht)
+// 	  {
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_BHT_ACK      [i]));
+// 	    (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_BHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_BHT_ADDRESS  [i]));
+// 	  }										   					       				  
+// 	if (_param._have_pht)							   					       	  
+// 	  {										   					       				  
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_PHT_ACK     [i])) (*(signal_BRANCH_COMPLETE_PHT_ACK      [i]));
+// 	    (*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_PHT_ADDRESS [i])) (*(signal_BRANCH_COMPLETE_PHT_ADDRESS  [i]));
+// 	  }										   					       				  
+// 	if (_param._have_bht and _param._have_pht)					   					  
+// 	  {										   					       				  
+// 	    (*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_BHT_HISTORY [i])) (*(    in_BRANCH_COMPLETE_BHT_HISTORY  [i]));
+// 	  }										   					       				  
+// 	(*(component_Two_Level_Branch_Predictor_Glue->out_BRANCH_COMPLETE_ACK         [i])) (*(   out_BRANCH_COMPLETE_ACK          [i]));
+// 	(*(component_Two_Level_Branch_Predictor_Glue-> in_BRANCH_COMPLETE_ADDRESS     [i])) (*(    in_BRANCH_COMPLETE_ADDRESS      [i]));
+//       }
+  
+//     log_printf(FUNC,Two_Level_Branch_Predictor,"allocation","End");
+//   };
   
 }; // end namespace two_level_branch_predictor
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_deallocation.cpp	(revision 42)
@@ -23,84 +23,20 @@
     delete in_NRESET;
 
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	delete  in_PREDICT_VAL                 [i];
-	delete out_PREDICT_ACK                 [i];
-	delete  in_PREDICT_ADDRESS             [i];
-	if (_param._have_bht)
-	delete out_PREDICT_BHT_HISTORY         [i];
-	if (_param._have_pht)
-	delete out_PREDICT_PHT_HISTORY         [i];
-	if (_param._have_bht)
-	  {
-	delete signal_PREDICT_BHT_ACK          [i];
-	delete signal_PREDICT_BHT_ADDRESS      [i];
-	  }
-	if (_param._have_pht)
-	  {
-	delete signal_PREDICT_PHT_ACK          [i];
-	delete signal_PREDICT_PHT_ADDRESS      [i];
-	  }
+    delete []  in_PREDICT_VAL        ;
+    delete [] out_PREDICT_ACK        ;
+    delete []  in_PREDICT_ADDRESS    ;
+    if (_param._have_bht)
+    delete [] out_PREDICT_BHT_HISTORY;
+    if (_param._have_pht)
+    delete [] out_PREDICT_PHT_HISTORY;
 
-      }
-
-    delete  in_PREDICT_VAL        ;
-    delete out_PREDICT_ACK        ;
-    delete  in_PREDICT_ADDRESS    ;
+    delete []  in_BRANCH_COMPLETE_VAL        ;
+    delete [] out_BRANCH_COMPLETE_ACK        ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
     if (_param._have_bht)
-    delete out_PREDICT_BHT_HISTORY;
+    delete []  in_BRANCH_COMPLETE_BHT_HISTORY;
     if (_param._have_pht)
-    delete out_PREDICT_PHT_HISTORY;
-    if (_param._have_bht)
-      {
-    delete signal_PREDICT_BHT_ACK    ;
-    delete signal_PREDICT_BHT_ADDRESS;
-      }
-    if (_param._have_pht)
-      {
-    delete signal_PREDICT_PHT_ACK    ;
-    delete signal_PREDICT_PHT_ADDRESS;
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	delete  in_BRANCH_COMPLETE_VAL         [i];
-	delete out_BRANCH_COMPLETE_ACK         [i];
-	delete  in_BRANCH_COMPLETE_ADDRESS     [i];
-	if (_param._have_bht)
-	delete  in_BRANCH_COMPLETE_BHT_HISTORY [i];
-	if (_param._have_pht)
-	delete  in_BRANCH_COMPLETE_PHT_HISTORY [i];
-	delete  in_BRANCH_COMPLETE_DIRECTION   [i];
-	if (_param._have_bht)
-	  {
-	delete signal_BRANCH_COMPLETE_BHT_ACK     [i];
-	delete signal_BRANCH_COMPLETE_BHT_ADDRESS [i]; 
-	  }
-	if (_param._have_pht)
-	  {
-	delete signal_BRANCH_COMPLETE_PHT_ACK     [i];
-	delete signal_BRANCH_COMPLETE_PHT_ADDRESS [i]; 
-	  }
-      }
-
-    delete  in_BRANCH_COMPLETE_VAL        ;
-    delete out_BRANCH_COMPLETE_ACK        ;
-    delete  in_BRANCH_COMPLETE_ADDRESS    ;
-    if (_param._have_bht)
-    delete  in_BRANCH_COMPLETE_BHT_HISTORY;
-    if (_param._have_pht)
-    delete  in_BRANCH_COMPLETE_PHT_HISTORY;
-    delete  in_BRANCH_COMPLETE_DIRECTION  ;
-    if (_param._have_bht)
-      {
-    delete signal_BRANCH_COMPLETE_BHT_ACK    ;
-    delete signal_BRANCH_COMPLETE_BHT_ADDRESS; 
-      }
-    if (_param._have_pht)
-      {
-    delete signal_BRANCH_COMPLETE_PHT_ACK    ;
-    delete signal_BRANCH_COMPLETE_PHT_ADDRESS; 
-      }
+    delete []  in_BRANCH_COMPLETE_PHT_HISTORY;
+    delete []  in_BRANCH_COMPLETE_DIRECTION  ;
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -111,4 +47,5 @@
     delete component_Pattern_History_Table;
     delete component_Two_Level_Branch_Predictor_Glue;
+    delete _component;
 
     log_printf(FUNC,Two_Level_Branch_Predictor,"deallocation","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl.cpp	(revision 42)
@@ -21,12 +21,12 @@
   {
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","Begin");
-    Vhdl vhdl (_name);
+    Vhdl * vhdl = new Vhdl (_name);
 
-    vhdl.set_library_work (_name + "_Pack");
+    vhdl->set_library_work (_name + "_Pack");
     if (_param._have_bht)
-    vhdl.set_library_work (_name + "_Branch_History_Table_Pack");
+    vhdl->set_library_work (_name + "_Branch_History_Table_Pack");
     if (_param._have_pht)
-    vhdl.set_library_work (_name + "_Pattern_History_Table_Pack");
-    vhdl.set_library_work (_name + "_Two_Level_Branch_Predictor_Glue_Pack");
+    vhdl->set_library_work (_name + "_Pattern_History_Table_Pack");
+    vhdl->set_library_work (_name + "_Two_Level_Branch_Predictor_Glue_Pack");
     
     vhdl_port        (vhdl);
@@ -34,5 +34,8 @@
     vhdl_body        (vhdl);
 
-    vhdl.generate_file();
+    vhdl->generate_file();
+
+    delete vhdl;
+
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl","End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_body.cpp	(revision 42)
@@ -17,5 +17,5 @@
 
 
-  void Two_Level_Branch_Predictor::vhdl_body (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor::vhdl_body (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_body","Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_declaration.cpp	(revision 42)
@@ -17,5 +17,5 @@
 
 
-  void Two_Level_Branch_Predictor::vhdl_declaration (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor::vhdl_declaration (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_declaration","Begin");
@@ -25,12 +25,12 @@
 	if (_param._have_bht)
 	  {
-	vhdl.set_signal  ("signal_PREDICT_BHT_ACK_"+toString(i), 1);
-	vhdl.set_signal  ("signal_PREDICT_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
-	vhdl.set_signal  ("signal_PREDICT_BHT_HISTORY_"+toString(i), _param._bht_size_shifter);
+	vhdl->set_signal  ("signal_PREDICT_BHT_ACK_"+toString(i), 1);
+	vhdl->set_signal  ("signal_PREDICT_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
+	vhdl->set_signal  ("signal_PREDICT_BHT_HISTORY_"+toString(i), _param._bht_size_shifter);
 	  }
 	if (_param._have_pht)
 	  {
-	vhdl.set_signal  ("signal_PREDICT_PHT_ACK_"+toString(i), 1);
-	vhdl.set_signal  ("signal_PREDICT_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
+	vhdl->set_signal  ("signal_PREDICT_PHT_ACK_"+toString(i), 1);
+	vhdl->set_signal  ("signal_PREDICT_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
 	  }
       }
@@ -40,11 +40,11 @@
 	if (_param._have_bht)
 	  {
-	vhdl.set_signal  ("signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i), 1);
-	vhdl.set_signal  ("signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
+	vhdl->set_signal  ("signal_BRANCH_COMPLETE_BHT_ACK_"+toString(i), 1);
+	vhdl->set_signal  ("signal_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i), _param._bht_size_address);
 	  }
 	if (_param._have_pht)
 	  {
-	vhdl.set_signal  ("signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i), 1);
-	vhdl.set_signal  ("signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
+	vhdl->set_signal  ("signal_BRANCH_COMPLETE_PHT_ACK_"+toString(i), 1);
+	vhdl->set_signal  ("signal_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i), _param._pht_size_address);
 	  }
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_port.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_port.cpp	(revision 42)
@@ -16,33 +16,9 @@
 namespace two_level_branch_predictor {
 
-  void Two_Level_Branch_Predictor::vhdl_port (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor::vhdl_port (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_port","Begin");
 
-    vhdl.set_port (" in_CLOCK ", IN, 1);
-    vhdl.set_port (" in_NRESET", IN, 1);
-
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	vhdl.set_port (" in_PREDICT_VAL_"+toString(i)+"                ", IN, 1);
-	vhdl.set_port ("out_PREDICT_ACK_"+toString(i)+"                ",OUT, 1);
-	vhdl.set_port (" in_PREDICT_ADDRESS_"+toString(i)+"            ", IN,_param._size_address);
-	if (_param._have_bht)
-	vhdl.set_port ("out_PREDICT_BHT_HISTORY_"+toString(i)+"        ",OUT,_param._bht_size_shifter);
-	if (_param._have_pht)
-    	vhdl.set_port ("out_PREDICT_PHT_HISTORY_"+toString(i)+"        ",OUT,_param._pht_size_counter);
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	vhdl.set_port (" in_BRANCH_COMPLETE_VAL_"+toString(i)+"        ", IN, 1);
-	vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"+toString(i)+"        ",OUT, 1);
-	vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+"    ", IN,_param._size_address);
-	if (_param._have_bht)
-    	vhdl.set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+"", IN,_param._bht_size_shifter);
-	if (_param._have_pht)
-	vhdl.set_port (" in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i)+"", IN,_param._pht_size_counter);
-	vhdl.set_port (" in_BRANCH_COMPLETE_DIRECTION_"+toString(i)+"  ", IN, 1);
-      }
+    _interfaces->set_port(vhdl);
 
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_port","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_label.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_label.cpp	(revision 15)
+++ 	(revision )
@@ -1,31 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace stage_1_ifetch {
-namespace predictor {
-namespace meta_predictor {
-namespace two_level_branch_predictor {
-
-
-  void Two_Level_Branch_Predictor::vhdl_testbench_label (string label)
-  {
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench->add_label(label);
-#endif
-  };
-
-}; // end namespace two_level_branch_predictor
-}; // end namespace meta_predictor
-}; // end namespace predictor
-}; // end namespace stage_1_ifetch
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_port.cpp	(revision 15)
+++ 	(revision )
@@ -1,58 +1,0 @@
-#ifdef VHDL_TESTBENCH
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace stage_1_ifetch {
-namespace predictor {
-namespace meta_predictor {
-namespace two_level_branch_predictor {
-
-
-  void Two_Level_Branch_Predictor::vhdl_testbench_port ()
-  {
-    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_port","Begin");
-
-    _vhdl_testbench->set_port (" in_NRESET", IN, 1);
-
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	_vhdl_testbench->set_port (" in_PREDICT_VAL_"        +toString(i), IN, 1);
-	_vhdl_testbench->set_port ("out_PREDICT_ACK_"        +toString(i),OUT, 1);
-	_vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"    +toString(i), IN,_param._size_address);
-	if (_param._have_bht)
-	_vhdl_testbench->set_port ("out_PREDICT_BHT_HISTORY_"+toString(i),OUT,_param._bht_size_shifter);
-	if (_param._have_pht)
-    	_vhdl_testbench->set_port ("out_PREDICT_PHT_HISTORY_"+toString(i),OUT,_param._pht_size_counter);
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_VAL_"        +toString(i), IN, 1);
-	_vhdl_testbench->set_port ("out_BRANCH_COMPLETE_ACK_"        +toString(i),OUT, 1);
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_ADDRESS_"    +toString(i), IN,_param._size_address);
-	if (_param._have_bht)
-    	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i), IN,_param._bht_size_shifter);
-	if (_param._have_pht)
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PHT_HISTORY_"+toString(i), IN,_param._pht_size_counter);
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_DIRECTION_"  +toString(i), IN, 1);
-      }
-
-    log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_port","End");
-  };
-
-}; // end namespace two_level_branch_predictor
-}; // end namespace meta_predictor
-}; // end namespace predictor
-}; // end namespace stage_1_ifetch
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp	(revision 15)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_vhdl_testbench_transition.cpp	(revision 42)
@@ -21,49 +21,7 @@
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","Begin");
 
-#ifndef SYSTEMCASS_SPECIFIC
-    sc_cycle(0);
-#endif    
+    sc_start(0);
 
-    _vhdl_testbench->add_input (PORT_READ( in_NRESET));
-    
-    // In order with file Two_Level_Branch_Predictor_vhdl_testbench_port.cpp
-    // Warning : if a output depend of a subcomponent, take directly the port of subcomponent
-    // (because we have no control on the ordonnancer's policy)
-
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	_vhdl_testbench->add_input (PORT_READ( in_PREDICT_VAL                          [i]));
-	_vhdl_testbench->add_output(PORT_READ(component_Two_Level_Branch_Predictor_Glue->
-					      out_PREDICT_ACK                          [i]));
-	_vhdl_testbench->add_input (PORT_READ( in_PREDICT_ADDRESS                      [i]));
-	if (_param._have_bht)
-	_vhdl_testbench->add_output(PORT_READ(component_Branch_History_Table           ->
-					      component_RegisterFile                   ->
-					      out_READ_DATA                            [i]));
-	if (_param._have_pht)
-	_vhdl_testbench->add_output(PORT_READ(component_Pattern_History_Table          ->
-					      component_RegisterFile                   ->
-					      out_READ_DATA                            [i]));
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	_vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_VAL                  [i]));
-	_vhdl_testbench->add_output(PORT_READ(component_Two_Level_Branch_Predictor_Glue->
-					      out_BRANCH_COMPLETE_ACK                  [i]));
-	_vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_ADDRESS              [i]));
-	if (_param._have_bht)
-	_vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_BHT_HISTORY          [i]));
-	if (_param._have_pht)
-	_vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_PHT_HISTORY          [i]));
-	_vhdl_testbench->add_input (PORT_READ( in_BRANCH_COMPLETE_DIRECTION            [i]));
-      }
-    
-    // add_test :
-    //  - True  : the cycle must be compare with the output of systemC
-    //  - False : no test
-    _vhdl_testbench->add_test(true);
-
-    _vhdl_testbench->new_cycle (); // always at the end
+    _interfaces->testbench();
 
     log_printf(FUNC,Two_Level_Branch_Predictor,"vhdl_testbench_transition","End");
