Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h	(revision 41)
@@ -23,9 +23,11 @@
 #include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/Statistics.h"
 #endif
+#ifdef POSITION
+#include "Behavioural/include/Position.h"
+#else
+#include "Behavioural/include/Interfaces.h"
+#endif
 #ifdef VHDL
 #include "Behavioural/include/Vhdl.h"
-#endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
 #endif
 
@@ -55,7 +57,9 @@
 #endif
 
-#ifdef VHDL_TESTBENCH
-  private   : Vhdl_Testbench                 * _vhdl_testbench;
+#ifdef POSITION
+  private   : Position                       * _position;
 #endif
+
+  private   : Interfaces                     * _interfaces;
 
 #ifdef SYSTEMC
@@ -63,5 +67,5 @@
     // Interface
   public    : SC_CLOCK                      *  in_CLOCK        ;
-  public    : SC_CLOCK                      *  in_NRESET       ;
+  public    : SC_IN       (Tcontrol_t)      *  in_NRESET       ;
 
     // ----- Interface Read
@@ -117,14 +121,12 @@
 #if VHDL				       
   private : void     vhdl                      (void);
-  private : void     vhdl_port                 (Vhdl & vhdl);
-  private : void     vhdl_type                 (Vhdl & vhdl);
-  private : void     vhdl_signal               (Vhdl & vhdl);
-  private : void     vhdl_body                 (Vhdl & vhdl);
+  private : void     vhdl_port                 (Vhdl * & vhdl);
+  private : void     vhdl_type                 (Vhdl * & vhdl);
+  private : void     vhdl_signal               (Vhdl * & vhdl);
+  private : void     vhdl_body                 (Vhdl * & vhdl);
 #endif					       
 					       
 #ifdef VHDL_TESTBENCH			       
