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 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_testbench_transition.cpp	(revision 38)
@@ -27,18 +27,6 @@
     // (because we have no control on the ordonnancer's policy)
 
-    _vhdl_testbench->add_input (PORT_READ( in_NRESET));
-    
-    for (uint32_t i=0; i<_param._nb_entity; i++)
-      {
-	_vhdl_testbench->add_input (PORT_READ( in_VAL [i]));
-	if (_param._encoding_one_hot)
-	_vhdl_testbench->add_output(PORT_READ(out_ACK [i]));
-      }
-    
-    if (_param._encoding_compact)
-      {
-    _vhdl_testbench->add_output(PORT_READ(out_ENTITY));
-    _vhdl_testbench->add_output(PORT_READ(out_ENTITY_ACK));
-      }
+    _interfaces->testbench(_vhdl_testbench);
+
     // add_test :
     //  - True  : the cycle must be compare with the output of systemC
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.flags	(revision 38)
@@ -20,5 +20,6 @@
 					-DPOSITION       	\
 					-DCONFIGURATION  	\
-					-DDEBUG=DEBUG_ALL    
+					-DDEBUG=DEBUG_ALL   
+
 					
 # Flags :
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Debug_component.h	(revision 38)
@@ -8,8 +8,8 @@
 #define     DEBUG_Shifter                                   false
 #define     DEBUG_Register_File                             false 
-#define     DEBUG_RegisterFile_Multi_Banked                 true
-#define       DEBUG_RegisterFile_Multi_Banked_Glue          true
+#define     DEBUG_RegisterFile_Multi_Banked                 false
+#define       DEBUG_RegisterFile_Multi_Banked_Glue          false
 #define     DEBUG_Select                                    false
-#define       DEBUG_Select_Priority_Fixed                   true 
+#define       DEBUG_Select_Priority_Fixed                   false 
 #define     DEBUG_Victim                                    false
 #define       DEBUG_Victim_Pseudo_LRU                       false
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 38)
@@ -57,8 +57,8 @@
   public    : Interface  *          find_interface    (string name);
 
-  public    : void                  mapping           (uint32_t size_x,
-						       uint32_t size_y,
-						       uint32_t pos_x ,
-						       uint32_t pos_y );
+  public    : void                  mapping           (uint32_t pos_x,
+						       uint32_t pos_y,
+						       uint32_t size_x ,
+						       uint32_t size_y );
 
   public    : XML                   toXML             (void);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 38)
@@ -44,4 +44,7 @@
   private   :       string          _comment      ;
 
+  private   : list<Signal *>      * _list_signal  ;
+
+
 #ifdef POSITION
   private   :       bool            _is_map       ;
@@ -49,5 +52,4 @@
   private   :       void          * _interface_map; // pour être homogène avec _entity_map
 #endif
-  private   : list<Signal>        * _list_signal  ;
 
     // -----[ methods ]---------------------------------------------------
@@ -73,6 +75,11 @@
 							  presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
+      log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
+
       Signal * sig = set_signal (name, IN , size, presence_port);
       sc_in_clk * signal = new sc_in_clk (sig->_name.c_str());
+
+      log_printf(FUNC,Behavioural,"set_signal_clk","End");
+
       return signal;
     };
@@ -83,7 +90,15 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
+      log_printf(FUNC,Behavioural,"set_signal_in","Begin");
+
       Signal * sig = set_signal (name, IN , size, presence_port);
-      sc_in <T> * signal = new sc_in <T> (sig->_name.c_str());
-      return signal;
+      sc_in <T> * port = new sc_in <T> (sig->_name.c_str());
+#ifdef VHDL_TESTBENCH
+      sig->alloc<T> (static_cast<void *>(port));
+#endif
+
+      log_printf(FUNC,Behavioural,"set_signal_in","End");
+
+      return port;
     };
 
@@ -93,7 +108,15 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
+      log_printf(FUNC,Behavioural,"set_signal_out","Begin");
+
       Signal * sig = set_signal (name, OUT , size, presence_port);
