Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/SelfTest/src/test.cpp	(revision 42)
@@ -44,4 +44,5 @@
    *********************************************************************/
   sc_clock                                 CLOCK ("clock", 1.0, 0.5);
+  sc_signal<Tcontrol_t>                    NRESET;
 
   sc_signal<Tcontrol_t>                    PREDICT_BHT_ACK             [param._nb_prediction];
@@ -68,7 +69,6 @@
   cout << "<" << name << "> Instanciation of _Two_Level_Branch_Predictor_Glue" << endl;
   
-#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
   (*(_Two_Level_Branch_Predictor_Glue->in_CLOCK))        (CLOCK);
-#endif
+  (*(_Two_Level_Branch_Predictor_Glue->in_NRESET))       (NRESET);
 
   for (uint32_t i=0; i<param._nb_prediction; i++)
@@ -125,15 +125,13 @@
 
   sc_start(0);
-  _Two_Level_Branch_Predictor_Glue->vhdl_testbench_label("Initialisation");
+
   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
 
-
-  _Two_Level_Branch_Predictor_Glue->vhdl_testbench_label("Test ack");
+  NRESET.write(1);
+
   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Test ack" << endl;
 
   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     {
-      _Two_Level_Branch_Predictor_Glue->vhdl_testbench_label("Iteration "+toString(iteration));
-
       // Branch History Table
       if (param._have_bht)
@@ -191,11 +189,8 @@
 
 
-  _Two_Level_Branch_Predictor_Glue->vhdl_testbench_label("Test address");
   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Test address" << endl;
 
   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     {
-      _Two_Level_Branch_Predictor_Glue->vhdl_testbench_label("Iteration "+toString(iteration));
-      
       predict_address             = rand()%(1<<param._size_address    );
       predict_bht_history         = 0;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h	(revision 42)
@@ -25,7 +25,5 @@
 #include "Behavioural/include/Vhdl.h"
 #endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
-#endif
+#include "Behavioural/include/Component.h"
 
 using namespace std;
@@ -58,7 +56,6 @@
 #endif
 
-#ifdef VHDL_TESTBENCH
-  private   : Vhdl_Testbench                 * _vhdl_testbench;
-#endif
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
 
 #ifdef SYSTEMC
@@ -66,4 +63,5 @@
     // Interface
   public    : SC_CLOCK                      *  in_CLOCK                      ;
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET                     ;
 
   public    : SC_IN (Tcontrol_t)           **  in_PREDICT_BHT_ACK            ;
@@ -129,17 +127,13 @@
   public  : string   statistics                (uint32_t depth);
 #endif
-					       
 #if VHDL				       
   public  : void     vhdl                      (void);
-  private : void     vhdl_port                 (Vhdl & vhdl);
-  private : void     vhdl_declaration          (Vhdl & vhdl);
-  private : void     vhdl_body                 (Vhdl & vhdl);
+  private : void     vhdl_port                 (Vhdl * & vhdl);
+  private : void     vhdl_declaration          (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
 #endif					       
-					       
 #ifdef VHDL_TESTBENCH			       
-  private : void     vhdl_testbench_port       (void);
   private : void     vhdl_testbench_transition (void);
 #endif
-  public  : void     vhdl_testbench_label      (string label);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 42)
@@ -34,4 +34,8 @@
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"Two_Level_Branch_Predictor_Glue","Begin");
 
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
 #ifdef STATISTICS
     // Allocation of statistics
@@ -41,13 +45,4 @@
 #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",false);
-#endif
-
 #ifdef VHDL
     // generate the vhdl
@@ -56,6 +51,4 @@
 
 #ifdef SYSTEMC
-    allocation ();
-
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
     SC_METHOD (transition);
@@ -192,10 +185,4 @@
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"~Two_Level_Branch_Predictor_Glue","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/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_allocation.cpp	(revision 42)
@@ -24,8 +24,30 @@
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"allocation","Begin");
 