-  private : void     vhdl_testbench            (Vhdl_Testbench & vhdl_testbench);
-  private : void     vhdl_testbench_port       (Vhdl_Testbench & vhdl_testbench);
-  private : void     vhdl_testbench_transition (Vhdl_Testbench & vhdl_testbench);
+  private : void     vhdl_testbench_transition (void);
 #endif
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic.cpp	(revision 41)
@@ -27,14 +27,16 @@
     _param (param)
   {
+    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","Begin");
+
+#ifdef SYSTEMC
+    log_printf(INFO,RegisterFile_Monolithic,"RegisterFile_Monolithic","Allocation");
+
+    allocation ();
+#endif
+
 #ifdef STATISTICS
     _stat = new Statistics (static_cast<string>(_name),
 			    param_statistics          ,
 			    param);
-#endif
-
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench = new Vhdl_Testbench (_name);
-    vhdl_testbench_port           (*_vhdl_testbench);
-    _vhdl_testbench->set_clock    ("in_CLOCK",true);
 #endif
 
@@ -45,6 +47,4 @@
 
 #ifdef SYSTEMC
-    allocation ();
-
     SC_METHOD (transition);
     dont_initialize ();
@@ -72,21 +72,17 @@
       PORT_WRITE(out_WRITE_ACK [i], 1);
 #endif
+
+    log_printf(FUNC,RegisterFile_Monolithic,"RegisterFile_Monolithic","End");
   };
   
   RegisterFile_Monolithic::~RegisterFile_Monolithic (void)
   {
-#ifdef SYSTEMC
-    deallocation ();
-#endif
-
-#ifdef VHDL_TESTBENCH
-    // generate the test bench
-    _vhdl_testbench->generate_file();
-    delete _vhdl_testbench;
-#endif
-
 #ifdef STATISTICS
     _stat->generate_file(statistics(0));
     delete _stat;
+#endif
+
+#ifdef SYSTEMC
+    deallocation ();
 #endif
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_allocation.cpp	(revision 41)
@@ -17,8 +17,24 @@
   void RegisterFile_Monolithic::allocation (void)
   {
-    in_CLOCK  = new SC_CLOCK           ("in_CLOCK");
-    in_NRESET = new SC_IN (Tcontrol_t) ("in_NRESET");
+#ifdef POSITION
+    _position   = new Position ();
 
-    // ----- Interface Read
+    Entity * entity = _position->set_entity (_name                    ,
+					     "RegisterFile_Monolithic",
+					     REGISTER                 );
+    
+    _interfaces = entity->set_interfaces();
+#else
+    _interfaces = new Interfaces();
+#endif
+
+    // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    Interface * interface_ = _interfaces->set_interface("", IN  ,SOUTH, "Generalist interface");
+
+     in_CLOCK              = interface_->set_signal_clk              ("clock" ,1);
+     in_NRESET             = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
+
+    // ~~~~~[ Interface : "read" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
      in_READ_VAL         = new SC_IN (Tcontrol_t) * [_param._nb_port_read];
     out_READ_ACK         = new SC_OUT(Tcontrol_t) * [_param._nb_port_read];
@@ -27,21 +43,15 @@
 
     for (uint32_t i=0; i<_param._nb_port_read; i++)
-      {
-	string rename;
+      { 
+	Interface_fifo * interface_read = _interfaces->set_interface("read_"+toString(i), IN  ,WEST, "Interface Read");
 
-	rename = "in_READ_VAL["     + toString(i) + "]";
-	in_READ_VAL     [i]  = new SC_IN (Tcontrol_t) (rename.c_str());
-
-	rename = "out_READ_ACK["     + toString(i) + "]";
-	out_READ_ACK    [i]  = new SC_OUT(Tcontrol_t) (rename.c_str());
-
-	rename = "in_READ_ADDRESS[" + toString(i) + "]";
-	in_READ_ADDRESS [i]  = new SC_IN (Taddress_t) (rename.c_str());
-
-	rename = "out_READ_DATA["    + toString(i) + "]";
-	out_READ_DATA   [i]  = new SC_OUT(Tdata_t)    (rename.c_str());
+	 in_READ_VAL     [i]  = interface_read->set_signal_valack_in        ("val"    , VAL);
+	out_READ_ACK     [i]  = interface_read->set_signal_valack_out       ("ack"    , ACK);
+	 in_READ_ADDRESS [i]  = interface_read->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(log2(_param._nb_word)));
+	out_READ_DATA    [i]  = interface_read->set_signal_out <Tdata_t   > ("data"   , _param._size_word);
       }
 
-    // ----- Interface Write
+    // ~~~~~[ Interface : "write" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
      in_WRITE_VAL        = new SC_IN (Tcontrol_t) * [_param._nb_port_write];
     out_WRITE_ACK        = new SC_OUT(Tcontrol_t) * [_param._nb_port_write];
@@ -51,17 +61,10 @@
     for (uint32_t i=0; i<_param._nb_port_write; i++)
       {
-	string rename;
+	Interface_fifo * interface_write = _interfaces->set_interface("write_"+toString(i), IN  ,EAST, "Interface Write");
 
-	rename = "in_WRITE_VAL["  + toString(i) + "]";
-	in_WRITE_VAL     [i]  = new SC_IN (Tcontrol_t) (rename.c_str());
-
-	rename = "out_WRITE_VAL["  + toString(i) + "]";
-	out_WRITE_ACK    [i]  = new SC_OUT(Tcontrol_t) (rename.c_str());
-
-	rename = "in_WRITE_ADDRESS[" + toString(i) + "]";
-	in_WRITE_ADDRESS [i]  = new SC_IN (Taddress_t) (rename.c_str());
-
-	rename = "in_WRITE_DATA["    + toString(i) + "]";
-	in_WRITE_DATA    [i]  = new SC_IN (Tdata_t)    (rename.c_str());
+	 in_WRITE_VAL     [i]  = interface_write->set_signal_valack_in        ("val"    , VAL);
+	out_WRITE_ACK     [i]  = interface_write->set_signal_valack_out       ("ack"    , ACK);
+	 in_WRITE_ADDRESS [i]  = interface_write->set_signal_in  <Taddress_t> ("address", static_cast<uint32_t>(log2(_param._nb_word)));
+	 in_WRITE_DATA    [i]  = interface_write->set_signal_in  <Tdata_t   > ("data"   , _param._size_word);
       }
 
@@ -73,5 +76,9 @@
 	string rename = "reg_DATA["  + toString(i) + "]";
 	reg_DATA [i]  = new SC_REGISTER (Tdata_t) (rename.c_str());
-      }    
+      }
+
+#ifdef POSITION
+    _position->generate_file();
+#endif
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_deallocation.cpp	(revision 41)
@@ -17,41 +17,26 @@
   void RegisterFile_Monolithic::deallocation (void)
   {
-    delete in_CLOCK;
-    delete in_NRESET;
+    delete    in_CLOCK;
+    delete    in_NRESET;
     // ----- Interface Read
-    for (uint32_t i=0; i<_param._nb_port_read; i++)
-      {
-	delete  in_READ_VAL     [i];
-	delete out_READ_ACK     [i];
-	delete  in_READ_ADDRESS [i];
-	delete out_READ_DATA    [i];
-      }
-
-    delete  in_READ_VAL    ;
-    delete out_READ_ACK    ;
-    delete  in_READ_ADDRESS;
-    delete out_READ_DATA   ;
+    delete []  in_READ_VAL    ;
+    delete [] out_READ_ACK    ;
+    delete []  in_READ_ADDRESS;
+    delete [] out_READ_DATA   ;
 
     // ----- Interface Write
-    for (uint32_t i=0; i<_param._nb_port_write; i++)
-      {
-	delete  in_WRITE_VAL     [i];
-	delete out_WRITE_ACK     [i];
-	delete  in_WRITE_ADDRESS [i];
-	delete  in_WRITE_DATA    [i];
-      }
-
-    delete  in_WRITE_VAL    ;
-    delete out_WRITE_ACK    ;
-    delete  in_WRITE_ADDRESS;
-    delete  in_WRITE_DATA   ;
+    delete []  in_WRITE_VAL    ;
+    delete [] out_WRITE_ACK    ;
+    delete []  in_WRITE_ADDRESS;
+    delete []  in_WRITE_DATA   ;
 
     // ----- Register
-    for (uint32_t i=0; i<_param._nb_word; i++)
-      {
-	delete reg_DATA [i];
-      }    
+    delete [] reg_DATA;
 
-    delete reg_DATA;
+#ifdef POSITION
+    delete _position;
+#else
+    delete _interfaces;
+#endif
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp	(revision 41)
@@ -45,5 +45,5 @@
 
 #ifdef VHDL_TESTBENCH
-    vhdl_testbench_transition (*_vhdl_testbench);
+    vhdl_testbench_transition ();
 #endif
     log_printf(FUNC,Register_File,"transition","End");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl.cpp	(revision 41)
@@ -18,7 +18,7 @@
   void RegisterFile_Monolithic::vhdl (void)
   {
-    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;
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_body.cpp	(revision 41)
@@ -15,39 +15,40 @@
 namespace registerfile_monolithic    {
 
-  void RegisterFile_Monolithic::vhdl_body (Vhdl & vhdl)
+  void RegisterFile_Monolithic::vhdl_body (Vhdl * & vhdl)
   {
-    vhdl.set_body ("");
-    vhdl.set_body ("-----------------------------------------------------------------------------");
-    vhdl.set_body ("-- Read RegisterFile");
-    vhdl.set_body ("-----------------------------------------------------------------------------");
-    vhdl.set_body ("");
+    vhdl->set_body ("");
+    vhdl->set_body ("-----------------------------------------------------------------------------");
+    vhdl->set_body ("-- Read RegisterFile");
+    vhdl->set_body ("-----------------------------------------------------------------------------");
+    vhdl->set_body ("");
     
     for (uint32_t i = 0; i < _param._nb_port_read; i++)
       {
-	vhdl.set_body ("out_READ_ACK_"+toString(i)+"  <= '1';");
-	vhdl.set_body ("out_READ_DATA_"+toString(i)+" <= reg_DATA (conv_integer(in_READ_ADDRESS_"+toString(i)+")) when in_READ_VAL_"+toString(i)+" = '1' else "+std_logic_others(_param._size_word,0)+";");
+	vhdl->set_body ("out_READ_"+toString(i)+"_ACK  <= '1';");
+	vhdl->set_body ("out_READ_"+toString(i)+"_DATA <= reg_DATA (conv_integer(in_READ_"+toString(i)+"_ADDRESS)) when in_READ_"+toString(i)+"_VAL = '1' else "+std_logic_others(_param._size_word,0)+";");
       }
-    vhdl.set_body ("");
-    vhdl.set_body ("-----------------------------------------------------------------------------");
-    vhdl.set_body ("-- Write RegisterFile");
-    vhdl.set_body ("-----------------------------------------------------------------------------");
-    vhdl.set_body ("");
 
-    vhdl.set_body ("RegisterFile_write: process (in_CLOCK)");
-    vhdl.set_body ("begin  -- process RegisterFile_write");
-    vhdl.set_body ("\tif in_CLOCK'event and in_CLOCK = '1' then");
+    vhdl->set_body ("");
+    vhdl->set_body ("-----------------------------------------------------------------------------");
+    vhdl->set_body ("-- Write RegisterFile");
+    vhdl->set_body ("-----------------------------------------------------------------------------");
+    vhdl->set_body ("");
+
+    vhdl->set_body ("RegisterFile_write: process (in_CLOCK)");
+    vhdl->set_body ("begin  -- process RegisterFile_write");
+    vhdl->set_body ("\tif in_CLOCK'event and in_CLOCK = '1' then");
     
     for (uint32_t i = 0; i < _param._nb_port_write; i++)
       {
-      vhdl.set_body ("\t\tif (in_WRITE_VAL_"+toString(i)+" = '1') then");
-      vhdl.set_body ("\t\t\treg_DATA(conv_integer(in_WRITE_ADDRESS_"+toString(i)+")) <= in_WRITE_DATA_"+toString(i)+";");
-      vhdl.set_body ("\t\tend if;");
+      vhdl->set_body ("\t\tif (in_WRITE_"+toString(i)+"_VAL = '1') then");
+      vhdl->set_body ("\t\t\treg_DATA(conv_integer(in_WRITE_"+toString(i)+"_ADDRESS)) <= in_WRITE_"+toString(i)+"_DATA;");
+      vhdl->set_body ("\t\tend if;");
       }
 
-    vhdl.set_body ("\tend if;");
-    vhdl.set_body ("end process RegisterFile_write;");
+    vhdl->set_body ("\tend if;");
+    vhdl->set_body ("end process RegisterFile_write;");
 
     for (uint32_t i = 0; i < _param._nb_port_write; i++)
-      vhdl.set_body ("out_WRITE_ACK_"+toString(i)+"<= '1';");
+      vhdl->set_body ("out_WRITE_"+toString(i)+"_ACK <= '1';");
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_port.cpp	(revision 41)
@@ -15,24 +15,7 @@
 namespace registerfile_monolithic    {
 
-  void RegisterFile_Monolithic::vhdl_port (Vhdl & vhdl)
+  void RegisterFile_Monolithic::vhdl_port (Vhdl * & vhdl)
   {
-    vhdl.set_port ("in_CLOCK" , IN, 1);
-    vhdl.set_port ("in_NRESET", IN, 1);
-
-    for (uint32_t i = 0; i < _param._nb_port_read; i ++)
-      {
-	vhdl.set_port (" in_READ_VAL_"+toString(i)+"    ",IN ,std_logic(1)                    );
-	vhdl.set_port ("out_READ_ACK_"+toString(i)+"    ",OUT,std_logic(1)                    );
-	vhdl.set_port (" in_READ_ADDRESS_"+toString(i)+"",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_word))));
-	vhdl.set_port ("out_READ_DATA_"+toString(i)+"   ",OUT,std_logic(_param._size_word    ));
-      }
-
-    for (uint32_t i = 0; i < _param._nb_port_write; i ++)
-      {
-	vhdl.set_port (" in_WRITE_VAL_"+toString(i)+"    ",IN ,std_logic(1)                    );
-	vhdl.set_port ("out_WRITE_ACK_"+toString(i)+"    ",OUT,std_logic(1)                    );
-	vhdl.set_port (" in_WRITE_ADDRESS_"+toString(i)+"",IN ,std_logic(static_cast<uint32_t>(log2(_param._nb_word))));
-	vhdl.set_port (" in_WRITE_DATA_"+toString(i)+"   ",IN ,std_logic(_param._size_word    ));
-      }
+    _interfaces->set_port(vhdl);
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_signal.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_signal.cpp	(revision 41)
@@ -15,7 +15,7 @@
 namespace registerfile_monolithic    {
 
-  void RegisterFile_Monolithic::vhdl_signal (Vhdl & vhdl)
+  void RegisterFile_Monolithic::vhdl_signal (Vhdl * & vhdl)
   {
-    vhdl.set_signal ("reg_DATA", "Tregfile");
+    vhdl->set_signal ("reg_DATA", "Tregfile");
   };
 
Index: unk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_port.cpp	(revision 40)
+++ 	(revision )
@@ -1,43 +1,0 @@
-#ifdef VHDL_TESTBENCH
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h"
-
-namespace morpheo                    {
-namespace behavioural                {
-namespace generic                    {
-namespace registerfile               {
-namespace registerfile_monolithic    {
-
-  void RegisterFile_Monolithic::vhdl_testbench_port (Vhdl_Testbench & vhdl_testbench)
-  {
-    vhdl_testbench.set_port (" in_NRESET",IN ,1);
-
-    for (uint32_t i = 0; i < _param._nb_port_read; i ++)
-      {
-	vhdl_testbench.set_port (" in_READ_VAL_"+toString(i)+"    ",IN ,1);
-	vhdl_testbench.set_port ("out_READ_ACK_"+toString(i)+"    ",OUT,1);
-	vhdl_testbench.set_port (" in_READ_ADDRESS_"+toString(i)+"",IN ,static_cast<uint32_t>(log2(_param._nb_word)));
-	vhdl_testbench.set_port ("out_READ_DATA_"+toString(i)+"   ",OUT,_param._size_word);
-      }
-
-    for (uint32_t i = 0; i < _param._nb_port_write; i ++)
-      {
-	vhdl_testbench.set_port (" in_WRITE_VAL_"+toString(i)+"    ",IN ,1);
-	vhdl_testbench.set_port ("out_WRITE_ACK_"+toString(i)+"    ",OUT,1);
-	vhdl_testbench.set_port (" in_WRITE_ADDRESS_"+toString(i)+"",IN ,static_cast<uint32_t>(log2(_param._nb_word)));
-	vhdl_testbench.set_port (" in_WRITE_DATA_"+toString(i)+"   ",IN ,_param._size_word    );
-      }
-  };
-
-}; // end namespace registerfile_monolithic
-}; // end namespace registerfile 
-}; // end namespace generic
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_transition.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_testbench_transition.cpp	(revision 41)
@@ -15,29 +15,10 @@
 namespace registerfile_monolithic    {
 
-  void RegisterFile_Monolithic::vhdl_testbench_transition (Vhdl_Testbench & vhdl_testbench)
+  void RegisterFile_Monolithic::vhdl_testbench_transition (void)
   {
-#ifndef SYSTEMCASS_SPECIFIC
-    sc_cycle(0);
-#endif
-    vhdl_testbench.add_input (PORT_READ( in_NRESET));
+    // Evaluation before read the ouput signal
+    sc_start(0);
 
-    for (uint32_t i = 0; i < _param._nb_port_read ; i ++)
-      {
-	vhdl_testbench.add_input (PORT_READ( in_READ_VAL     [i]));
-	vhdl_testbench.add_output(PORT_READ(out_READ_ACK     [i]));
-	vhdl_testbench.add_input (PORT_READ( in_READ_ADDRESS [i]));
-	vhdl_testbench.add_output(PORT_READ(out_READ_DATA    [i]));
-      }
-    for (uint32_t i = 0; i < _param._nb_port_write; i ++)
-      {
-	vhdl_testbench.add_input (PORT_READ( in_WRITE_VAL    [i]));
-	vhdl_testbench.add_output(PORT_READ(out_WRITE_ACK    [i]));
-	vhdl_testbench.add_input (PORT_READ( in_WRITE_ADDRESS[i]));
-	vhdl_testbench.add_input (PORT_READ( in_WRITE_DATA   [i]));
-      }
-
-    vhdl_testbench.add_test(true);
-
-    vhdl_testbench.new_cycle (); // always at the end
+    _interfaces->testbench();
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_type.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_type.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_vhdl_type.cpp	(revision 41)
@@ -15,7 +15,7 @@
 namespace registerfile_monolithic    {
 
-  void RegisterFile_Monolithic::vhdl_type (Vhdl & vhdl)
+  void RegisterFile_Monolithic::vhdl_type (Vhdl * & vhdl)
   {
-    vhdl.set_type ("Tregfile", "array (" + toString(_param._nb_word-1) + " downto 0) of " + std_logic(_param._size_word));
+    vhdl->set_type ("Tregfile", "array (" + toString(_param._nb_word-1) + " downto 0) of " + std_logic(_param._size_word));
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/src/test.cpp	(revision 41)
@@ -90,14 +90,10 @@
  
   sc_start(0);
-//_Select_Priority_Fixed->vhdl_testbench_label("Initialisation");
 //cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} Initialisation" << endl;
 
-  _Select_Priority_Fixed->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 ++)
     {
-      _Select_Priority_Fixed->vhdl_testbench_label("Iteration "+toString(iteration));
-
       entity    = 0;
       bool find = false;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h	(revision 41)
@@ -30,7 +30,4 @@
 #include "Behavioural/include/Vhdl.h"
 #endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
-#endif
 
 using namespace std;
@@ -59,8 +56,4 @@
 #ifdef STATISTICS
   private   : Statistics                     * _stat;
-#endif
-
-#ifdef VHDL_TESTBENCH
-  private   : Vhdl_Testbench                 * _vhdl_testbench;
 #endif
 
@@ -132,5 +125,4 @@
   private : void     vhdl_testbench_transition (void);
 #endif
-  public  : void     vhdl_testbench_label      (string label);
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed.cpp	(revision 41)
@@ -45,10 +45,4 @@
 			    param_statistics          ,
 			    param);
-#endif
-
-#ifdef VHDL_TESTBENCH
-    log_printf(INFO,Select_Priority_Fixed,"Select_Priority_Fixed","Creation of a testbench");
-
-    _vhdl_testbench = new Vhdl_Testbench (_name);
 #endif
 
@@ -100,12 +94,4 @@
     log_printf(FUNC,Select_Priority_Fixed,"~Select_Priority_Fixed","Begin");
 
-#ifdef VHDL_TESTBENCH
-    log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Generate Testbench  file");
-
-    // generate the test bench
-    _vhdl_testbench->generate_file();
-    delete _vhdl_testbench;
-#endif
-
 #ifdef STATISTICS
     log_printf(INFO,Select_Priority_Fixed,"~Select_Priority_Fixed","Generate Statistics file");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp	(revision 41)
@@ -17,6 +17,4 @@
   void Select_Priority_Fixed::allocation (void)
   {
-    string rename;
-
     log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin");
 
@@ -27,5 +25,5 @@
 					     "Select_Priority_Fixed",
 					     COMBINATORY            );
-
+    
     _interfaces = entity->set_interfaces();
 #else
@@ -37,5 +35,5 @@
     Interface_fifo * interface_ = _interfaces->set_interface("", IN  ,WEST, "Generalist interface");
 
-     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
+     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, CLOCK_VHDL_NO);
      in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
      in_VAL          = new SC_IN (Tcontrol_t)           * [_param._nb_entity];
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp	(revision 41)
@@ -34,6 +34,4 @@
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
-    cout << *_interfaces << endl;
-
 #ifdef POSITION
     delete _position;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp	(revision 41)
@@ -21,9 +21,4 @@
     _interfaces->set_port(vhdl);
 
-#ifdef VHDL_TESTBENCH
-    _interfaces->set_port(_vhdl_testbench);			
-   _vhdl_testbench->set_clock    ("in_CLOCK",true);
-#endif    
-
    log_printf(FUNC,Select_Priority_Fixed,"vhdl_port","End");
   };
Index: unk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_label.cpp	(revision 40)
+++ 	(revision )
@@ -1,33 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace generic {
-namespace select {
-namespace select_priority_fixed {
-
-
-  void Select_Priority_Fixed::vhdl_testbench_label (string label)
-  {
-    log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_label","Begin");
-
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench->add_label(label);
-#endif
-    
-    log_printf(FUNC,Select_Priority_Fixed,"vhdl_testbench_label","End");
-  };
-
-}; // end namespace select_priority_fixed
-}; // end namespace select
-}; // end namespace generic
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp	(revision 41)
@@ -23,12 +23,5 @@
     sc_start(0);
 
-    _interfaces->testbench(_vhdl_testbench);
-
-    // 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,Select_Priority_Fixed,"vhdl_testbench_transition","End");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/New_Component.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/New_Component.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/include/New_Component.h	(revision 41)
@@ -30,7 +30,4 @@
 #include "Behavioural/include/Vhdl.h"
 #endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
-#endif
 
 using namespace std;
@@ -56,8 +53,4 @@
 #ifdef STATISTICS
   private   : Statistics                     * _stat;
-#endif
-
-#ifdef VHDL_TESTBENCH
-  private   : Vhdl_Testbench                 * _vhdl_testbench;
 #endif
 
@@ -122,5 +115,4 @@
   private : void     vhdl_testbench_transition (void);
 #endif
-  public  : void     vhdl_testbench_label      (string label);
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component.cpp	(revision 41)
@@ -44,10 +44,4 @@
 #endif
 
-#ifdef VHDL_TESTBENCH
-    log_printf(INFO,@COMPONENT,"@COMPONENT","Creation of a testbench");
-
-    _vhdl_testbench = new Vhdl_Testbench (_name);
-#endif
-
 #ifdef VHDL
     // generate the vhdl
@@ -78,12 +72,4 @@
     log_printf(FUNC,@COMPONENT,"~@COMPONENT","Begin");
 
-#ifdef VHDL_TESTBENCH
-    log_printf(INFO,@COMPONENT,"~@COMPONENT","Generate Testbench  file");
-
-    // generate the test bench
-    _vhdl_testbench->generate_file();
-    delete _vhdl_testbench;
-#endif
-
 #ifdef STATISTICS
     log_printf(INFO,@COMPONENT,"~@COMPONENT","Generate Statistics file");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_port.cpp	(revision 41)
@@ -19,9 +19,4 @@
     _interfaces->set_port(vhdl);
 
-#ifdef VHDL_TESTBENCH
-    _interfaces->set_port(_vhdl_testbench);			
-   _vhdl_testbench->set_clock    ("in_CLOCK",true);
-#endif    
-
     log_printf(FUNC,@COMPONENT,"vhdl_port","End");
   };
Index: unk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_label.cpp	(revision 40)
+++ 	(revision )
@@ -1,27 +1,0 @@
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/@DIRECTORY/include/@COMPONENT.h"
-
-namespace morpheo                    {
-namespace behavioural {
-@NAMESPACE_BEGIN
-
-  void @COMPONENT::vhdl_testbench_label (string label)
-  {
-    log_printf(FUNC,@COMPONENT,"vhdl_testbench_label","Begin");
-
-#ifdef VHDL_TESTBENCH
-    _vhdl_testbench->add_label(label);
-#endif
-    
-    log_printf(FUNC,@COMPONENT,"vhdl_testbench_label","End");
-  };
-
-@NAMESPACE_END
-}; // end namespace behavioural
-}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_transition.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_transition.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component/src/New_Component_vhdl_testbench_transition.cpp	(revision 41)
@@ -20,12 +20,5 @@
     sc_start(0);
 
-    _interfaces->testbench(_vhdl_testbench);
-    
-    // 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,@COMPONENT,"vhdl_testbench_transition","End");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h	(revision 41)
@@ -7,7 +7,8 @@
 #define     DEBUG_Group                                     false
 #define     DEBUG_Shifter                                   false
-#define     DEBUG_Register_File                             false 
-#define     DEBUG_RegisterFile_Multi_Banked                 false
-#define       DEBUG_RegisterFile_Multi_Banked_Glue          false
+#define     DEBUG_Register_File                             false
+#define       DEBUG_RegisterFile_Monolithic                 false 
+#define       DEBUG_RegisterFile_Multi_Banked               false
+#define         DEBUG_RegisterFile_Multi_Banked_Glue        false
 #define     DEBUG_Select                                    false
 #define       DEBUG_Select_Priority_Fixed                   false 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h	(revision 41)
@@ -7,5 +7,6 @@
 namespace behavioural          {
 
-typedef enum { IN, OUT, INOUT } direction_t;
+typedef enum { IN, OUT } direction_t;
+  //typedef enum { IN, OUT, INOUT } direction_t;
 
 }; // end namespace behavioural          
@@ -17,5 +18,5 @@
       case morpheo::behavioural::IN    : return "in"    ; break;
       case morpheo::behavioural::OUT   : return "out"   ; break;
-      case morpheo::behavioural::INOUT : return "inout" ; break;
+//    case morpheo::behavioural::INOUT : return "inout" ; break;
       default    : return ""      ; break;
       }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 41)
@@ -21,7 +21,4 @@
 #ifdef VHDL
 #include "Behavioural/include/Vhdl.h"
-#endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
 #endif
 #include "Include/ToString.h"
@@ -53,5 +50,5 @@
 
 #ifdef VHDL_TESTBENCH
-  private   : list<string>        * _list_cycle   ;
+  private   : uint32_t              _nb_cycle     ;
 #endif
     
@@ -80,9 +77,13 @@
   public    : sc_in_clk *           set_signal_clk       (string          name     ,
 							  uint32_t        size     ,
-							  presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
+							  presence_port_t presence_port=CLOCK_VHDL_YES)
     {
       log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
 
-      Signal * sig = set_signal (name, IN , size, presence_port);
+      if ((presence_port != CLOCK_VHDL_YES) and
+	  (presence_port != CLOCK_VHDL_NO ))
+	throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port.");
+
+      Signal    * sig    = set_signal (name, IN , size, presence_port);
       sc_in_clk * signal = new sc_in_clk (sig->_name.c_str());
 
@@ -98,4 +99,8 @@
     {
       log_printf(FUNC,Behavioural,"set_signal_in","Begin");
+
+      if ((presence_port == CLOCK_VHDL_YES) or 
+	  (presence_port == CLOCK_VHDL_NO ))
+	throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
 
       Signal * sig = set_signal (name, IN , size, presence_port);
@@ -117,4 +122,8 @@
       log_printf(FUNC,Behavioural,"set_signal_out","Begin");
 
+      if ((presence_port == CLOCK_VHDL_YES) or 
+	  (presence_port == CLOCK_VHDL_NO ))
+	throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
+
       Signal * sig = set_signal (name, OUT , size, presence_port);
       sc_out <T> * port = new sc_out <T> (sig->_name.c_str());
@@ -131,7 +140,23 @@
 #ifdef VHDL
   public    : void                  set_port             (Vhdl * & vhdl);
+#ifdef VHDL_TESTBENCH
+  public    : void                  set_signal           (Vhdl * & vhdl);
+  public    : void                  get_signal           (list<string> * & list_signal);
+#endif
 #endif
 #ifdef VHDL_TESTBENCH
-  public    : void                  set_port             (Vhdl_Testbench * & vhdl_testbench);
+  public    : uint32_t              get_cycle            (void);
+  public    : string                get_clock            (void);
+
+  public    : void                  testbench            (void);
+  public    : void                  testbench_cycle      (void);
+  public    : void                  testbench_body       (Vhdl           * & vhdl          ,
+							  string             counter_name  );
+  public    : string                testbench_test       (Vhdl           * & vhdl        ,
+							  string             counter_name);
+  public    : string                testbench_test_ok    (Vhdl           * & vhdl        );
+  protected : string                testbench_test_name   (Vhdl           * & vhdl);
+  protected : string                testbench_test_ok_name(Vhdl           * & vhdl);
+
 #endif
 
@@ -139,9 +164,4 @@
   public    : void                  port_map             (void * entity,
 							  void * interface);
-#endif
-
-#ifdef VHDL_TESTBENCH
-  public    : void                  testbench_cycle      (void);
-  public    : void                  testbench            (Vhdl_Testbench * & vhdl_testbench);
 #endif
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface_fifo.h	(revision 41)
@@ -23,4 +23,6 @@
 #ifdef VHDL_TESTBENCH
   private   : bool                  _test_exhaustive;
+  private   : list<uint32_t>      * _list_cycle   ;
+
 #endif
 
@@ -72,6 +74,11 @@
 
 #ifdef VHDL_TESTBENCH
+  public    : uint32_t              get_cycle            (void);
+
+  public    : void                  testbench            (void);
   public    : bool                  testbench_transaction(void);
-  public    : void                  testbench            (Vhdl_Testbench * & vhdl_testbench);
+  public    : void                  testbench_cycle      (void);
+  public    : string                testbench_test       (Vhdl           * & vhdl        ,
+							  string             counter_name);
 #endif
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 41)
@@ -18,7 +18,4 @@
 #include "Behavioural/include/Vhdl.h"
 #endif
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
-#endif
 
 using namespace std;
@@ -30,8 +27,9 @@
   {
     // -----[ fields ]----------------------------------------------------
+  private   : const string               _name;
   private   : list<Interface_fifo*>    * _list_interface;
 
     // -----[ methods ]---------------------------------------------------
-  public    :                       Interfaces            (void);
+  public    :                       Interfaces            (string name);
   public    :                       Interfaces            (const Interfaces & interfaces);
   public    :                       ~Interfaces           ();
@@ -48,14 +46,20 @@
 #ifdef VHDL
   public    : void                  set_port              (Vhdl           * & vhdl          );
+#  ifdef VHDL_TESTBENCH
+  private   : void                  get_signal            (list<string>   * & list_signal   );
+  private   : void                  set_signal            (Vhdl           * & vhdl          );
+#  endif
 #endif
 #ifdef VHDL_TESTBENCH
-  public    : void                  set_port              (Vhdl_Testbench * & vhdl_testbench);
+  private   : uint32_t              get_cycle             (void);
+  private   : string                get_clock             (void);
+
+  private   : void                  testbench_generate_file (void);
+  public    : void                  testbench             (void);
+  private   : string                testbench_body        (Vhdl           * & vhdl          ,
+							   string             counter_name  );
 #endif
 
   public    : Interface_fifo  *     find_interface        (string name);
-
-#ifdef VHDL_TESTBENCH
-  public    : void                  testbench             (Vhdl_Testbench * & vhdl_testbench);
-#endif
 
   public    : XML                   toXML                 (void);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 41)
@@ -16,6 +16,6 @@
 #include <iostream>
 
-#ifdef VHDL_TESTBENCH
-#include "Behavioural/include/Vhdl_Testbench.h"
+#ifdef VHDL
+#include "Behavioural/include/Vhdl.h"
 #endif
 
@@ -42,5 +42,7 @@
 		PORT_VHDL_YES_TESTBENCH_NO ,
 		PORT_VHDL_NO_TESTBENCH_YES ,
-		PORT_VHDL_NO_TESTBENCH_NO  } presence_port_t;
+		PORT_VHDL_NO_TESTBENCH_NO  ,
+		CLOCK_VHDL_YES             ,
+		CLOCK_VHDL_NO              } presence_port_t;
 
   class Signal
@@ -109,6 +111,4 @@
     }
 
-  public    : void              testbench       (Vhdl_Testbench * & vhdl_testbench);
-
   public    : template <typename T>
               void              alloc           (void * port)
@@ -136,6 +136,18 @@
 	_type_info = UNKNOW;
     }
+
+  public    : void              testbench        (void);
+  public    : void              testbench_body   (Vhdl           * & vhdl          ,
+						  string             counter_name  );
+  public    : void              testbench_test_ok(Vhdl           * & vhdl          );
 #endif
-
+#ifdef VHDL
+  public    : void              set_port        (Vhdl * & vhdl);
+#  ifdef VHDL_TESTBENCH
+  public    : string            get_clock       (void);
+  public    : void              set_signal      (Vhdl * & vhdl);
+  public    : void              get_name_vhdl   (list<string> * & list_signal);
+#  endif
+#endif
   public    : XML               toXML           (void);
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl_Testbench.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl_Testbench.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl_Testbench.h	(revision 41)
@@ -38,61 +38,61 @@
     };
 