-      sc_out <T> * signal = new sc_out <T> (sig->_name.c_str());
-      return signal;
+      sc_out <T> * port = new sc_out <T> (sig->_name.c_str());
+#ifdef VHDL_TESTBENCH
+      sig->alloc<T> (static_cast<void *>(port));
+#endif
+
+      log_printf(FUNC,Behavioural,"set_signal_out","End");
+
+      return port;
     };
 #endif
@@ -111,4 +134,8 @@
 #endif
 
+#ifdef VHDL_TESTBENCH
+  public    : void                  testbench            (Vhdl_Testbench * & vhdl_testbench);
+#endif
+
   public    : XML                   toXML                (void);
 #ifdef POSITION
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 38)
@@ -30,5 +30,5 @@
   {
     // -----[ fields ]----------------------------------------------------
-  private   : list<Interface>     * _list_interface;
+  private   : list<Interface*>    * _list_interface;
 
     // -----[ methods ]---------------------------------------------------
@@ -55,4 +55,8 @@
   public    : Interface  *          find_interface        (string name);
 
+#ifdef VHDL_TESTBENCH
+  public    : void                  testbench             (Vhdl_Testbench * & vhdl_testbench);
+#endif
+
   public    : XML                   toXML                 (void);
 #ifdef POSITION
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h	(revision 38)
@@ -38,9 +38,9 @@
   private   : string                get_entity        (void);
 
-  public    : void                  set_component     (Entity * entity,
-						       uint32_t size_x,
-						       uint32_t size_y,
-						       uint32_t pos_x ,
-						       uint32_t pos_y );
+  public    : void                  set_component     (Position * position,
+						       uint32_t   pos_x  ,
+						       uint32_t   pos_y  ,
+						       uint32_t   size_x ,
+						       uint32_t   size_y );
 
   private   : string                get_component     (void);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 38)
@@ -9,8 +9,18 @@
  */
 
+#ifdef SYSTEMC
+#include "systemc.h"
+#endif
+
 #include <stdint.h>
 #include <iostream>
+
+#ifdef VHDL_TESTBENCH
+#include "Behavioural/include/Vhdl_Testbench.h"
+#endif
+
 #include "Behavioural/include/Direction.h"
 #include "Behavioural/include/XML.h"
+#include "Include/ErrorMorpheo.h"
 #include "Include/ToString.h"
 #include "Include/Debug.h"
