Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/SelfTest/src/test.cpp	(revision 42)
@@ -43,4 +43,5 @@
    *********************************************************************/
   sc_clock                                 CLOCK ("clock", 1.0, 0.5);
+  sc_signal<Tcontrol_t>                    RESET;
   sc_signal<Tdata_t>                       DATA_IN  [param._nb_port];
   sc_signal<Tcontrol_t>                    ADDSUB   [param._nb_port];
@@ -53,7 +54,6 @@
   cout << "<" << name << "> Instanciation of _Counter" << endl;
  
- #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
   (*(_Counter->in_CLOCK))        (CLOCK);
-#endif
+  (*(_Counter->in_NRESET))       (RESET);
 
   for (uint32_t i=0; i<param._nb_port; i++)
@@ -79,13 +79,13 @@
 
   sc_start(0);
-  _Counter->vhdl_testbench_label("Initialisation");
+
+  RESET.write(1);
+
   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
 
-  _Counter->vhdl_testbench_label("Loop of Test");
   cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Loop of Test" << endl;
 
   for (uint32_t iteration=0; iteration<NB_ITERATION; iteration ++)
     {
-      _Counter->vhdl_testbench_label("Iteration "+toString(iteration));
       cout << "{" << static_cast<uint32_t>(sc_simulation_time()) << "} Itération " << iteration << endl;
       for (uint32_t i=0; i<param._nb_port; i++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/include/Counter.h	(revision 42)
@@ -25,15 +25,12 @@
 #include "Behavioural/include/Vhdl.h"
 #endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
-#endif
+#include "Behavioural/include/Component.h"
 
 using namespace std;
 
-namespace morpheo                    {
+namespace morpheo {
 namespace behavioural {
 namespace generic {
 namespace counter {
-
 
   class Counter 
@@ -55,7 +52,6 @@
 #endif
 
-#ifdef VHDL_TESTBENCH
-  private   : Vhdl_Testbench                 * _vhdl_testbench;
-#endif
+  public    : Component                      * _component;
+  private   : Interfaces                     * _interfaces;
 
 #ifdef SYSTEMC
@@ -63,5 +59,5 @@
     // Interface
   public    : SC_CLOCK                      *  in_CLOCK        ;
-
+  public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
   public    : SC_IN (Tdata_t)              **  in_COUNTER_DATA         ;
   public    : SC_IN (Tcontrol_t)           **  in_COUNTER_ADDSUB       ;
@@ -107,14 +103,12 @@
 #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/Generic/Counter/src/Counter.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter.cpp	(revision 42)
@@ -31,4 +31,8 @@
     log_printf(FUNC,Counter,"Counter","Begin");
 
+#ifdef SYSTEMC
+    allocation ();
+#endif
+
 #ifdef STATISTICS
     // Allocation of statistics
@@ -36,13 +40,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",false);
 #endif
 
@@ -53,6 +48,4 @@
 
 #ifdef SYSTEMC
-    allocation ();
-
     SC_METHOD (transition);
     dont_initialize ();
@@ -85,10 +78,4 @@
 #endif
 
-#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/Generic/Counter/src/Counter_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_allocation.cpp	(revision 42)
@@ -21,23 +21,53 @@
     log_printf(FUNC,Counter,"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     
+					     ,"Counter"  
+#ifdef POSITION
+					     ,COMBINATORY
 #endif
+					      );
+    
+    _interfaces = entity->set_interfaces();
 
-     in_COUNTER_DATA  = new SC_IN (Tdata_t)    * [_param._nb_port];
-     in_COUNTER_ADDSUB= new SC_IN (Tcontrol_t) * [_param._nb_port];
-    out_COUNTER_DATA  = new SC_OUT(Tdata_t)    * [_param._nb_port];
-    
-    for (uint32_t i=0; i<_param._nb_port; i++)
-      {
-	rename = " in_COUNTER_DATA_" +toString(i);
-	 in_COUNTER_DATA  [i] = new SC_IN (Tdata_t)    (rename.c_str());
+    // ~~~~~[ 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);
+    }
 
-	rename = " in_COUNTER_ADDSUB_"+toString(i);
-	 in_COUNTER_ADDSUB[i] = new SC_IN (Tcontrol_t) (rename.c_str());
-
-	rename = "out_COUNTER_DATA_" +toString(i);
-	out_COUNTER_DATA  [i] = new SC_OUT(Tdata_t)    (rename.c_str());
-      }
+    // ~~~~~[ Interface : "counter" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     {
+        in_COUNTER_DATA  = new SC_IN (Tdata_t)    * [_param._nb_port];
+        in_COUNTER_ADDSUB= new SC_IN (Tcontrol_t) * [_param._nb_port];
+       out_COUNTER_DATA  = new SC_OUT(Tdata_t)    * [_param._nb_port];
+       
+       for (uint32_t i=0; i<_param._nb_port; i++)
+	 {
+	   Interface_fifo * interface = _interfaces->set_interface("counter_"+toString(i)
+#ifdef POSITION
+								   , IN  
+								   , SOUTH
+								   , "Counter interface"
+#endif
+								   );
+	   
+	    in_COUNTER_DATA   [i] = interface->set_signal_in  <Tdata_t   > ("data"  , _param._size_data);
+	    in_COUNTER_ADDSUB [i] = interface->set_signal_in  <Tcontrol_t> ("addsub", 1                );
+	   out_COUNTER_DATA   [i] = interface->set_signal_out <Tdata_t   > ("data"  , _param._size_data);
+	 }
+     }
+#ifdef POSITION
+    _component->generate_file();
+#endif
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_deallocation.cpp	(revision 42)
@@ -19,19 +19,14 @@
     log_printf(FUNC,Counter,"deallocation","Begin");
 
-#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
-    delete in_CLOCK;
-#endif
+    delete     in_CLOCK;
+    delete     in_NRESET;
     
-    for (uint32_t i=0; i<_param._nb_port; i++)
-      {
-	delete  in_COUNTER_DATA  [i];
-	delete  in_COUNTER_ADDSUB[i];
-	delete out_COUNTER_DATA  [i];
-      }
-    delete  in_COUNTER_DATA  ;
-    delete  in_COUNTER_ADDSUB;
-    delete out_COUNTER_DATA  ;
+    delete []  in_COUNTER_DATA  ;
+    delete []  in_COUNTER_ADDSUB;
+    delete [] out_COUNTER_DATA  ;
     
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+    delete _component;
 
     log_printf(FUNC,Counter,"deallocation","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_genMealy.cpp	(revision 42)
@@ -1,4 +1,3 @@
 #ifdef SYSTEMC
-#if defined(STATISTICS) or defined(VHDL_TESTBENCH)
 /*
  * $Id$
@@ -51,3 +50,2 @@
 }; // end namespace morpheo              
 #endif
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl.cpp	(revision 42)
@@ -19,7 +19,7 @@
   {
     log_printf(FUNC,Counter,"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);
@@ -27,5 +27,7 @@
     vhdl_body        (vhdl);
 
-    vhdl.generate_file();
+    vhdl->generate_file();
+
+    delete vhdl;
     log_printf(FUNC,Counter,"vhdl","End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_body.cpp	(revision 42)
@@ -14,9 +14,8 @@
 namespace counter {
 
-
-  void Counter::vhdl_body (Vhdl & vhdl)
+  void Counter::vhdl_body (Vhdl * & vhdl)
   {
     log_printf(FUNC,Counter,"vhdl_body","Begin");
-    vhdl.set_body ("");
+    vhdl->set_body ("");
     
     for (uint32_t i=0; i<_param._nb_port; i++)
@@ -26,23 +25,23 @@
 	if (_param._size_data > 1)
 	  {
-	    counter_inc = "in_COUNTER_DATA_"+toString(i)+"+1";
-	    counter_dec = "in_COUNTER_DATA_"+toString(i)+"-1";
+	    counter_inc = "in_COUNTER_"+toString(i)+"_DATA+1";
+	    counter_dec = "in_COUNTER_"+toString(i)+"_DATA-1";
 	  }
 	else
 	  {
-	    counter_inc = "in_COUNTER_DATA_"+toString(i)+"+1";
-	    counter_dec = "in_COUNTER_DATA_"+toString(i)+"-1";
+	    counter_inc = "in_COUNTER_"+toString(i)+"_DATA+1";
+	    counter_dec = "in_COUNTER_"+toString(i)+"_DATA-1";
 	  }
 
-	vhdl.set_body ("out_COUNTER_DATA_"+toString(i)+" <=");
+	vhdl->set_body ("out_COUNTER_"+toString(i)+"_DATA <=");
 	if (_param._size_data > 1)
 	  {
-	    vhdl.set_body ("\tin_COUNTER_DATA_"+toString(i)+"+1 when in_COUNTER_ADDSUB_"+toString(i)+" = '1' and in_COUNTER_DATA_"+toString(i)+" < cst_max else");
-	    vhdl.set_body ("\tin_COUNTER_DATA_"+toString(i)+"-1 when in_COUNTER_ADDSUB_"+toString(i)+" = '0' and in_COUNTER_DATA_"+toString(i)+" > cst_min else");
-	    vhdl.set_body ("\tin_COUNTER_DATA_"+toString(i)+";");
+	    vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA+1 when in_COUNTER_"+toString(i)+"_ADDSUB = '1' and in_COUNTER_"+toString(i)+"_DATA < cst_max else");
+	    vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA-1 when in_COUNTER_"+toString(i)+"_ADDSUB = '0' and in_COUNTER_"+toString(i)+"_DATA > cst_min else");
+	    vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_DATA;");
 	  }
 	else
 	  {
-	    vhdl.set_body ("\tin_COUNTER_ADDSUB_"+toString(i)+";");
+	    vhdl->set_body ("\tin_COUNTER_"+toString(i)+"_ADDSUB;");
 	  }
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_declaration.cpp	(revision 42)
@@ -15,5 +15,5 @@
 
 
-  void Counter::vhdl_declaration (Vhdl & vhdl)
+  void Counter::vhdl_declaration (Vhdl * & vhdl)
   {
     log_printf(FUNC,Counter,"vhdl_declaration","Begin");
@@ -21,6 +21,6 @@
     if (_param._size_data > 1)
       {
-	vhdl.set_constant ("cst_min",_param._size_data,std_logic_others(_param._size_data,0));
-	vhdl.set_constant ("cst_max",_param._size_data,std_logic_others(_param._size_data,1));
+	vhdl->set_constant ("cst_min",_param._size_data,std_logic_others(_param._size_data,0));
+	vhdl->set_constant ("cst_max",_param._size_data,std_logic_others(_param._size_data,1));
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_port.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_port.cpp	(revision 42)
@@ -15,15 +15,10 @@
 
 
-  void Counter::vhdl_port (Vhdl & vhdl)
+  void Counter::vhdl_port (Vhdl * & vhdl)
   {
     log_printf(FUNC,Counter,"vhdl_port","Begin");
 
-    for (uint32_t i=0; i<_param._nb_port; i++)
-      {
-	vhdl.set_port (" in_COUNTER_DATA_"  +toString(i), IN, _param._size_data);
-	vhdl.set_port (" in_COUNTER_ADDSUB_"+toString(i), IN, 1                );
-	vhdl.set_port ("out_COUNTER_DATA_"  +toString(i),OUT, _param._size_data);
-      }
-    
+    _interfaces->set_port(vhdl);
+
     log_printf(FUNC,Counter,"vhdl_port","End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_label.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_label.cpp	(revision 23)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Generic/Counter/include/Counter.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace generic {
-namespace counter {
-
-
-  void Counter::vhdl_testbench_label (string label)
-  {
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench->add_label(label);
-#endif
-  };
-
-}; // end namespace counter
-}; // end namespace generic
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_port.cpp	(revision 23)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#ifdef VHDL_TESTBENCH
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Generic/Counter/include/Counter.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace generic {
-namespace counter {
-
-
-  void Counter::vhdl_testbench_port ()
-  {
-    log_printf(FUNC,Counter,"vhdl_testbench_port","Begin");
-    for (uint32_t i=0; i<_param._nb_port; i++)
-      {
-	_vhdl_testbench->set_port (" in_COUNTER_DATA_"  +toString(i), IN, _param._size_data);
-	_vhdl_testbench->set_port (" in_COUNTER_ADDSUB_"+toString(i), IN, 1);
-	_vhdl_testbench->set_port ("out_COUNTER_DATA_"  +toString(i),OUT, _param._size_data);
-      }
-
-    log_printf(FUNC,Counter,"vhdl_testbench_port","End");
-  };
-
-}; // end namespace counter
-}; // end namespace generic
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_transition.cpp	(revision 23)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Counter/src/Counter_vhdl_testbench_transition.cpp	(revision 42)
@@ -21,21 +21,5 @@
     sc_start(0);
 
-    // In order with file Counter_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_port; i++)
-      {
-	_vhdl_testbench->add_input (PORT_READ( in_COUNTER_DATA  [i]));
-	_vhdl_testbench->add_input (PORT_READ( in_COUNTER_ADDSUB[i]));
-	_vhdl_testbench->add_output(PORT_READ(out_COUNTER_DATA  [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,Counter,"vhdl_testbench_transition","End");