-    // -----[ fields ]----------------------------------------------------
-  private   : const string     _name       ;
-  private   : const bool       _exhaustive ;
+//     // -----[ fields ]----------------------------------------------------
+//   private   : const string     _name       ;
+//   private   : const bool       _exhaustive ;
 
-  private   : string           _clock_name ;
-  private   : uint32_t         _num_cycle  ;
+//   private   : string           _clock_name ;
+//   private   : uint32_t         _num_cycle  ;
 
-  private   : uint32_t         _size_input ;
-  private   : uint32_t         _size_output;
+//   private   : uint32_t         _size_input ;
+//   private   : uint32_t         _size_output;
 
-  private   : list<string>     _list_input ;
-  private   : list<string>     _list_input_cycle;
-  private   : list<uint32_t>   _list_input_size ;
+//   private   : list<string>     _list_input ;
+//   private   : list<string>     _list_input_cycle;
+//   private   : list<uint32_t>   _list_input_size ;
 
-  private   : list<string>     _list_output;
-  private   : list<string>     _list_output_cycle;
-  private   : list<uint32_t>   _list_output_size ;
+//   private   : list<string>     _list_output;
+//   private   : list<string>     _list_output_cycle;
+//   private   : list<uint32_t>   _list_output_size ;
 
-  private   : list<bool>       _list_test;
-  private   : list<string>     _list_port;
-  private   : list<label_t>    _list_label;
+//   private   : list<bool>       _list_test;
+//   private   : list<string>     _list_port;
+//   private   : list<label_t>    _list_label;
 