@@ -20,4 +30,11 @@
 namespace morpheo              {
 namespace behavioural          {
+
+  typedef enum {UNKNOW                     ,
+		BOOL                       ,
+		UINT8_T                    ,
+		UINT16_T                   ,
+		UINT32_T                   ,
+		UINT64_T                   } type_info_t;
 
   typedef enum {PORT_VHDL_YES_TESTBENCH_YES,
@@ -36,4 +53,9 @@
   private   : const presence_port_t _presence_port;
 
+#ifdef VHDL_TESTBENCH
+  private   : void *                _signal       ;
+  private   : type_info_t           _type_info    ;
+#endif
+
     // -----[ methods ]---------------------------------------------------
   public    :                   Signal          (string          name          ,
@@ -43,4 +65,34 @@
   public    :                   Signal          (const Signal &);
   public    :                   ~Signal         ();
+
+#ifdef VHDL_TESTBENCH
+  public    : void              testbench       (Vhdl_Testbench * & vhdl_testbench);
+
+  public    : template <typename T>
+              void              alloc           (void * port)
+    {
+      if (_type_info != UNKNOW)
+	throw (ErrorMorpheo ("Signal \""+_name+"\" : already allocate."));
+
+      _signal    = port;
+
+      if (typeid(T) == typeid(bool    ))
+	_type_info = BOOL;
+      else
+      if (typeid(T) == typeid(uint8_t ))
+	_type_info = UINT8_T;
+      else
+      if (typeid(T) == typeid(uint16_t))
+	_type_info = UINT16_T;
+      else
+      if (typeid(T) == typeid(uint32_t))
+	_type_info = UINT32_T;
+      else
+      if (typeid(T) == typeid(uint64_t))
+	_type_info = UINT64_T;
+      else
+	_type_info = UNKNOW;
+    }
+#endif
 
   public    : XML               toXML           (void);
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 38)
@@ -19,5 +19,7 @@
     _schema     (schema    )
   {
+    log_printf(FUNC,Behavioural,"Entity","Begin");
     _is_map = false;
+    log_printf(FUNC,Behavioural,"Entity","End");
   };
 
@@ -27,12 +29,16 @@
     _schema     (entity._schema    )
   {
+    log_printf(FUNC,Behavioural,"Entity (copy)","Begin");
     _is_map     = entity._is_map    ;
     _interfaces = entity._interfaces;
     _comment    = entity._comment   ;
+    log_printf(FUNC,Behavioural,"Entity (copy)","End");
   };
   
   Entity::~Entity ()
   {
+    log_printf(FUNC,Behavioural,"~Entity","Begin");
     delete _interfaces;
+    log_printf(FUNC,Behavioural,"~Entity","End");
   };
   
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp	(revision 38)
@@ -13,8 +13,8 @@
 namespace behavioural          {
 
-  void Entity::mapping (uint32_t size_x,
-			uint32_t size_y,
-			uint32_t pos_x ,
-			uint32_t pos_y )
+  void Entity::mapping (uint32_t pos_x,
+			uint32_t pos_y,
+			uint32_t size_x ,
+			uint32_t size_y )
   {
     if (_is_map != false)
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 38)
@@ -18,8 +18,16 @@
     _localisation (localisation)
   {
-    _list_signal = new list<Signal>;
+    log_printf(FUNC,Behavioural,"Interface","Begin");
+
+    _comment     = "";
+    _list_signal = new (list<Signal*>);
+
 #ifdef POSITION
-    _is_map      = false;
+     _is_map        = false;
+     _entity_map    = NULL;
+     _interface_map = NULL;
 #endif
+
+    log_printf(FUNC,Behavioural,"Interface","End");
   };
 
@@ -29,14 +37,32 @@
     _localisation (interface._localisation)
   {
-    _comment     = interface._comment    ;
-    _list_signal = interface._list_signal;
+    log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
+    _comment       = interface._comment    ;
+    _list_signal   = interface._list_signal;
 #ifdef POSITION
-    _is_map      = interface._is_map     ;
+    _is_map        = interface._is_map     ;
+    _entity_map    = interface._entity_map   ;
+    _interface_map = interface._interface_map;
 #endif
+    log_printf(FUNC,Behavioural,"Interface (copy)","End");
   };
   
   Interface::~Interface ()
   {
+    log_printf(FUNC,Behavioural,"~Interface","Begin");
+
+    if (_list_signal->empty()== false)
+      {
+	list<Signal*>::iterator i     = _list_signal->begin();
+
+	while (i != _list_signal->end())
+	  {
+	    delete (*i);
+	    ++i;
+	  }
+      }
+
     delete _list_signal;
+    log_printf(FUNC,Behavioural,"~Interface","End");
   };
   
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp	(revision 38)
@@ -14,5 +14,8 @@
   string Interface::get_comment (void)
   {
-    return _comment;
+    log_printf(FUNC,Behavioural,"get_comment","Begin");
+    string res = _comment;
+    log_printf(FUNC,Behavioural,"get_comment","End");
+    return res;
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 38)
@@ -14,4 +14,5 @@
   string Interface::get_signal (void)
   {
+    log_printf(FUNC,Behavioural,"get_signal","Begin");
     uint32_t               depth          = 0;
     string                 separator      = ",\n";
@@ -19,5 +20,5 @@
 
 
-    list<Signal>::iterator i     = _list_signal->begin();
+    list<Signal*>::iterator i    = _list_signal->begin();
     bool                   empty = _list_signal->empty();
 
@@ -30,5 +31,5 @@
 	if (i != _list_signal->end())
 	  {
-	    text << tab << *i;
+	    text << tab << **i;
 	    ++i;
 	  }
@@ -37,11 +38,12 @@
 	  {
 	    text << separator;
-	    text << tab << *i;
+	    text << tab << **i;
 	    ++i;
 	  }
-	
 	if (last_separator)
 	  text << separator;
       }
+
+    log_printf(FUNC,Behavioural,"get_signal","End");
 
     return text.str();
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 38)
@@ -16,8 +16,9 @@
 			    void * interface)
   {
+    log_printf(FUNC,Behavioural,"port_map","Begin");
     _is_map        = true     ;
     _entity_map    = entity   ;
     _interface_map = interface;
-
+    log_printf(FUNC,Behavioural,"port_map","End");
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 38)
@@ -15,7 +15,9 @@
 		       morpheo::behavioural::Interface & x)
   {
+    log_printf(FUNC,Behavioural,"operator<<","Begin");
     output_stream << x._name + "\t"+toString(x._localisation)+"\t"+toString(x._direction) << endl;
     output_stream << x.get_comment() << endl;
     output_stream << x.get_signal () << endl;
+    log_printf(FUNC,Behavioural,"operator<<","End");
     return output_stream;
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp	(revision 38)
@@ -14,5 +14,7 @@
   void Interface::set_comment (string comment)
   {
+    log_printf(FUNC,Behavioural,"set_comment","Begin");
     _comment = _comment + comment;
+    log_printf(FUNC,Behavioural,"set_comment","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 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 38)
@@ -15,34 +15,38 @@
   void Interface::set_port (Vhdl * & vhdl)
   {
+    log_printf(FUNC,Behavioural,"set_port (Vhdl)","Begin");
     if (not _list_signal->empty())
       {
-	list<Signal>::iterator i     = _list_signal->begin();
+	list<Signal*>::iterator i     = _list_signal->begin();
 	
 	while (i != _list_signal->end())
 	  {
-	    presence_port_t p = (*i)._presence_port;
+	    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);
+	      vhdl->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
 	    ++i;
 	  }
       }
+    log_printf(FUNC,Behavioural,"set_port (Vhdl)","End");
   };
 
   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();
+	list<Signal*>::iterator i     = _list_signal->begin();
 	
 	while (i != _list_signal->end())
 	  {
-	    presence_port_t p = (*i)._presence_port;
+	    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);
+	      vhdl_testbench->set_port ((*i)->_name,(*i)->_direction,(*i)->_size);
 	    ++i;
 	  }
       }
+    log_printf(FUNC,Behavioural,"set_port (Testbench)","End");
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 38)
@@ -12,11 +12,4 @@
 namespace behavioural          {
 
-//   string Interface::set_signal (Signal signal)
-//   {
-//     return set_signal(signal._name     ,
-// 		      signal._direction,
-// 		      signal._size     );
-//   };
-
   Signal * Interface::set_signal (string          name     ,
 				  direction_t     direction,
@@ -24,4 +17,5 @@
 				  presence_port_t presence_port)
   {
+    log_printf(FUNC,Behavioural,"set_signal","Begin");
     string str_direction =  toString(direction);
     string str_interface = _name;
@@ -37,10 +31,13 @@
     if (name  != "")
       signame += "_"+str_signal;
-    
+
     Signal * sig = new Signal (signame      ,
 			       direction    ,
 			       size         ,
 			       presence_port);
-    _list_signal->push_back (*sig);
+
+    _list_signal->push_back (sig);
+
+    log_printf(FUNC,Behavioural,"set_signal","End");
 
     return sig;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp	(revision 38)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_testbench.cpp	(revision 38)
@@ -0,0 +1,35 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface::testbench (Vhdl_Testbench * & vhdl_testbench)
+  {
+    log_printf(FUNC,Behavioural,"testbench","Begin");
+
+    if (_list_signal->empty()== false)
+      {
+	list<Signal*>::iterator i     = _list_signal->begin();
+
+	while (i != _list_signal->end())
+	  {
+	    (*i)->testbench(vhdl_testbench);
+	    ++i;
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"testbench","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 38)
@@ -14,4 +14,6 @@
   XML Interface::toXML (void)
   {
+    log_printf(FUNC,Behavioural,"toXML","Begin");
+
     XML xml ("interface");
     
@@ -25,9 +27,9 @@
     if (_list_signal->empty()== false)
       {
-	list<Signal>::iterator i     = _list_signal->begin();
+	list<Signal*>::iterator i     = _list_signal->begin();
 
 	while (i != _list_signal->end())
 	  {
-	    xml.  insert_XML ((*i).toXML());
+	    xml.  insert_XML ((*i)->toXML());
 	    ++i;
 	  }
@@ -35,5 +37,7 @@
 
     xml.balise_close      ();
-     
+
+    log_printf(FUNC,Behavioural,"toXML","End");
+    
     return xml;
   };
@@ -42,4 +46,6 @@
   XML Interface::toXML_mapping (void)
   {
+    log_printf(FUNC,Behavioural,"toXML_mapping","Begin");
+
     if (_is_map != true)
       throw (ErrorMorpheo ("Interface \""+_name+"\" is never mapped"));
@@ -52,4 +58,6 @@
     xml.  attribut      ("port"     ,(static_cast<Interface *>(_interface_map))->_name);
     xml.singleton_end   ();
+
+    log_printf(FUNC,Behavioural,"toXML_mapping","End");
      
     return xml;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 38)
@@ -13,15 +13,33 @@
   Interfaces::Interfaces  (void)
   {
-    _list_interface = new list<Interface>;
+    log_printf(FUNC,Behavioural,"Interfaces","Begin");
+    _list_interface = new list<Interface*>;
+    log_printf(FUNC,Behavioural,"Interfaces","End");
   };
 
   Interfaces::Interfaces  (const Interfaces & interfaces)
   {
+    log_printf(FUNC,Behavioural,"Interfaces (copy)","Begin");
     _list_interface = interfaces._list_interface;
+    log_printf(FUNC,Behavioural,"Interfaces (copy)","End");
   };
   
   Interfaces::~Interfaces ()
   {
+    log_printf(FUNC,Behavioural,"~Interfaces","Begin");
+
+    if (_list_interface->empty()== false)
+      {
+	list<Interface*>::iterator i     = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    delete (*i);
+	    ++i;
+	  }
+      }
+
     delete _list_interface;
+    log_printf(FUNC,Behavioural,"~Interfaces","End");
   };
   
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 38)
@@ -15,10 +15,10 @@
     if (_list_interface->empty()== false)
       {
-	list<Interface>::iterator i     = _list_interface->begin();
+	list<Interface*>::iterator i     = _list_interface->begin();
 
 	while (i != _list_interface->end())
 	  {
-	    if ((*i)._name == name)
-	      return &(*i);
+	    if ((*i)->_name == name)
+	      return (*i);
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 38)
@@ -18,5 +18,5 @@
     bool                   last_separator = false;
 
-    list<Interface>::iterator i  = _list_interface->begin();
+    list<Interface*>::iterator i  = _list_interface->begin();
     bool                   empty = _list_interface->empty();
 
@@ -29,5 +29,5 @@
 	if (i != _list_interface->end())
 	  {
-	    text << tab << *i;
+	    text << tab << **i;
 	    ++i;
 	  }
@@ -36,5 +36,5 @@
 	  {
 	    text << separator;
-	    text << tab << *i;
+	    text << tab << **i;
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 38)
@@ -17,7 +17,7 @@
     Interface * interface = new Interface (name, direction, localisation);
     
-    _list_interface->push_back (*interface);
+    _list_interface->push_back (interface);
 
-    return interface;
+     return interface;
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 38)
@@ -17,9 +17,9 @@
     if (not _list_interface->empty())
       {
-	list<Interface>::iterator i     = _list_interface->begin();
+	list<Interface*>::iterator i     = _list_interface->begin();
 	
 	while (i != _list_interface->end())
 	  {
-	    (*i).set_port (vhdl);
+	    (*i)->set_port (vhdl);
 	    ++i;
 	  }
@@ -31,9 +31,9 @@
     if (not _list_interface->empty())
       {
-	list<Interface>::iterator i     = _list_interface->begin();
+	list<Interface*>::iterator i     = _list_interface->begin();
 	
 	while (i != _list_interface->end())
 	  {
-	    (*i).set_port (vhdl_testbench);
+	    (*i)->set_port (vhdl_testbench);
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp	(revision 38)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_testbench.cpp	(revision 38)
@@ -0,0 +1,35 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interfaces::testbench (Vhdl_Testbench * & vhdl_testbench)
+  {
+    log_printf(FUNC,Behavioural,"testbench","Begin");
+
+    if (_list_interface->empty()== false)
+      {
+	list<Interface*>::iterator i     = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    (*i)->testbench(vhdl_testbench);
+	    ++i;
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"testbench","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 38)
@@ -17,9 +17,9 @@
     if (_list_interface->empty()== false)
       {
-	list<Interface>::iterator i     = _list_interface->begin();
+	list<Interface*>::iterator i     = _list_interface->begin();
 
 	while (i != _list_interface->end())
 	  {
-	    xml.  insert_XML ((*i).toXML());
+	    xml.  insert_XML ((*i)->toXML());
 	    ++i;
 	  }
@@ -36,9 +36,9 @@
     if (_list_interface->empty()== false)
       {
-	list<Interface>::iterator i     = _list_interface->begin();
+	list<Interface*>::iterator i     = _list_interface->begin();
 
 	while (i != _list_interface->end())
 	  {
-	    xml.  insert_XML ((*i).toXML_mapping());
+	    xml.  insert_XML ((*i)->toXML_mapping());
 	    ++i;
 	  }
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp	(revision 38)
@@ -14,17 +14,35 @@
   Position::Position  (void)
   {
+    log_printf(FUNC,Behavioural,"Position","Begin");
     _list_component = new list<Entity *>;
+    log_printf(FUNC,Behavioural,"Position","End");
   };
 
   Position::Position  (const Position & position)
   {
+    log_printf(FUNC,Behavioural,"Position (copy)","Begin");
     _entity         = position._entity        ;
     _list_component = position._list_component;
+    log_printf(FUNC,Behavioural,"Position (copy)","End");
   };
   
   Position::~Position ()
   {
+    log_printf(FUNC,Behavioural,"~Position","Begin");
     delete _entity;
+
+//     if (_list_component->empty()== false)
+//       {
+// 	list<Entity *>::iterator i = _list_component->begin();
+
+// 	while (i != _list_component->end())
+// 	  {
+// 	    delete (*i);
+// 	    ++i;
+// 	  }
+//       }
+
     delete _list_component;
+    log_printf(FUNC,Behavioural,"~Position","End");
   };
   
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp	(revision 38)
@@ -12,13 +12,15 @@
 namespace behavioural          {
 
-  void Position::set_component (Entity * entity, 
-				uint32_t size_x,
-				uint32_t size_y,
-				uint32_t pos_x ,
-				uint32_t pos_y )
+  void Position::set_component (Position * position,
+				uint32_t   pos_x  ,
+				uint32_t   pos_y  ,
+				uint32_t   size_x ,
+				uint32_t   size_y )
   {
+    Entity * entity = position->_entity;
+
     _list_component->push_back(entity);
 
-    entity->mapping(size_x, size_y, pos_x, pos_y);
+    entity->mapping( pos_x, pos_y, size_x, size_y);
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 38)
@@ -20,4 +20,10 @@
     _presence_port (presence_port)
   {
+    log_printf(FUNC,Behavioural,"Signal","Begin");
+#ifdef VHDL_TESTBENCH
+    _signal    = NULL;
+    _type_info = UNKNOW;
+#endif
+    log_printf(FUNC,Behavioural,"Signal","End");
   };
 
@@ -28,8 +34,16 @@
     _presence_port (signal._presence_port)
   {
+    log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
+#ifdef VHDL_TESTBENCH
+    _signal    = signal._signal   ;
+    _type_info = signal._type_info;
+#endif
+    log_printf(FUNC,Behavioural,"Signal (copy)","End");
   };
 
   Signal::~Signal ()
   {
+    log_printf(FUNC,Behavioural,"~Signal","Begin");
+    log_printf(FUNC,Behavioural,"~Signal","End");
   };
 
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp	(revision 38)
@@ -17,5 +17,12 @@
 		       morpheo::behavioural::Signal & x)
   {
-    output_stream << x._name + "\t{"+toString(x._size)+"}\t"+toString(x._direction) +"\t"+toString(x._presence_port);
+    log_printf(FUNC,Behavioural,"operator<<","Begin");
+
+    output_stream << x._name ;
+    output_stream << "\t{" << x._size << "}\t"
+		  << toString(x._direction)    << "\t"
+		  << toString(x._presence_port)<< endl;
+
+    log_printf(FUNC,Behavioural,"operator<<","End");
 
     return output_stream;
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 38)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 38)
@@ -0,0 +1,85 @@
+#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 (Vhdl_Testbench * & vhdl_testbench)
+  {
+    log_printf(FUNC,Behavioural,"testbench","Begin");
+
+    if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES))
+      {
+	switch (_type_info)
+	  {
+	  case BOOL     : 
+	    {
+	      switch (_direction)
+		{
+		case IN    : {vhdl_testbench->add_input (static_cast<sc_in  <bool    > *>(_signal)->read()); break; }
+		case OUT   : {vhdl_testbench->add_output(static_cast<sc_out <bool    > *>(_signal)->read()); break; }
+		case INOUT : {break;}
+		}
+	      break;
+	    }
+	  case UINT8_T  :
+	    {
+	      switch (_direction)
+		{
+		case IN    : {vhdl_testbench->add_input (static_cast<sc_in  <uint8_t > *>(_signal)->read()); break; }
+		case OUT   : {vhdl_testbench->add_output(static_cast<sc_out <uint8_t > *>(_signal)->read()); break; }
+		case INOUT : {break;}
+		}
+	      break;
+	    }
+	  case UINT16_T :
+	    {
+	      switch (_direction)
+		{
+		case IN    : {vhdl_testbench->add_input (static_cast<sc_in  <uint16_t> *>(_signal)->read()); break; }
+		case OUT   : {vhdl_testbench->add_output(static_cast<sc_out <uint16_t> *>(_signal)->read()); break; }
+		case INOUT : {break;}
+		}
+	      break;
+	    }
+	  case UINT32_T :
+	    {
+	      switch (_direction)
+		{
+		case IN    : {vhdl_testbench->add_input (static_cast<sc_in  <uint32_t> *>(_signal)->read()); break; }
+		case OUT   : {vhdl_testbench->add_output(static_cast<sc_out <uint32_t> *>(_signal)->read()); break; }
+		case INOUT : {break;}
+		}
+	      break;
+	    }
+	  case UINT64_T :
+	    {
+	      switch (_direction)
+		{
+		case IN    : {vhdl_testbench->add_input (static_cast<sc_in  <uint64_t> *>(_signal)->read()); break; }
+		case OUT   : {vhdl_testbench->add_output(static_cast<sc_out <uint64_t> *>(_signal)->read()); break; }
+		case INOUT : {break;}
+		}
+	      break;
+	    }
+	  default       :
+	    throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow."));
+	  }
+
+      }
+
+    log_printf(FUNC,Behavioural,"testbench","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_toXML.cpp
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_toXML.cpp	(revision 37)
+++ /trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_toXML.cpp	(revision 38)
@@ -13,4 +13,6 @@
   XML Signal::toXML (void)
   {
+    log_printf(FUNC,Behavioural,"toXML","Begin");
+
     XML xml ("signal");
     
@@ -20,5 +22,7 @@
     xml.attribut        ("size"     ,toString(_size     ));
     xml.singleton_end   ();
-     
+  
+    log_printf(FUNC,Behavioural,"toXML","End");
+   
     return xml;
   };
Index: /trunk/IPs/systemC/processor/Morpheo/Include/ChangeCase.h
===================================================================
--- /trunk/IPs/systemC/processor/Morpheo/Include/ChangeCase.h	(revision 38)
+++ /trunk/IPs/systemC/processor/Morpheo/Include/ChangeCase.h	(revision 38)
@@ -0,0 +1,42 @@
+#ifndef morpheo_changecase
+#define morpheo_changecase
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <string>
+#include <stdint.h>
+
+using namespace std;
+
+namespace morpheo              {
+  
+  void UpperCase(string& S)
+  {
+    uint32_t n = S.size();
+    for (uint32_t j = 0; j < n; j++)
+      {
+	char sj = S[j];
+	if (sj >= 'a' && sj <= 'z')
+	  S[j] = static_cast<char>(sj - ('a' - 'A'));
+      }
+  }
+  
+  void LowerCase(string& S)
+  {
+    uint32_t n = S.size();
+    for (uint32_t j = 0; j < n; j++)
+      {
+	char sj = S[j];
+	if (sj >= 'A' && sj <= 'Z')
+	  S[j] = static_cast<char>(sj + ('a' - 'A'));
+      }
+  }
+  
+}; // end namespace morpheo              
+
+#endif