-#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
-    in_CLOCK  = new SC_CLOCK           ("in_CLOCK");
+    _component   = new Component ();
+
+    Entity * entity = _component->set_entity (_name                 
+					     ,"Two_Level_Branch_Predictor_Glue"
+#ifdef POSITION
+					     ,COMBINATORY
 #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,CLOCK_VHDL_NO);
+      in_NRESET             = interface->set_signal_in  <Tcontrol_t> ("nreset",1,RESET_VHDL_NO);
+    }
+    
+    // ~~~~~[ Interface : "Predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     if (_param._have_bht)
       {
@@ -45,31 +67,29 @@
     for (uint32_t i=0; i<_param._nb_prediction; i++)
       {
+	Interface_fifo * interface = _interfaces->set_interface("predict_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, WEST
+								, "Interface Predict"
+#endif
+								);
+
 	if (_param._have_bht)
 	  {
-	rename = " in_PREDICT_BHT_ACK_"    +toString(i);
-         in_PREDICT_BHT_ACK             [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-
-	rename = "out_PREDICT_BHT_ADDRESS_"+toString(i);
-        out_PREDICT_BHT_ADDRESS         [i] = new SC_OUT(Taddress_t)     (rename.c_str());
+         in_PREDICT_BHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("bht_ack"    ,1);
+        out_PREDICT_BHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("bht_address",_param._bht_size_address);
 	  }
 	if (_param._have_pht)
 	  {
-        rename = " in_PREDICT_PHT_ACK_"    +toString(i);
-         in_PREDICT_PHT_ACK             [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-        
-	rename = "out_PREDICT_PHT_ADDRESS_"+toString(i);
-        out_PREDICT_PHT_ADDRESS         [i] = new SC_OUT(Taddress_t)     (rename.c_str());
+         in_PREDICT_PHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("pht_ack"    ,1);
+        out_PREDICT_PHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("pht_address",_param._pht_size_address);
 	  }
 	if (_param._have_bht and _param._have_pht)
-	  {
-	rename = " in_PREDICT_BHT_HISTORY_"+toString(i);
-         in_PREDICT_BHT_HISTORY         [i] = new SC_IN (Tbht_history_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());
+         in_PREDICT_BHT_HISTORY         [i] = interface->set_signal_in  <Tbht_history_t> ("bht_history",_param._bht_size_history);
+        out_PREDICT_ACK                 [i] = interface->set_signal_out <Tcontrol_t>     ("ack"        ,1);
+         in_PREDICT_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address"    ,_param._size_address);
       }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
     if (_param._have_bht)
@@ -91,33 +111,33 @@
     for (uint32_t i=0; i<_param._nb_branch_complete; i++)
       {
+	Interface_fifo * interface = _interfaces->set_interface("branch_complete_"+toString(i)
+#ifdef POSITION
+								, IN  
+								, EAST
+								, "Interface branch complete"
+#endif
+								);
 	if (_param._have_bht)
 	  {
-	rename = " in_BRANCH_COMPLETE_BHT_ACK_"    +toString(i);
-         in_BRANCH_COMPLETE_BHT_ACK             [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-        
-        rename = "out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i);
-        out_BRANCH_COMPLETE_BHT_ADDRESS         [i] = new SC_OUT(Taddress_t)     (rename.c_str());
+         in_BRANCH_COMPLETE_BHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("bht_ack"    ,1);
+        out_BRANCH_COMPLETE_BHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("bht_address",_param._bht_size_address);
 	  }
 	if (_param._have_pht)
 	  {
-        rename = " in_BRANCH_COMPLETE_PHT_ACK_"    +toString(i);
-         in_BRANCH_COMPLETE_PHT_ACK             [i] = new SC_IN (Tcontrol_t)     (rename.c_str());
-
-        rename = "out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i);
-        out_BRANCH_COMPLETE_PHT_ADDRESS         [i] = new SC_OUT(Taddress_t)     (rename.c_str());
+         in_BRANCH_COMPLETE_PHT_ACK             [i] = interface->set_signal_in  <Tcontrol_t>     ("pht_ack"    ,1);
+        out_BRANCH_COMPLETE_PHT_ADDRESS         [i] = interface->set_signal_out <Taddress_t>     ("pht_address",_param._pht_size_address);
 	  }
 	if (_param._have_bht and _param._have_pht)
-	  {
-        rename = " in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i);
-         in_BRANCH_COMPLETE_BHT_HISTORY         [i] = new SC_IN (Tbht_history_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_BHT_HISTORY         [i] = interface->set_signal_in  <Tbht_history_t> ("bht_history",_param._bht_size_history);
+
+        out_BRANCH_COMPLETE_ACK                 [i] = interface->set_signal_out <Tcontrol_t>     ("ack"        ,1);
+         in_BRANCH_COMPLETE_ADDRESS             [i] = interface->set_signal_in  <Taddress_t>     ("address"    ,_param._size_address);
       }
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+#ifdef POSITION
+    _component->generate_file();
+#endif
 
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"allocation","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_deallocation.cpp	(revision 42)
@@ -22,72 +22,40 @@
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","Begin");
 
-    delete in_CLOCK;
+    delete     in_CLOCK;
+    delete     in_NRESET;
 
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	if (_param._have_bht)
-	  {
-        delete  in_PREDICT_BHT_ACK             [i];
-        delete out_PREDICT_BHT_ADDRESS         [i];
-	  }
-	if (_param._have_pht)
-	  {
-        delete  in_PREDICT_PHT_ACK             [i];
-        delete out_PREDICT_PHT_ADDRESS         [i];
-	  }
-	if (_param._have_bht and _param._have_pht)
-        delete  in_PREDICT_BHT_HISTORY         [i];
-        delete out_PREDICT_ACK                 [i];
-        delete  in_PREDICT_ADDRESS             [i];
-      }
     if (_param._have_bht)
       {
-    delete  in_PREDICT_BHT_ACK    ;
-    delete out_PREDICT_BHT_ADDRESS;
+    delete []  in_PREDICT_BHT_ACK    ;
+    delete [] out_PREDICT_BHT_ADDRESS;
       }
     if (_param._have_pht)
       {
-    delete  in_PREDICT_PHT_ACK    ;
-    delete out_PREDICT_PHT_ADDRESS;
+    delete []  in_PREDICT_PHT_ACK    ;
+    delete [] out_PREDICT_PHT_ADDRESS;
       }
     if (_param._have_bht and _param._have_pht)
-    delete  in_PREDICT_BHT_HISTORY;
+    delete []  in_PREDICT_BHT_HISTORY;
     
-    delete out_PREDICT_ACK        ;
-    delete  in_PREDICT_ADDRESS    ;
+    delete [] out_PREDICT_ACK        ;
+    delete []  in_PREDICT_ADDRESS    ;
 
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	if (_param._have_bht)
-	  {
-        delete  in_BRANCH_COMPLETE_BHT_ACK             [i];
-        delete out_BRANCH_COMPLETE_BHT_ADDRESS         [i];
-	  }
-	if (_param._have_pht)
-	  {
-        delete  in_BRANCH_COMPLETE_PHT_ACK             [i];
-        delete out_BRANCH_COMPLETE_PHT_ADDRESS         [i];
-	  }
-	if (_param._have_bht and _param._have_pht)
-	delete  in_BRANCH_COMPLETE_BHT_HISTORY         [i];
-        delete out_BRANCH_COMPLETE_ACK                 [i];
-        delete  in_BRANCH_COMPLETE_ADDRESS             [i];
-      }
     if (_param._have_bht)
       {
-    delete  in_BRANCH_COMPLETE_BHT_ACK    ;
-    delete out_BRANCH_COMPLETE_BHT_ADDRESS;
+    delete []  in_BRANCH_COMPLETE_BHT_ACK    ;
+    delete [] out_BRANCH_COMPLETE_BHT_ADDRESS;
       }
     if (_param._have_pht)
       {
-    delete  in_BRANCH_COMPLETE_PHT_ACK    ;
-    delete out_BRANCH_COMPLETE_PHT_ADDRESS;
+    delete []  in_BRANCH_COMPLETE_PHT_ACK    ;
+    delete [] out_BRANCH_COMPLETE_PHT_ADDRESS;
       }
     if (_param._have_bht and _param._have_pht)
-    delete  in_BRANCH_COMPLETE_BHT_HISTORY;
-    delete out_BRANCH_COMPLETE_ACK        ;
-    delete  in_BRANCH_COMPLETE_ADDRESS    ;
+    delete []  in_BRANCH_COMPLETE_BHT_HISTORY;
+    delete [] out_BRANCH_COMPLETE_ACK        ;
+    delete []  in_BRANCH_COMPLETE_ADDRESS    ;
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+    delete _component;
 
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"deallocation","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl.cpp	(revision 42)
@@ -22,7 +22,8 @@
   {
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl","Begin");
-    Vhdl vhdl (_name);
+    
+    Vhdl * vhdl = new Vhdl (_name);
 
-    vhdl.set_library_work (_name + "_Pack");
+    vhdl->set_library_work (_name + "_Pack");
 
     vhdl_port        (vhdl);
@@ -30,5 +31,8 @@
     vhdl_body        (vhdl);
 
-    vhdl.generate_file();
+    vhdl->generate_file();
+
+    delete vhdl;
+
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl","End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_body.cpp	(revision 42)
@@ -18,9 +18,9 @@
 
 
-  void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor_Glue::vhdl_body (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_body","Begin");
 
-    vhdl.set_body ("-- ack output");
+    vhdl->set_body ("-- ack output");
     for (uint32_t i=0; i<_param._nb_prediction; i++)
       {
@@ -28,14 +28,14 @@
 
 	if (_param._have_bht)
-	  bht_ack = "in_PREDICT_BHT_ACK_"+toString(i);
+	  bht_ack = "in_PREDICT_"+toString(i)+"_BHT_ACK";
 	else
 	  bht_ack = "'1'";
 
 	if (_param._have_pht)
-	  pht_ack = "in_PREDICT_PHT_ACK_"+toString(i);
+	  pht_ack = "in_PREDICT_"+toString(i)+"_PHT_ACK";
 	else
 	  pht_ack = "'1'";
 
-	vhdl.set_body ("out_PREDICT_ACK_"+toString(i)+"         <= "+bht_ack+" and "+pht_ack+";");
+	vhdl->set_body ("out_PREDICT_"+toString(i)+"_ACK         <= "+bht_ack+" and "+pht_ack+";");
       }
 
@@ -45,18 +45,18 @@
 
 	if (_param._have_bht)
-	  bht_ack = "in_BRANCH_COMPLETE_BHT_ACK_"+toString(i);
+	  bht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_BHT_ACK";
 	else
 	  bht_ack = "'1'";
 
 	if (_param._have_pht)
-	  pht_ack = "in_BRANCH_COMPLETE_PHT_ACK_"+toString(i);
+	  pht_ack = "in_BRANCH_COMPLETE_"+toString(i)+"_PHT_ACK";
 	else
 	  pht_ack = "'1'";
 
-	vhdl.set_body ("out_BRANCH_COMPLETE_ACK_"+toString(i)+" <= "+bht_ack+" and "+pht_ack+";");
+	vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_ACK <= "+bht_ack+" and "+pht_ack+";");
       }
     
-    vhdl.set_body ("");
-    vhdl.set_body ("-- address output");
+    vhdl->set_body ("");
+    vhdl->set_body ("-- address output");
 
     for (uint32_t i=0; i<_param._nb_prediction; i++)
@@ -64,5 +64,5 @@
 	// The address is higher than the address size of bht
 	if (_param._have_bht)
-	  vhdl.set_body ("out_PREDICT_BHT_ADDRESS_"+toString(i)+" <= in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");
+	  vhdl->set_body ("out_PREDICT_"+toString(i)+"_BHT_ADDRESS <= in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
 
 	if (_param._have_pht)
@@ -93,5 +93,5 @@
 		  {
 		    min = _param._pht_size_address_shift;
-		    vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <=  in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");
+		    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
 		  }
 
@@ -99,13 +99,13 @@
 		  {
 		    max = _param._bht_size_history;
-		    vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
+		    vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
 		  }
 		
 		// intersection
 		if (_param._pht_size_address_share > 0)
-		  vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");
+		  vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_PREDICT_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
 	      }
 	    else
-	      vhdl.set_body ("out_PREDICT_PHT_ADDRESS_"+toString(i)+" <=  in_PREDICT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");
+	      vhdl->set_body ("out_PREDICT_"+toString(i)+"_PHT_ADDRESS <=  in_PREDICT_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
 	  }
       }
@@ -115,5 +115,5 @@
 	// The address is higher than the address size of bht
 	if (_param._have_bht)
-	  vhdl.set_body ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i)+" <= in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._bht_size_address)+";");
+	  vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_BHT_ADDRESS <= in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._bht_size_address)+";");
 
 	if (_param._have_pht)
@@ -129,5 +129,5 @@
 		  {
 		    min = _param._pht_size_address_shift;
-		    vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(min) + " <=  in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(min)+";");
+		    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(min)+";");
 		  }
 
@@ -135,13 +135,13 @@
 		  {
 		    max = _param._bht_size_history;
-		    vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1,max) + " <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
+		    vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(_param._pht_size_address-1,max) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address-1-_param._pht_size_address_shift, _param._pht_size_address_share)+";");
 		  }
 		
 		// intersection
 		if (_param._pht_size_address_share > 0)