-  private   : list<uint32_t>::iterator   _num_input ;
-  private   : list<uint32_t>::iterator   _num_output;
+//   private   : list<uint32_t>::iterator   _num_input ;
+//   private   : list<uint32_t>::iterator   _num_output;
 
-  private   : Vhdl           * _vhdl;
+//   private   : Vhdl           * _vhdl;
     
     // -----[ methods ]---------------------------------------------------
   public    :                  Vhdl_Testbench              (string   name,
-							    bool     exhaustive=true);
-  public    : virtual          ~Vhdl_Testbench             ();
+							    bool     exhaustive=true){};
+  public    :                  ~Vhdl_Testbench             (){};
 						           
-  public    : void             generate_file               (void);
+  public    : void             generate_file               (void){};
 
   public    : void             set_port                    (string      name      ,
 							    direction_t direction ,
-							    uint32_t    size      );
+							    uint32_t    size      ){};
   public    : void             set_clock                   (string      name      ,
-							    bool        model_have_clock);
-  public    : void             new_cycle                   (void);
+							    bool        model_have_clock){};
+  public    : void             new_cycle                   (void){};
 
-  private   : uint32_t         get_input                   (void);
-  private   : void             set_input                   (void);
-  public    : void             add_input                   (uint32_t    value     );
+  private   : uint32_t         get_input                   (void){return 0;};
+  private   : void             set_input                   (void){};
+  public    : void             add_input                   (uint32_t    value     ){};
 
-  private   : uint32_t         get_output                  (void);
-  private   : void             set_output                  (void);
-  public    : void             add_output                  (uint32_t    value     );
+  private   : uint32_t         get_output                  (void){return 0;};
+  private   : void             set_output                  (void){};
+  public    : void             add_output                  (uint32_t    value     ){};
 
-  private   : uint32_t         get_test                    (void);
-  public    : void             add_test                    (bool        must_test );
+  private   : uint32_t         get_test                    (void){return 0;};
+  public    : void             add_test                    (bool        must_test ){};
 
-  private   : void             get_label                   (void);
-  public    : void             add_label                   (string      label     );
+  private   : void             get_label                   (void){};
+  public    : void             add_label                   (string      label     ){};
 