-		  vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+std_logic_range(max-1,min) + " <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i)+std_logic_range(max-1,min)+";");
+		  vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS"+std_logic_range(max-1,min) + " <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address_share-1,0)+" xor in_BRANCH_COMPLETE_"+toString(i)+"_BHT_HISTORY"+std_logic_range(max-1,min)+";");
 	      }
 	    else
-	      vhdl.set_body ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i)+" <=  in_BRANCH_COMPLETE_ADDRESS_"+toString(i)+std_logic_range(_param._pht_size_address)+";");
+	      vhdl->set_body ("out_BRANCH_COMPLETE_"+toString(i)+"_PHT_ADDRESS <=  in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"+std_logic_range(_param._pht_size_address)+";");
 	  }
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_declaration.cpp	(revision 42)
@@ -18,5 +18,5 @@
 
 
-  void Two_Level_Branch_Predictor_Glue::vhdl_declaration (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor_Glue::vhdl_declaration (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_declaration","Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp	(revision 42)
@@ -18,44 +18,9 @@
 
 
-  void Two_Level_Branch_Predictor_Glue::vhdl_port (Vhdl & vhdl)
+  void Two_Level_Branch_Predictor_Glue::vhdl_port (Vhdl * & vhdl)
   {
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_port","Begin");
 
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	if (_param._have_bht)
-	  {
-	vhdl.set_port (" in_PREDICT_BHT_ACK_"    +toString(i), IN, 1);
-	vhdl.set_port ("out_PREDICT_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
-	  }
-	if (_param._have_bht and _param._have_pht)
-	vhdl.set_port (" in_PREDICT_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
-	if (_param._have_pht)
-	  {
-        vhdl.set_port (" in_PREDICT_PHT_ACK_"    +toString(i), IN, 1);
-	vhdl.set_port ("out_PREDICT_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
-	  }
-	
-        vhdl.set_port ("out_PREDICT_ACK_"        +toString(i),OUT, 1);
-        vhdl.set_port (" in_PREDICT_ADDRESS_"    +toString(i), IN,_param._size_address);
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	if (_param._have_bht)
-	  {
-	vhdl.set_port (" in_BRANCH_COMPLETE_BHT_ACK_"    +toString(i), IN, 1);
-        vhdl.set_port ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
-	  }
-	if (_param._have_bht and _param._have_pht)
-	vhdl.set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
-        if (_param._have_pht)
-	  {
-        vhdl.set_port (" in_BRANCH_COMPLETE_PHT_ACK_"    +toString(i), IN, 1);
-        vhdl.set_port ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
-	  }
-        vhdl.set_port ("out_BRANCH_COMPLETE_ACK_"        +toString(i),OUT, 1);
-        vhdl.set_port (" in_BRANCH_COMPLETE_ADDRESS_"    +toString(i), IN,_param._size_address);
-      }
+    _interfaces->set_port(vhdl);
 
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_port","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_label.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_label.cpp	(revision 23)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace stage_1_ifetch {
-namespace predictor {
-namespace meta_predictor {
-namespace two_level_branch_predictor {
-namespace two_level_branch_predictor_glue {
-
-
-  void Two_Level_Branch_Predictor_Glue::vhdl_testbench_label (string label)
-  {
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench->add_label(label);
-#endif
-  };
-
-}; // end namespace two_level_branch_predictor_glue
-}; // 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/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_port.cpp	(revision 23)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#ifdef VHDL_TESTBENCH
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/include/Two_Level_Branch_Predictor_Glue.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace stage_1_ifetch {
-namespace predictor {
-namespace meta_predictor {
-namespace two_level_branch_predictor {
-namespace two_level_branch_predictor_glue {
-
-
-  void Two_Level_Branch_Predictor_Glue::vhdl_testbench_port ()
-  {
-    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_port","Begin");
-
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	if (_param._have_bht)
-	  {
-	_vhdl_testbench->set_port (" in_PREDICT_BHT_ACK_"    +toString(i), IN, 1);
-	_vhdl_testbench->set_port ("out_PREDICT_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
-	  }
-	if (_param._have_bht and _param._have_pht)
-	_vhdl_testbench->set_port (" in_PREDICT_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
-	if (_param._have_pht)
-	  {
-        _vhdl_testbench->set_port (" in_PREDICT_PHT_ACK_"    +toString(i), IN, 1);
-	_vhdl_testbench->set_port ("out_PREDICT_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
-	  }
-        _vhdl_testbench->set_port ("out_PREDICT_ACK_"        +toString(i),OUT, 1);
-        _vhdl_testbench->set_port (" in_PREDICT_ADDRESS_"    +toString(i), IN,_param._size_address);
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	if (_param._have_bht)
-	  {
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_ACK_"    +toString(i), IN, 1);
-        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_BHT_ADDRESS_"+toString(i),OUT,_param._bht_size_address);
-	  }
-	if (_param._have_bht and _param._have_pht)
-	_vhdl_testbench->set_port (" in_BRANCH_COMPLETE_BHT_HISTORY_"+toString(i), IN,_param._bht_size_history);
-        if (_param._have_pht)
-	  {
-        _vhdl_testbench->set_port (" in_BRANCH_COMPLETE_PHT_ACK_"    +toString(i), IN, 1);
-        _vhdl_testbench->set_port ("out_BRANCH_COMPLETE_PHT_ADDRESS_"+toString(i),OUT,_param._pht_size_address);
-	  }
-        _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);
-      }
-
-    log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_port","End");
-  };
-
-}; // end namespace two_level_branch_predictor_glue
-}; // 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/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_testbench_transition.cpp	(revision 42)
@@ -22,54 +22,7 @@
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_testbench_transition","Begin");
 
-#ifndef SYSTEMCASS_SPECIFIC
-    sc_cycle(0);
-#endif    
+    sc_start(0);
 
-    // In order with file Two_Level_Branch_Predictor_Glue_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)
-
-//     _vhdl_testbench->add_input (PORT_READ( in_NRESET));
-    for (uint32_t i=0; i<_param._nb_prediction; i++)
-      {
-	if (_param._have_bht)
-	  {
-	_vhdl_testbench->add_input  (PORT_READ( in_PREDICT_BHT_ACK      [i]));
-	_vhdl_testbench->add_output (PORT_READ(out_PREDICT_BHT_ADDRESS  [i]));
-	  }
-	if (_param._have_bht and _param._have_pht)
-	_vhdl_testbench->add_input  (PORT_READ( in_PREDICT_BHT_HISTORY  [i]));
-	if (_param._have_pht)
-	  {
-        _vhdl_testbench->add_input  (PORT_READ( in_PREDICT_PHT_ACK      [i]));
-	_vhdl_testbench->add_output (PORT_READ(out_PREDICT_PHT_ADDRESS  [i]));
-	  }
-        _vhdl_testbench->add_output (PORT_READ(out_PREDICT_ACK          [i]));
-        _vhdl_testbench->add_input  (PORT_READ( in_PREDICT_ADDRESS      [i]));
-      }
-
-    for (uint32_t i=0; i<_param._nb_branch_complete; i++)
-      {
-	if (_param._have_bht)
-	  {
-	_vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_BHT_ACK      [i]));
-        _vhdl_testbench->add_output (PORT_READ(out_BRANCH_COMPLETE_BHT_ADDRESS  [i]));
-	  }
-	if (_param._have_bht and _param._have_pht)
-	_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_ACK      [i]));
-        _vhdl_testbench->add_output (PORT_READ(out_BRANCH_COMPLETE_PHT_ADDRESS  [i]));
-	  }
-        _vhdl_testbench->add_output (PORT_READ(out_BRANCH_COMPLETE_ACK          [i]));
-        _vhdl_testbench->add_input  (PORT_READ( in_BRANCH_COMPLETE_ADDRESS      [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_Glue,"vhdl_testbench_transition","End");