-  private   : void             generate_process_clock      (uint32_t    counter   );
-  private   : void             generate_instance           (void);
+  private   : void             generate_process_clock      (uint32_t    counter   ){};
+  private   : void             generate_instance           (void){};
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 41)
@@ -20,5 +20,6 @@
   {
     log_printf(FUNC,Behavioural,"Entity","Begin");
-    _is_map = false;
+    _interfaces = new Interfaces (name);
+    _is_map     = false;
     log_printf(FUNC,Behavioural,"Entity","End");
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp	(revision 41)
@@ -14,9 +14,5 @@
   Interfaces * Entity::set_interfaces (void)
   {
-    Interfaces * interfaces = new Interfaces ();
-
-    _interfaces = interfaces;
-    
-    return interfaces;
+    return _interfaces;
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 41)
@@ -30,5 +30,5 @@
 
 #ifdef VHDL_TESTBENCH
-    _list_cycle    = new list<string>;
+    _nb_cycle      = 0;
 #endif
 
@@ -50,5 +50,5 @@
 #endif
 #ifdef VHDL_TESTBENCH
-    _list_cycle    = interface._list_cycle;
+    _nb_cycle      = interface._nb_cycle;
 #endif
 
@@ -73,8 +73,4 @@
     delete _list_signal;
 
-#ifdef VHDL_TESTBENCH
-    delete _list_cycle ;
-#endif
-
     log_printf(FUNC,Behavioural,"~Interface","End");
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp	(revision 41)
@@ -25,4 +25,5 @@
 #ifdef VHDL_TESTBENCH
     _test_exhaustive = true;
+    _list_cycle      = new list<uint32_t>;
 #endif
 
@@ -42,4 +43,5 @@
 #ifdef VHDL_TESTBENCH
     _test_exhaustive = interface_fifo._test_exhaustive;
+    _list_cycle      = interface_fifo._list_cycle;
 #endif
 
@@ -54,4 +56,8 @@
     delete _list_signal_ack;
 
+#ifdef VHDL_TESTBENCH
+    delete _list_cycle;
+#endif
+
     log_printf(FUNC,Behavioural,"~Interface_fifo","End");
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_get_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_get_cycle.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_get_cycle.cpp	(revision 41)
@@ -0,0 +1,25 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface_fifo.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  uint32_t Interface_fifo::get_cycle (void)
+  {
+    if (_test_exhaustive == true)
+      return Interface::get_cycle();
+    
+    return _list_cycle->back();
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_save_ptr.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_save_ptr.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_save_ptr.cpp	(revision 41)
@@ -16,4 +16,8 @@
     log_printf(FUNC,Behavioural,"save_ptr","Begin");
     
+#ifdef VHDL_TESTBENCH
+    _test_exhaustive = false;
+#endif
+
     if (val_ack == VAL)
       _list_signal_val->push_back (signal);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_set_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_set_signal.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_set_signal.cpp	(revision 41)
@@ -17,5 +17,5 @@
   {
     log_printf(FUNC,Behavioural,"set_signal_valack","Begin");
-    
+
     Signal * sig = Interface::set_signal (name         ,
 					  direction    ,
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench.cpp	(revision 41)
@@ -13,5 +13,5 @@
 namespace behavioural          {
 
-  void Interface_fifo::testbench (Vhdl_Testbench * & vhdl_testbench)
+  void Interface_fifo::testbench (void)
   {
     log_printf(FUNC,Behavioural,"testbench","Begin");
@@ -20,5 +20,6 @@
       testbench_cycle ();
     
-    Interface::testbench(vhdl_testbench);
+    Interface::testbench_cycle ();
+    Interface::testbench();
 
     log_printf(FUNC,Behavioural,"testbench","End");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_cycle.cpp	(revision 41)
@@ -0,0 +1,27 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface_fifo.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface_fifo::testbench_cycle (void)
+  {
+    log_printf(FUNC,Behavioural,"testbench_cycle","Begin");
+
+    // note : if defined(VHDL_TESTBENCH) then defined(SYSTEMC)
+    _list_cycle->push_back(static_cast<uint32_t>(sc_simulation_time()));
+
+    log_printf(FUNC,Behavioural,"testbench_cycle","End");
+  }
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test.cpp	(revision 41)
@@ -0,0 +1,55 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface_fifo.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface_fifo::testbench_test (Vhdl * & vhdl,
+				       string   counter_name)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test","Begin");
+    string test_name;
+    
+    if (_test_exhaustive == true)
+      test_name = Interface::testbench_test(vhdl,counter_name);
+    else
+      {
+	vhdl->set_body("");
+	vhdl->set_body("-- Test partial");
+	vhdl->set_body("");
+
+	test_name    = testbench_test_name   (vhdl);
+	string test_name_ok = testbench_test_ok     (vhdl);
+
+	if (_list_cycle->empty()== false)
+	  {
+	    vhdl->set_body ("with "+counter_name+" select");
+	    vhdl->set_body ("\t"+test_name+" <=");
+	
+	    list<uint32_t>::iterator i = _list_cycle->begin();
+	    
+	    while (i != _list_cycle->end())
+	      {
+		vhdl->set_body ("\t"+test_name_ok+" when "+toString(*i)+",");
+		++i;
+	      }
+	    vhdl->set_body ("\t'1' when others;");
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"testbench_test","End");
+
+    return test_name;
+
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_clock.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_clock.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_clock.cpp	(revision 41)
@@ -0,0 +1,42 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface::get_clock (void)
+  {
+    string clock = "";
+    
+    if (not _list_signal->empty())
+      {
+	list<Signal*>::iterator i     = _list_signal->begin();
+	
+	while (i != _list_signal->end())
+	  {
+	    string str = (*i)->get_clock ();
+
+	    if (str != "")
+	      {
+		if (clock != "")
+		  throw ErrorMorpheo ("<Interface.get_clock> : find too many clock.");
+		clock = str;
+	      }
+	    ++i;
+	  }
+      }
+
+    return clock;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_cycle.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_cycle.cpp	(revision 41)
@@ -0,0 +1,22 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  uint32_t Interface::get_cycle (void)
+  {
+    return _nb_cycle;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 41)
@@ -51,4 +51,22 @@
   };
 
+#ifdef VHDL
+#  ifdef VHDL_TESTBENCH
+  void Interface::get_signal (list<string> * & list_signal)
+  {
+    if (not _list_signal->empty())
+      {
+	list<Signal*>::iterator i = _list_signal->begin();
+	
+	while (i != _list_signal->end())
+	  {
+	    (*i)->get_name_vhdl (list_signal);
+	    ++i;
+	  }
+      }
+  };
+#  endif
+#endif
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 41)
@@ -20,16 +20,16 @@
     output_stream << x.get_signal () << endl;
 
-#ifdef VHDL_TESTBENCH
-    if (x._list_cycle->empty()== false)
-      {
-	list<string>::iterator i = x._list_cycle->begin();
+// #ifdef VHDL_TESTBENCH
+//     if (x._list_cycle->empty()== false)
+//       {
+// 	list<string>::iterator i = x._list_cycle->begin();
 
-	while (i != x._list_cycle->end())
-	  {
-	    output_stream << "\n\t" << *i ;
-	    ++i;
-	  }
-      }
-#endif
+// 	while (i != x._list_cycle->end())
+// 	  {
+// 	    output_stream << "\n\t" << *i ;
+// 	    ++i;
+// 	  }
+//       }
+// #endif
 
     log_printf(FUNC,Behavioural,"operator<<","End");
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 41)
@@ -22,8 +22,5 @@
 	while (i != _list_signal->end())
 	  {
-	    presence_port_t p = (*i)->_presence_port;
-	    if ((p == PORT_VHDL_YES_TESTBENCH_YES) or
-		(p == PORT_VHDL_YES_TESTBENCH_NO ) )
-	      vhdl->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
+	    (*i)->set_port (vhdl);
 	    ++i;
 	  }
@@ -33,24 +30,4 @@
 #endif
 
-#ifdef VHDL_TESTBENCH
-  void Interface::set_port (Vhdl_Testbench * & vhdl_testbench)
-  {
-    log_printf(FUNC,Behavioural,"set_port (Testbench)","Begin");
-    if (not _list_signal->empty())
-      {
-	list<Signal*>::iterator i     = _list_signal->begin();
-	
-	while (i != _list_signal->end())
-	  {
-	    presence_port_t p = (*i)->_presence_port;
-	    if ((p == PORT_VHDL_YES_TESTBENCH_YES) or
-		(p == PORT_VHDL_NO_TESTBENCH_YES ) )
-	      vhdl_testbench->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
-	    ++i;
-	  }
-      }
-    log_printf(FUNC,Behavioural,"set_port (Testbench)","End");
-  };
-#endif
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 41)
@@ -32,4 +32,22 @@
   };
 
+#ifdef VHDL
+#  ifdef VHDL_TESTBENCH
+  void Interface::set_signal (Vhdl * & vhdl)
+  {
+    if (not _list_signal->empty())
+      {
+	list<Signal*>::iterator i = _list_signal->begin();
+	
+	while (i != _list_signal->end())
+	  {
+	    (*i)->set_signal (vhdl);
+	    ++i;
+	  }
+      }
+  };
+#  endif
+#endif
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp	(revision 41)
@@ -13,11 +13,5 @@
 namespace behavioural          {
 
-  void Interface::testbench_cycle (void)
-  {
-    // note : if defined(VHDL_TESTBENCH) then defined(SYSTEMC)
-    _list_cycle->push_back(toString(sc_simulation_time()));
-  }
-
-  void Interface::testbench (Vhdl_Testbench * & vhdl_testbench)
+  void Interface::testbench (void)
   {
     log_printf(FUNC,Behavioural,"testbench","Begin");
@@ -29,5 +23,5 @@
 	while (i != _list_signal->end())
 	  {
-	    (*i)->testbench(vhdl_testbench);
+	    (*i)->testbench();
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_body.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_body.cpp	(revision 41)
@@ -0,0 +1,40 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface::testbench_body (Vhdl * & vhdl,
+				  string   counter_name)
+  {
+    log_printf(FUNC,Behavioural,"testbench_body","Begin");
+
+    if (_list_signal->empty()== false)
+      {
+	list<Signal*>::iterator i = _list_signal->begin();
+
+	vhdl->set_body("------------------------------------------------------");
+	vhdl->set_body("-- interface \""+_name+"\"");
+	vhdl->set_body("------------------------------------------------------");
+    
+	while (i != _list_signal->end())
+	  {
+	    (*i)->testbench_body(vhdl, counter_name);
+	    ++i;
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"testbench_body","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_cycle.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_cycle.cpp	(revision 41)
@@ -0,0 +1,26 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface::testbench_cycle (void)
+  {
+    log_printf(FUNC,Behavioural,"testbench_cycle","Begin");
+
+    _nb_cycle ++;
+
+    log_printf(FUNC,Behavioural,"testbench_cycle","End");
+  }
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test.cpp	(revision 41)
@@ -0,0 +1,36 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface::testbench_test (Vhdl * & vhdl,
+				    string   counter_name)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test","Begin");
+
+    vhdl->set_body("");
+    vhdl->set_body("-- Test exhaustive");
+    vhdl->set_body("");
+
+    string test_name    = testbench_test_name(vhdl);
+    string test_name_ok = testbench_test_ok     (vhdl);
+
+    vhdl->set_body(test_name + " <= "+test_name_ok+";");
+
+    log_printf(FUNC,Behavioural,"testbench_test","End");
+
+    return test_name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_name.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_name.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_name.cpp	(revision 41)
@@ -0,0 +1,53 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface::testbench_test_name (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_name","Begin");
+
+    string name;
+
+    name = "interface_";
+    if (_name != "")
+      name += _name + "_";
+    name += "test";
+
+    vhdl->set_signal(name,1);
+    
+    log_printf(FUNC,Behavioural,"testbench_test_name","End");
+
+    return name;
+  };
+
+  string Interface::testbench_test_ok_name (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_ok_name","Begin");
+
+    string name;
+
+    name = "interface_";
+    if (_name != "")
+      name += _name + "_";
+    name += "test_ok";
+
+    vhdl->set_signal(name,1);
+    
+    log_printf(FUNC,Behavioural,"testbench_test_ok_name","End");
+
+    return name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_ok.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_ok.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench_test_ok.cpp	(revision 41)
@@ -0,0 +1,43 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface::testbench_test_ok (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_ok","Begin");
+
+    string test_name = testbench_test_ok_name(vhdl);
+
+    vhdl->set_body(test_name + " <= '1' when true");
+    // set all condition
+    if (_list_signal->empty()== false)
+      {
+	list<Signal*>::iterator i     = _list_signal->begin();
+
+	while (i != _list_signal->end())
+	  {
+	    (*i)->testbench_test_ok(vhdl);
+	    ++i;
+	  }
+      }
+    vhdl->set_body("else '0';");
+    vhdl->set_body("");
+
+    log_printf(FUNC,Behavioural,"testbench_test_ok","End");
+
+    return test_name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 41)
@@ -11,5 +11,6 @@
 namespace behavioural          {
 
-  Interfaces::Interfaces  (void)
+  Interfaces::Interfaces  (string name):
+    _name (name)
   {
     log_printf(FUNC,Behavioural,"Interfaces","Begin");
@@ -18,5 +19,6 @@
   };
 
-  Interfaces::Interfaces  (const Interfaces & interfaces)
+  Interfaces::Interfaces  (const Interfaces & interfaces) :
+    _name (interfaces._name)
   {
     log_printf(FUNC,Behavioural,"Interfaces (copy)","Begin");
@@ -28,4 +30,8 @@
   {
     log_printf(FUNC,Behavioural,"~Interfaces","Begin");
+
+#ifdef VHDL_TESTBENCH
+    testbench_generate_file ();
+#endif
 
     if (_list_interface->empty()== false)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_clock.cpp	(revision 41)
@@ -0,0 +1,45 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+  
+  string Interfaces::get_clock (void)
+  {
+    string clock = "";
+    
+    if (not _list_interface->empty())
+      {
+	list<Interface_fifo*>::iterator i     = _list_interface->begin();
+	
+	while (i != _list_interface->end())
+	  {
+	    string str = (*i)->get_clock ();
+
+	    if (str != "")
+	      {
+		if (clock != "")
+		  throw ErrorMorpheo ("<Interfaces.get_clock> : find too many clock.");
+		clock = str;
+	      }
+	    ++i;
+	  }
+      }
+
+    if (clock == "")
+      throw ErrorMorpheo ("<Interfaces.get_clock> : no clock find.");
+    
+    return clock;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_cycle.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_cycle.cpp	(revision 41)
@@ -0,0 +1,39 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  uint32_t Interfaces::get_cycle (void)
+  {
+    uint32_t cycle = 0;
+    
+    if (not _list_interface->empty())
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+	
+	while (i != _list_interface->end())
+	  {
+	    uint32_t x = (*i)->get_cycle ();
+	    
+	    if (x > cycle)
+	      cycle = x;
+
+	    ++i;
+	  }
+      }
+    
+    return cycle;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_signal.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_signal.cpp	(revision 41)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#ifdef VHDL
+#  ifdef VHDL_TESTBENCH
+  void Interfaces::get_signal (list<string> * & list_signal)
+  {
+    if (not _list_interface->empty())
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+	
+	while (i != _list_interface->end())
+	  {
+	    (*i)->get_signal (list_signal);
+	    ++i;
+	  }
+      }
+  };
+#  endif
+#endif
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 41)
@@ -28,21 +28,4 @@
 #endif
 
-
-#ifdef VHDL_TESTBENCH
-  void Interfaces::set_port (Vhdl_Testbench * & vhdl_testbench)
-  {
-    if (not _list_interface->empty())
-      {
-	list<Interface_fifo*>::iterator i     = _list_interface->begin();
-	
-	while (i != _list_interface->end())
-	  {
-	    (*i)->set_port (vhdl_testbench);
-	    ++i;
-	  }
-      }
-  };
-#endif
-
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_signal.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_signal.cpp	(revision 41)
@@ -0,0 +1,33 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#ifdef VHDL
+#  ifdef VHDL_TESTBENCH
+  void Interfaces::set_signal (Vhdl * & vhdl)
+  {
+    if (not _list_interface->empty())
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+	
+	while (i != _list_interface->end())
+	  {
+	    (*i)->set_signal (vhdl);
+	    ++i;
+	  }
+      }
+  };
+#  endif
+#endif
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp	(revision 41)
@@ -13,5 +13,5 @@
 namespace behavioural          {
 
-  void Interfaces::testbench (Vhdl_Testbench * & vhdl_testbench)
+  void Interfaces::testbench (void)
   {
     log_printf(FUNC,Behavioural,"testbench","Begin");
@@ -23,5 +23,5 @@
 	while (i != _list_interface->end())
 	  {
-	    (*i)->testbench(vhdl_testbench);
+	    (*i)->testbench();
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_body.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_body.cpp	(revision 41)
@@ -0,0 +1,53 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interfaces::testbench_body (Vhdl * & vhdl,
+				   string   counter_name)
+  {
+    log_printf(FUNC,Behavioural,"testbench_body","Begin");
+
+    string test      = "'1'";
+    string test_name = "test";
+    vhdl->set_signal(test_name,1);
+
+    if (_list_interface->empty()== false)
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    (*i)->testbench_body(vhdl, counter_name);
+	    string str = (*i)->testbench_test(vhdl, counter_name);
+
+	    test += " and "+str;
+	    ++i;
+	  }
+      }
+
+    vhdl->set_body("");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("-- Test");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("");
+    vhdl->set_body(test_name + " <= "+test+";");
+    vhdl->set_body("");
+
+    log_printf(FUNC,Behavioural,"testbench_body","End");
+
+    return test_name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench_generate_file.cpp	(revision 41)
@@ -0,0 +1,91 @@
+#ifdef VHDL_TESTBENCH
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interfaces::testbench_generate_file  (void)  
+  {
+    log_printf(FUNC,Behavioural,"generate_file","Begin");
+
+    Vhdl   * vhdl        = new Vhdl(_name+"_Testbench");
+    string   counter     = "counter";
+    string   clock       = this->get_clock();
+    uint32_t cycle       = this->get_cycle();
+
+    vhdl      ->set_signal    (counter, "natural", "0");
+    vhdl      ->set_signal    (clock  , 1        , 0); // modif Signal_set_signal
+    this->set_signal    (vhdl);
+
+    vhdl->set_body("");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("-- Component");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("");
+
+    list<string> * list_signal = new list<string>;
+    this->get_signal (list_signal);
+
+    vhdl->set_library_work (_name + "_Pack");
+    vhdl->set_body("instance_"+_name+" : "+_name);
+    vhdl->set_body("port map (");
+    
+    list<string>::iterator i   = list_signal->begin();
+    if (i != list_signal->end())
+      {
+        vhdl->set_body("\t "+*i+"\t=>\t"+*i);
+        ++i;
+      }
+    while (i != list_signal->end())
+      {
+        vhdl->set_body("\t,"+*i+"\t=>\t"+*i);
+        ++i;
+      }
+    vhdl->set_body("         );");
+
+    delete list_signal;
+
+    vhdl->set_body("");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("-- Port's affectation");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("");
+    string test_name = this->testbench_body(vhdl,counter);
+
+    vhdl->set_body("");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("-- process clock");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("");
+    vhdl->set_body(clock+" <= not "+clock+" after 50 ns;");
+    vhdl->set_body("");
+    vhdl->set_body("process ("+clock+")");
+    vhdl->set_body("begin");
+    vhdl->set_body("\tif "+clock+"'event and "+clock+" = '1' then");
+    vhdl->set_body("\t\t"+counter+" <= "+counter+"+1;");
+    vhdl->set_body("");
+    vhdl->set_body("\t\tassert     ("+test_name+" = '1') report \"Test KO\" severity FAILURE;");
+    vhdl->set_body("\t\tassert not ("+counter+" = "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
+    vhdl->set_body("");
+    vhdl->set_body("\tend if;");
+    vhdl->set_body("end process;");
+
+    vhdl->generate_file();
+
+    delete vhdl;
+    
+    log_printf(FUNC,Behavioural,"generate_file","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_clock.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_clock.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_clock.cpp	(revision 41)
@@ -0,0 +1,26 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Signal::get_clock (void)
+  {
+    if ((_presence_port == CLOCK_VHDL_YES) or
+	(_presence_port == CLOCK_VHDL_NO ))
+      return _name;
+    else
+      return "";
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name_vhdl.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name_vhdl.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name_vhdl.cpp	(revision 41)
@@ -0,0 +1,25 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Signal::get_name_vhdl (list<string> *& list_signal)
+  {
+    if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	(_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or
+	(_presence_port == CLOCK_VHDL_YES))
+      list_signal->push_back(_name);
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_port.cpp	(revision 41)
@@ -0,0 +1,48 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#ifdef VHDL
+  void Signal::set_port (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"set_port (Vhdl)","Begin");
+
+    if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	(_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or
+	(_presence_port == CLOCK_VHDL_YES))
+      vhdl->set_port (_name,_direction,_size);
+
+    log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
+  };
+
+#ifdef VHDL_TESTBENCH
+  void Signal::set_signal (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"set_signal (Vhdl)","Begin");
+    
+    if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES )//  or
+// 	(_presence_port == CLOCK_VHDL_YES) or
+// 	(_presence_port == CLOCK_VHDL_NO ) 
+	)
+      vhdl->set_signal (_name        ,_size);
+
+    if (_direction == OUT)
+      vhdl->set_signal (_name+"_test",_size);
+
+    log_printf(FUNC,Behavioural,"set_signal (Vhdl)","End");
+  };
+#endif
+#endif
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 41)
@@ -13,10 +13,10 @@
 
   // à optimisé -> pointeur de fonction afin d'éviter le test et le switch
-  void Signal::testbench (Vhdl_Testbench * & vhdl_testbench)
+  void Signal::testbench (void)
   {
     log_printf(FUNC,Behavioural,"testbench","Begin");
 
     if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
-	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES))
+	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES ))
       {
 	string str;
@@ -30,9 +30,7 @@
 	      switch (_direction)
 		{
-		case IN    : {vhdl_testbench->add_input (value);
-		              str =             toBase2 (value); break;}
-		case OUT   : {vhdl_testbench->add_output(value); 
-		              str =             toBase2 (value); break;}
-		case INOUT : {break;}
+		case IN    : {str =             toBase2 (value); break;}
+		case OUT   : {str =             toBase2 (value); break;}
+// 		case INOUT : {break;}
 		}
 	      break;
@@ -44,9 +42,7 @@
 	      switch (_direction)
 		{
-		case IN    : {vhdl_testbench->add_input (value); 
-		              str =             toBase2 (value,_size); break;}
-		case OUT   : {vhdl_testbench->add_output(value); 
-		              str =             toBase2 (value,_size); break;}
-		case INOUT : {break;}
+		case IN    : {str =             toBase2 (value,_size); break;}
+		case OUT   : {str =             toBase2 (value,_size); break;}
+// 		case INOUT : {break;}
 		}
 	      break;
@@ -58,9 +54,7 @@
 	      switch (_direction)
 		{
-		case IN    : {vhdl_testbench->add_input (value);
-		              str =             toBase2 (value,_size); break;}
-		case OUT   : {vhdl_testbench->add_output(value);
-                              str =             toBase2 (value,_size); break;}
-		case INOUT : {break;}		
+		case IN    : {str =             toBase2 (value,_size); break;}
+		case OUT   : {str =             toBase2 (value,_size); break;}
+// 		case INOUT : {break;}		
 		}
 	      break;
@@ -72,9 +66,7 @@
 	      switch (_direction)
 		{
-		case IN    : {vhdl_testbench->add_input (value); 
-		              str =             toBase2 (value,_size); break;}
-		case OUT   : {vhdl_testbench->add_output(value); 
-                              str =             toBase2 (value,_size); break;}
-		case INOUT : {break;}
+		case IN    : {str =             toBase2 (value,_size); break;}
+		case OUT   : {str =             toBase2 (value,_size); break;}
+// 		case INOUT : {break;}
 		}
 	      break;
@@ -86,9 +78,7 @@
 	      switch (_direction)
 		{
-		case IN    : {vhdl_testbench->add_input (value); 
-                              str =             toBase2 (value,_size); break;}
-		case OUT   : {vhdl_testbench->add_output(value); 
-                              str =             toBase2 (value,_size); break;}
-		case INOUT : {break;}
+		case IN    : {str =             toBase2 (value,_size); break;}
+		case OUT   : {str =             toBase2 (value,_size); break;}
+// 		case INOUT : {break;}
 		}
 	      break;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_body.cpp	(revision 41)
@@ -0,0 +1,55 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Signal::testbench_body (Vhdl * & vhdl,
+			       string   counter_name)
+  {
+    log_printf(FUNC,Behavioural,"testbench_body","Begin");
+
+    // _list_value is empty if we don't trace
+    if (_list_value->empty()== false)
+      {
+	string separator;
+	if (_size == 1)
+	  separator = "\'";
+	else
+	  separator = "\"";
+
+	string signame = (_direction==OUT)?(_name+"_test"):_name;
+
+	vhdl->set_body ("");
+	vhdl->set_body ("with "+counter_name+" select");
+	vhdl->set_body ("\t"+signame+" <=");
+	
+	uint32_t cpt = 0;
+	list<string>::iterator i = _list_value->begin();
+
+	while (i != _list_value->end())
+	  {
+	    list<string>::iterator j = i;
+
+	    ++i;
+	    
+	    if (i != _list_value->end())
+	      vhdl->set_body ("\t"+separator+*j+separator+" when "+toString(cpt++)+",");
+	    else
+	      vhdl->set_body ("\t"+separator+*j+separator+" when others;");
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"testbench_body","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_test_ok.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_test_ok.cpp	(revision 41)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench_test_ok.cpp	(revision 41)
@@ -0,0 +1,27 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  // à optimisé -> pointeur de fonction afin d'éviter le test et le switch
+  void Signal::testbench_test_ok (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_ok","Begin");
+
+    if (_direction == OUT)
+      vhdl->set_body ("and "+_name+" = "+_name+"_test");
+
+    log_printf(FUNC,Behavioural,"testbench_test_ok","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench.cpp	(revision 41)
@@ -13,21 +13,21 @@
 namespace behavioural          {
 
-  Vhdl_Testbench::Vhdl_Testbench  (string   name       ,
-				   bool     exhaustive ):
-    _name        (name       ),
-    _exhaustive  (exhaustive )
-  {
-    _vhdl = new Vhdl (_name + "_Testbench");
+//   Vhdl_Testbench::Vhdl_Testbench  (string   name       ,
+// 				   bool     exhaustive ):
+//     _name        (name       ),
+//     _exhaustive  (exhaustive )
+//   {
+//     _vhdl = new Vhdl (_name + "_Testbench");
 
-    _size_input  = 0;
-    _size_output = 0;
+//     _size_input  = 0;
+//     _size_output = 0;
 
-    _num_cycle   = 0;
-  };
+//     _num_cycle   = 0;
+//   };
   
-  Vhdl_Testbench::~Vhdl_Testbench ()
-  {
-    delete _vhdl;
-  };
+//   Vhdl_Testbench::~Vhdl_Testbench ()
+//   {
+//     delete _vhdl;
+//   };
   
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_input.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_input.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_input.cpp	(revision 41)
@@ -16,9 +16,9 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::add_input (uint32_t value)
-  {
-    _list_input_cycle.push_front(toBase2(value,*_num_input));
-    _num_input++;
-  };
+//   void Vhdl_Testbench::add_input (uint32_t value)
+//   {
+//     _list_input_cycle.push_front(toBase2(value,*_num_input));
+//     _num_input++;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_label.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_label.cpp	(revision 41)
@@ -16,8 +16,8 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::add_label (string label)
-  {
-    _list_label.push_back(label_t(_num_cycle,label));
-  };
+//   void Vhdl_Testbench::add_label (string label)
+//   {
+//     _list_label.push_back(label_t(_num_cycle,label));
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_output.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_output.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_output.cpp	(revision 41)
@@ -16,9 +16,9 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::add_output (uint32_t value)
-  {
-    _list_output_cycle.push_front(toBase2(value,*_num_output));
-    _num_output ++;
-  };
+//   void Vhdl_Testbench::add_output (uint32_t value)
+//   {
+//     _list_output_cycle.push_front(toBase2(value,*_num_output));
+//     _num_output ++;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_test.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_add_test.cpp	(revision 41)
@@ -16,8 +16,8 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::add_test (bool must_test)
-  {
-    _list_test.push_back(must_test);
-  };
+//   void Vhdl_Testbench::add_test (bool must_test)
+//   {
+//     _list_test.push_back(must_test);
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_file.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_file.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_file.cpp	(revision 41)
@@ -14,33 +14,33 @@
 namespace behavioural          {
 
-  void Vhdl_Testbench::generate_file (void)
-  {
-    _vhdl->set_library_work (_name + "_Pack");
+//   void Vhdl_Testbench::generate_file (void)
+//   {
+//     _vhdl->set_library_work (_name + "_Pack");
 
-    if (_size_input == 0)
-      throw (ErrorMorpheo ("No input for the test bench."));
-    if (_size_output == 0)
-      throw (ErrorMorpheo ("No output for the test bench."));
+//     if (_size_input == 0)
+//       throw (ErrorMorpheo ("No input for the test bench."));
+//     if (_size_output == 0)
+//       throw (ErrorMorpheo ("No output for the test bench."));
 
-    // Only 2 signals and a variable
-    _vhdl->set_signal   ("testbench_input"       ,std_logic(_size_input ));
-    _vhdl->set_signal   ("testbench_output"      ,std_logic(_size_output));
-    _vhdl->set_signal   ("testbench_test"        ,std_logic(_size_output));
-    _vhdl->set_signal   ("testbench_must_test"   ,std_logic(1));
-    _vhdl->set_signal   ("testbench_counter"     ,"natural","0");
+//     // Only 2 signals and a variable
+//     _vhdl->set_signal   ("testbench_input"       ,std_logic(_size_input ));
+//     _vhdl->set_signal   ("testbench_output"      ,std_logic(_size_output));
+//     _vhdl->set_signal   ("testbench_test"        ,std_logic(_size_output));
+//     _vhdl->set_signal   ("testbench_must_test"   ,std_logic(1));
+//     _vhdl->set_signal   ("testbench_counter"     ,"natural","0");
 
-    uint32_t counter = get_input  ();
-    get_output ();
-    get_test   ();
-    get_label  ();
+//     uint32_t counter = get_input  ();
+//     get_output ();
+//     get_test   ();
+//     get_label  ();
 
-//     if (counter == get_output ())
-//       throw (ErrorMorpheo ("The number of input is different of number of output."));
+// //     if (counter == get_output ())
+// //       throw (ErrorMorpheo ("The number of input is different of number of output."));
 
-    generate_instance      ();
-    generate_process_clock (counter);
+//     generate_instance      ();
+//     generate_process_clock (counter);
     
-    _vhdl->generate_file(false, true);
-  };
+//     _vhdl->generate_file(false, true);
+//   };
 
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_instance.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_instance.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_instance.cpp	(revision 41)
@@ -13,23 +13,23 @@
 namespace behavioural          {
 
-  void Vhdl_Testbench::generate_instance (void)
-  {
-    _vhdl->set_body("");
-    _vhdl->set_body("instance_"+_name+" : "+_name);
-    _vhdl->set_body("port map (");
+//   void Vhdl_Testbench::generate_instance (void)
+//   {
+//     _vhdl->set_body("");
+//     _vhdl->set_body("instance_"+_name+" : "+_name);
+//     _vhdl->set_body("port map (");
     
-    list<string>::iterator i   = _list_port.begin();
-    if (i != _list_port.end())
-      {
-        _vhdl->set_body("\t "+*i+"\t=>\t"+*i);
-        ++i;
-      }
-    while (i != _list_port.end())
-      {
-        _vhdl->set_body("\t,"+*i+"\t=>\t"+*i);
-        ++i;
-      }
-    _vhdl->set_body("         );");
-  };
+//     list<string>::iterator i   = _list_port.begin();
+//     if (i != _list_port.end())
+//       {
+//         _vhdl->set_body("\t "+*i+"\t=>\t"+*i);
+//         ++i;
+//       }
+//     while (i != _list_port.end())
+//       {
+//         _vhdl->set_body("\t,"+*i+"\t=>\t"+*i);
+//         ++i;
+//       }
+//     _vhdl->set_body("         );");
+//   };
 
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_process_clock.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_process_clock.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_generate_process_clock.cpp	(revision 41)
@@ -13,35 +13,35 @@
 namespace behavioural          {
 
-  void Vhdl_Testbench::generate_process_clock (uint32_t counter)
-  {
-    _vhdl->set_body("");
-    _vhdl->set_body(_clock_name+" <= not "+_clock_name+" after 50 ns;");
-    _vhdl->set_body("testbench_counter <= testbench_counter+1 after 100 ns;");
-    _vhdl->set_body("");
+//   void Vhdl_Testbench::generate_process_clock (uint32_t counter)
+//   {
+//     _vhdl->set_body("");
+//     _vhdl->set_body(_clock_name+" <= not "+_clock_name+" after 50 ns;");
+//     _vhdl->set_body("testbench_counter <= testbench_counter+1 after 100 ns;");
+//     _vhdl->set_body("");
 
-    _vhdl->set_body("process ("+_clock_name+")");
-    _vhdl->set_body("begin");
-    _vhdl->set_body("\tif "+_clock_name+"'event and "+_clock_name+" = '1' then");
-    _vhdl->set_body("");
-    _vhdl->set_body("\t\tassert (not ((testbench_must_test = '1') and not (testbench_test = testbench_output)))");
-    _vhdl->set_body("\t\treport \"   Test KO - output's test is different of output's component\"");
-    _vhdl->set_body("\t\tseverity FAILURE;");
-    _vhdl->set_body("");
-    _vhdl->set_body("\t\tassert (not ((testbench_must_test = '1') and     (testbench_test = testbench_output)))");
-    _vhdl->set_body("\t\treport \"   Test OK\"");
-    _vhdl->set_body("\t\tseverity NOTE;");
-    _vhdl->set_body("");
-    _vhdl->set_body("\t\tassert (not ( testbench_must_test = '0'))");
-    _vhdl->set_body("\t\treport \"No Test\"");
-    _vhdl->set_body("\t\tseverity NOTE;");
-    _vhdl->set_body("");
-    _vhdl->set_body("\tend if;");
-    _vhdl->set_body("end process;");
+//     _vhdl->set_body("process ("+_clock_name+")");
+//     _vhdl->set_body("begin");
+//     _vhdl->set_body("\tif "+_clock_name+"'event and "+_clock_name+" = '1' then");
+//     _vhdl->set_body("");
+//     _vhdl->set_body("\t\tassert (not ((testbench_must_test = '1') and not (testbench_test = testbench_output)))");
+//     _vhdl->set_body("\t\treport \"   Test KO - output's test is different of output's component\"");
+//     _vhdl->set_body("\t\tseverity FAILURE;");
+//     _vhdl->set_body("");
+//     _vhdl->set_body("\t\tassert (not ((testbench_must_test = '1') and     (testbench_test = testbench_output)))");
+//     _vhdl->set_body("\t\treport \"   Test OK\"");
+//     _vhdl->set_body("\t\tseverity NOTE;");
+//     _vhdl->set_body("");
+//     _vhdl->set_body("\t\tassert (not ( testbench_must_test = '0'))");
+//     _vhdl->set_body("\t\treport \"No Test\"");
+//     _vhdl->set_body("\t\tseverity NOTE;");
+//     _vhdl->set_body("");
+//     _vhdl->set_body("\tend if;");
+//     _vhdl->set_body("end process;");
     
-    _vhdl->set_body("");
-    _vhdl->set_body("assert (not (testbench_counter = " + toString(counter)+"))");
-    _vhdl->set_body("report \"End of Simulation\"");
-    _vhdl->set_body("severity FAILURE;");
-  };
+//     _vhdl->set_body("");
+//     _vhdl->set_body("assert (not (testbench_counter = " + toString(counter)+"))");
+//     _vhdl->set_body("report \"End of Simulation\"");
+//     _vhdl->set_body("severity FAILURE;");
+//   };
 
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_input.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_input.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_input.cpp	(revision 41)
@@ -16,30 +16,30 @@
 namespace behavioural          {
   
-  uint32_t Vhdl_Testbench::get_input (void)
-  {
-    list<string>::iterator i   = _list_input.begin();
+//   uint32_t Vhdl_Testbench::get_input (void)
+//   {
+//     list<string>::iterator i   = _list_input.begin();
     
-    uint32_t counter = 0;
+//     uint32_t counter = 0;
 
-    if (i != _list_input.end())
-      {
-	_vhdl->set_body ("");
-	_vhdl->set_body ("with testbench_counter select");
-	_vhdl->set_body ("\ttestbench_input <=");
+//     if (i != _list_input.end())
+//       {
+// 	_vhdl->set_body ("");
+// 	_vhdl->set_body ("with testbench_counter select");
+// 	_vhdl->set_body ("\ttestbench_input <=");
 
-	while (i != _list_input.end())
-	  {
-	    list<string>::iterator j = i;
-	    ++i;
+// 	while (i != _list_input.end())
+// 	  {
+// 	    list<string>::iterator j = i;
+// 	    ++i;
 
-	    if (i != _list_input.end())
-	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
-	    else
-	      _vhdl->set_body ("\t\""+*j+"\" when others;");
-	  }
-      }
+// 	    if (i != _list_input.end())
+// 	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
+// 	    else
+// 	      _vhdl->set_body ("\t\""+*j+"\" when others;");
+// 	  }
+//       }
 
-    return counter;
-  };
+//     return counter;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_label.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_label.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_label.cpp	(revision 41)
@@ -16,14 +16,14 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::get_label (void)
-  {
-    for (list<label_t>::iterator i = _list_label.begin(); i != _list_label.end(); i++)
-      {
-	_vhdl->set_body("");
-	_vhdl->set_body("assert (not (testbench_counter = " + toString(i->_cycle)+"))");
-	_vhdl->set_body("report \"***** "+i->_label+" *****\"");
-	_vhdl->set_body("severity NOTE;");  
-      }
-  };
+//   void Vhdl_Testbench::get_label (void)
+//   {
+//     for (list<label_t>::iterator i = _list_label.begin(); i != _list_label.end(); i++)
+//       {
+// 	_vhdl->set_body("");
+// 	_vhdl->set_body("assert (not (testbench_counter = " + toString(i->_cycle)+"))");
+// 	_vhdl->set_body("report \"***** "+i->_label+" *****\"");
+// 	_vhdl->set_body("severity NOTE;");  
+//       }
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_output.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_output.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_output.cpp	(revision 41)
@@ -16,30 +16,30 @@
 namespace behavioural          {
   
-  uint32_t Vhdl_Testbench::get_output (void)
-  {
-    list<string>::iterator i   = _list_output.begin();
+//   uint32_t Vhdl_Testbench::get_output (void)
+//   {
+//     list<string>::iterator i   = _list_output.begin();
     
-    uint32_t counter = 0;
+//     uint32_t counter = 0;
 
-    if (i != _list_output.end())
-      {
-	_vhdl->set_body ("");
-	_vhdl->set_body ("with testbench_counter select");
-	_vhdl->set_body ("\ttestbench_test <=");
+//     if (i != _list_output.end())
+//       {
+// 	_vhdl->set_body ("");
+// 	_vhdl->set_body ("with testbench_counter select");
+// 	_vhdl->set_body ("\ttestbench_test <=");
 
-	while (i != _list_output.end())
-	  {
-	    list<string>::iterator j = i;
-	    ++i;
+// 	while (i != _list_output.end())
+// 	  {
+// 	    list<string>::iterator j = i;
+// 	    ++i;
 
-	    if (i != _list_output.end())
-	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
-	    else
-	      _vhdl->set_body ("\t\""+*j+"\" when others;");
-	  }
-      }
+// 	    if (i != _list_output.end())
+// 	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
+// 	    else
+// 	      _vhdl->set_body ("\t\""+*j+"\" when others;");
+// 	  }
+//       }
 
-    return counter;
-  };
+//     return counter;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_test.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_test.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_get_test.cpp	(revision 41)
@@ -16,32 +16,32 @@
 namespace behavioural          {
   
-  uint32_t Vhdl_Testbench::get_test (void)
-  {
-    list<bool>::iterator i   = _list_test.begin();
+//   uint32_t Vhdl_Testbench::get_test (void)
+//   {
+//     list<bool>::iterator i   = _list_test.begin();
     
-    uint32_t counter = 0;
+//     uint32_t counter = 0;
 
-    if (i != _list_test.end())
-      {
-	_vhdl->set_body ("");
-	_vhdl->set_body ("with testbench_counter select");
-	_vhdl->set_body ("\ttestbench_must_test <=");
+//     if (i != _list_test.end())
+//       {
+// 	_vhdl->set_body ("");
+// 	_vhdl->set_body ("with testbench_counter select");
+// 	_vhdl->set_body ("\ttestbench_must_test <=");
 
-	while (i != _list_test.end())
-	  {
-	    list<bool>::iterator j = i;
-	    ++i;
+// 	while (i != _list_test.end())
+// 	  {
+// 	    list<bool>::iterator j = i;
+// 	    ++i;
 
-	    string str = (*j==true)?"1":"0";
+// 	    string str = (*j==true)?"1":"0";
 
-	    if (i != _list_test.end())
-	      _vhdl->set_body ("\t'"+str+"' when "+toString(counter++)+",");
-	    else
-	      _vhdl->set_body ("\t'"+str+"' when others;");
-	  }
-      }
+// 	    if (i != _list_test.end())
+// 	      _vhdl->set_body ("\t'"+str+"' when "+toString(counter++)+",");
+// 	    else
+// 	      _vhdl->set_body ("\t'"+str+"' when others;");
+// 	  }
+//       }
 
-    return counter;
-  };
+//     return counter;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_new_cycle.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_new_cycle.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_new_cycle.cpp	(revision 41)
@@ -16,14 +16,14 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::new_cycle (void)
-  {
-    set_input();
-    set_output();
+//   void Vhdl_Testbench::new_cycle (void)
+//   {
+//     set_input();
+//     set_output();
 
-    _num_input   = _list_input_size .begin();
-    _num_output  = _list_output_size.begin();
+//     _num_input   = _list_input_size .begin();
+//     _num_output  = _list_output_size.begin();
 
-    _num_cycle ++;
-  };
+//     _num_cycle ++;
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_clock.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_clock.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_clock.cpp	(revision 41)
@@ -16,16 +16,16 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::set_clock (string name,
-				  bool   model_have_clock)
-  {
-    _clock_name = name;
-    _vhdl->set_signal (name,std_logic(1),"'0'");
+//   void Vhdl_Testbench::set_clock (string name,
+// 				  bool   model_have_clock)
+//   {
+//     _clock_name = name;
+//     _vhdl->set_signal (name,std_logic(1),"'0'");
 
-    if (model_have_clock == true)
-      _list_port.push_back(name);
+//     if (model_have_clock == true)
+//       _list_port.push_back(name);
 
-    _num_input   = _list_input_size .begin();
-    _num_output  = _list_output_size.begin();
-  };
+//     _num_input   = _list_input_size .begin();
+//     _num_output  = _list_output_size.begin();
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_input.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_input.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_input.cpp	(revision 41)
@@ -16,17 +16,17 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::set_input (void)
-  {
-    string text = "";
+//   void Vhdl_Testbench::set_input (void)
+//   {
+//     string text = "";
 
-    while (_list_input_cycle.empty() == false)
-      {
-	text += _list_input_cycle.front();
+//     while (_list_input_cycle.empty() == false)
+//       {
+// 	text += _list_input_cycle.front();
 
-	_list_input_cycle.pop_front();
-      }
+// 	_list_input_cycle.pop_front();
+//       }
 
-    _list_input.push_back(text);
-  };
+//     _list_input.push_back(text);
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_output.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_output.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_output.cpp	(revision 41)
@@ -16,17 +16,17 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::set_output (void)
-  {
-    string text = "";
+//   void Vhdl_Testbench::set_output (void)
+//   {
+//     string text = "";
 
-    while (_list_output_cycle.empty() == false)
-      {
-	text += _list_output_cycle.front();
+//     while (_list_output_cycle.empty() == false)
+//       {
+// 	text += _list_output_cycle.front();
 
-	_list_output_cycle.pop_front();
-      }
+// 	_list_output_cycle.pop_front();
+//       }
 
-    _list_output.push_back(text);
-  };
+//     _list_output.push_back(text);
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_port.cpp	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench_set_port.cpp	(revision 41)
@@ -16,35 +16,35 @@
 namespace behavioural          {
   
-  void Vhdl_Testbench::set_port (string      name     ,
-				 direction_t direction,
-				 uint32_t    size     )
-  {
-    string   name2;
-    uint32_t size_old;
-    if (direction == IN)
-      {
-	_list_input_size.push_back(size);
-	size_old      = _size_input;
-	_size_input  += size;
-	name2         = "testbench_input";
-      }
-    else
-      {
-	_list_output_size.push_back(size);
-	size_old      = _size_output;
-	_size_output += size;
-	name2         = "testbench_output";
-      }
+//   void Vhdl_Testbench::set_port (string      name     ,
+// 				 direction_t direction,
+// 				 uint32_t    size     )
+//   {
+//     string   name2;
+//     uint32_t size_old;
+//     if (direction == IN)
+//       {
+// 	_list_input_size.push_back(size);
+// 	size_old      = _size_input;
+// 	_size_input  += size;
+// 	name2         = "testbench_input";
+//       }
+//     else
+//       {
+// 	_list_output_size.push_back(size);
+// 	size_old      = _size_output;
+// 	_size_output += size;
+// 	name2         = "testbench_output";
+//       }
 
-    string range;
-    if (size == 1)
-      range = "("+toString(size_old)+")";
-    else
-      range = "("+toString(size_old+size-1)+" downto "+toString(size_old)+")";
+//     string range;
+//     if (size == 1)
+//       range = "("+toString(size_old)+")";
+//     else
+//       range = "("+toString(size_old+size-1)+" downto "+toString(size_old)+")";
     
-    _vhdl->set_alias (name, std_logic(size), name2, range);
+//     _vhdl->set_alias (name, std_logic(size), name2, range);
 
-    _list_port.push_back(name);
-  };
+//     _list_port.push_back(name);
+//   };
   
 }; // end namespace behavioural          
Index: /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Documents/document-morpheo-interface_processor_cache/fr/root.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Documents/document-morpheo-interface_processor_cache/fr/root.tex	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Documents/document-morpheo-interface_processor_cache/fr/root.tex	(revision 41)
@@ -38,5 +38,5 @@
 \end{description}
 
-La requête est effective quand les signaux XXX\_VAL et XXX\_ACK valent tous les 1 à la fin d'un cycle.
+La requête est effective quand les signaux XXX\_VAL et XXX\_ACK valent tous les deux 1 à la fin d'un cycle.
 
 \subsection{Champ : REQ\_UNC}
@@ -131,5 +131,5 @@
 RSP\_PKTID         & CPU to CACHE & {\it SIZE\_PKTID} bits\\
 RSP\_RDATA         & CACHE to CPU & {\it SIZE\_DATA} bits\\
-RSP\_ERR           & CACHE to CPU & {\it 2} bits\\
+RSP\_ERR           & CACHE to CPU & {\it 1} bit\\
 \end{tabular}
 \end{center}
@@ -157,5 +157,5 @@
   0 & 0 & 1 & 0 & Invalidate                  \\
   0 & 0 & 1 & 1 & Prefetch                    \\
-  0 & 1 & 0 & 0 & Write 8  bits ack           \\
+  0 & 1 & 0 & 0 & {\it non utilisé}           \\
   0 & 1 & 0 & 1 & {\it non utilisé}           \\
   0 & 1 & 1 & 0 & Flush                       \\
@@ -184,6 +184,5 @@
 \item[Flush      :] Invalide la ligne de cache contenant l'adresse fournit, et propage les éventuelles écritures jusqu'à la mémoire\\
 {\it Remarque :} Le flush va implicitement déverrouiller la ligne de cache.
-\item[Write      :] Demande de l'écriture d'une donnée. Aucun acquittement ne sera retourné au processeur.
-\item[Write ack  :] Demande de l'écriture d'une donnée. Une fois effectué, un acquittement sera retourné au processeur par l'intermédiaire de l'interface de réponse.
+\item[Write      :] Demande de l'écriture d'une donnée. Une fois effectué, un acquittement sera retourné au processeur par l'intermédiaire de l'interface de réponse.
 \end{description}
 
@@ -193,30 +192,23 @@
 
 \begin{center}
-\begin{tabular}{|cc||l|}
-  \hline
-  b1 & b0 & Description \\
-  \hline
-  \hline
-  0  & 0  & NOERR            \\  
-  0  & 1  & BERR\_PRECISE    \\
-  1  & 1  & BERR\_UNPRECISE  \\
-  \hline
-\end{tabular}
-\end{center}
-\begin{description}
-\item[NOERR           : ] indique qu'il n'y a aucune erreur lors de la requête.
-\item[BERR\_PRECISE   : ] indique qu'il y a eu une erreur de transmission lors d'un accès mémoire.
-{\it Remarque : } Seul les requêtes de type {\it Read}, {\it Write 8 bits ack} peuvent générées cette erreur.
-\item[BERR\_UNPRECISE : ] indique qu'il y a eu une erreur de transmission lors d'un accès mémoire.
-{\it Remarque : } Seul les requêtes de type {\it Write 8 bits}, {\it Write 16 bits}, {\it Write 32 bits}, {\it Write 64 bits} peuvent générées cette erreur.
-\end{description}
-
-Au contraire de l'exception BERR\_PRECISE qui ne peut être provoqué que par des requêtes demandant un acquittement, l'exception BERR\_UNPRECISE est provoqué par des requête qui ne demande pas d'acquittement. Le processeur doit être capable de traiter ce genre d'erreur.
+\begin{tabular}{|c||l|}
+  \hline
+  b0 & Description \\
+  \hline
+  \hline
+  0  & NOERR   \\  
+  1  & BERR    \\
+  \hline
+\end{tabular}
+\end{center}
+\begin{description}
+\item[NOERR  : ] indique qu'il n'y a aucune erreur lors de la requête.
+\item[BERR   : ] indique qu'il y a eu une erreur de transmission lors d'un accès mémoire.
+{\it Remarque : } Seul les requêtes de type {\it Read}, {\it Write 8 bits}, {\it Write 16 bits}, {\it Write 32 bits}, {\it Write 64 bits} peuvent générées cette erreur.
+\end{description}
 
 \section{Protocole de communication}
 
-Il y a un échange sur une des sous interface si VAL AND ACK = 1.
-
-Lors d'une requête de lecture, la hiérarchie mémoire envoie la donnée sur le port des réponses de manière asynchrone et de manière non ordonnée (une requête de lecture ancienne peut répondre après une requête de lecture nouvelle. C'est au processeur de gérer le ré-ordonnancement)
+Il y a un échange sur une des sous interface si VAL AND ACK = 1. Toute requête entraîne une réponse. Les réponses n'arrive pas dans l'ordre émisent sur l'interface des réponses.
 
 Sur le port des requêtes, si le cache est occupé, le processeur peut changer au cycle suivant sa requête (typiquement donne la main à un autre thread). Par contre sur le port des réponses, tant que le processeur est occupé, le cache maintient sa réponse. (Ceci permet d'éviter les questions : quand réémettre la réponse? et quel évènement déclenche la remise de la réponse?)
Index: /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/ppt-style.sty
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/ppt-style.sty	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Include/ppt-style.sty	(revision 41)
@@ -12,4 +12,5 @@
 \bibliographystyle{plain}
 
+\useoutertheme{infolines}
 
 %% % file, Dimension
Index: /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Package/presentation-share_architectural_ressources_between_hardware_context.tex
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Package/presentation-share_architectural_ressources_between_hardware_context.tex	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Documentation/Source/Package/presentation-share_architectural_ressources_between_hardware_context.tex	(revision 41)
@@ -1,3 +1,3 @@
 \usepackage{beamerthemetree}
 
-\setbeameroption{show notes on second screen}
+%\setbeameroption{show notes on second screen}
Index: /trunk/IPs/systemC/processor/Morpheo/Include/ToBase2.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Include/ToBase2.h	(revision 40)
+++ /trunk/IPs/systemC/processor/Morpheo/Include/ToBase2.h	(revision 41)
@@ -14,9 +14,9 @@
 namespace morpheo              {
 
-  inline string toBase2 (uint32_t value, uint32_t size)
+  template<typename T> inline std::string toBase2 (const T& value, const uint32_t & size)
   {
     ostringstream res;
-    uint32_t      mask = 1<<(size-1);
-
+    T mask = 1<<(size-1);
+    
     while (mask != 0)
       {
@@ -27,5 +27,31 @@
     return res.str();
   }
-  
+
+  inline std::string toBase2 (const bool    & value)
+  {
+    return toBase2<bool   >  (value, 1);
+  }
+
+  inline std::string toBase2 (const uint8_t & value, const uint32_t & size)
+  {
+    return toBase2<uint8_t>  (value, size);
+  }
+
+  inline std::string toBase2 (const uint16_t& value, const uint32_t & size)
+  {
+    return toBase2<uint16_t> (value, size);
+  }
+
+  inline std::string toBase2 (const uint32_t& value, const uint32_t & size)
+  {
+    return toBase2<uint32_t> (value, size);
+  }
+
+  inline std::string toBase2 (const uint64_t& value, const uint32_t & size)
+  {
+    return toBase2<uint64_t> (value, size);
+  }
+
+
 }; // end namespace morpheo              
 
