Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component.cpp	(revision 42)
@@ -0,0 +1,38 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Component::Component  (void)
+  {
+    log_printf(FUNC,Behavioural,"Component","Begin");
+    _list_component = new list<Entity *>;
+    log_printf(FUNC,Behavioural,"Component","End");
+  };
+
+  Component::Component  (const Component & component)
+  {
+    log_printf(FUNC,Behavioural,"Component (copy)","Begin");
+    _entity         = component._entity        ;
+    _list_component = component._list_component;
+    log_printf(FUNC,Behavioural,"Component (copy)","End");
+  };
+  
+  Component::~Component ()
+  {
+    log_printf(FUNC,Behavioural,"~Component","Begin");
+    delete _entity;
+    delete _list_component;
+    log_printf(FUNC,Behavioural,"~Component","End");
+  };
+  
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_find_entity.cpp	(revision 42)
@@ -0,0 +1,38 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Entity * Component::find_entity (string name)
+  {
+
+    if (_entity->get_name() == name)
+      return _entity;
+    else
+      if (_list_component->empty()== false)
+	{
+	  list<Entity *>::iterator i = _list_component->begin();
+	  
+	  while (i != _list_component->end())
+	    {
+	      if ((*i)->get_name() == name)
+		{
+		  return  *i;
+		  break;
+		}
+	      ++i;
+	    }
+	}
+
+    return NULL;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_generate_file.cpp	(revision 42)
@@ -0,0 +1,33 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Component::generate_file (void)
+  {
+    try 
+      {
+	XML xml = toXML();
+
+	xml.filename_extension ("pos");
+	
+	xml.generate_file("ISO-8859-1");
+
+      }
+    catch (ErrorMorpheo e)
+      {
+	throw (ErrorMorpheo ("Component \""+_entity->get_name()+"\" have a bad mapping : "+e.what()));
+      }
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_component.cpp	(revision 42)
@@ -0,0 +1,49 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Component::get_component (void)
+  {
+    uint32_t               depth          = 0;
+    string                 separator      = "\n";
+    bool                   last_separator = false;
+
+    list<Entity *>::iterator  i  = _list_component->begin();
+    bool                   empty = _list_component->empty();
+
+    string                 tab   = string(depth,'\t');
+    ostringstream          text;
+
+    if (not empty)
+      {
+	// First
+	if (i != _list_component->end())
+	  {
+	    text << tab << **i;
+	    ++i;
+	  }
+	
+	while (i != _list_component->end())
+	  {
+	    text << separator;
+	    text << tab << **i;
+	    ++i;
+	  }
+	
+	if (last_separator)
+	  text << separator;
+      }
+
+    return text.str();
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_entity.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_get_entity.cpp	(revision 42)
@@ -0,0 +1,21 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Component::get_entity (void)
+  {
+    ostringstream text;
+    text << *(_entity); 
+    return text.str();
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_interface_map.cpp	(revision 42)
@@ -0,0 +1,60 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Component::interface_map (string component_src ,
+				 string port_src      ,
+				 string component_dest,
+				 string port_dest     )
+  {
+    // First entity 
+    Entity * entity_dest = find_entity(component_dest);
+
+    string name_entity = _entity->get_name();
+
+    if (entity_dest == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with unknow component \""+component_dest+"\"."));
+
+    bool is_top_level_dest = (name_entity == component_dest);
+
+    Interface * interface_dest = entity_dest->find_interface(port_dest);
+    
+    if (interface_dest == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow interface \""+port_dest+"\"."));
+
+    // Second entity
+    Entity * entity_src = find_entity(component_src);
+
+    if (entity_src == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with unknow component \""+component_src+"\"."));
+
+    bool is_top_level_src = (name_entity == component_src);
+
+    Interface * interface_src = entity_src->find_interface(port_src);
+
+    if (interface_src == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow interface \""+port_src+"\"."));
+
+    // all is ok - link
+    if (is_top_level_dest == false)
+      interface_dest->interface_map(static_cast<void *>(entity_src   ),
+				    static_cast<void *>(interface_src));
+    
+    if (is_top_level_src == false)
+      interface_src->interface_map(static_cast<void *>(entity_dest   ),
+				   static_cast<void *>(interface_dest));
+    
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 42)
@@ -0,0 +1,48 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Component::port_map (string component_src ,
+			    string port_src      ,
+			    string component_dest,
+			    string port_dest     )
+  {
+    string name_entity = _entity->get_name();
+
+    // First entity 
+    Entity * entity_dest = find_entity(component_dest);
+
+    if (entity_dest == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with unknow component \""+component_dest+"\"."));
+
+    Signal * signal_dest = entity_dest->find_signal (port_dest);
+
+    if (signal_dest == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with component \""+component_dest+"\" and a unknow signal \""+port_dest+"\"."));
+
+    // Second entity
+    Entity * entity_src = find_entity(component_src);
+
+    if (entity_src == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with unknow component \""+component_src+"\"."));
+
+    Signal * signal_src = entity_src->find_signal (port_src);
+
+    if (signal_src == NULL)
+      throw (ErrorMorpheo ("Component \""+name_entity+"\", port map with component \""+component_src+"\" and a unknow signal \""+port_src+"\"."));
+
+    // If all is ok, mapping
+    signal_src ->link   (signal_dest);
+    signal_dest->mapping(signal_src );
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_print.cpp	(revision 42)
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  ostream& operator<< (ostream& output_stream,
+		       morpheo::behavioural::Component & x)
+  {
+    output_stream << x.get_entity    () << endl;
+    output_stream << x.get_component () << endl;
+    return output_stream;
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_component.cpp	(revision 42)
@@ -0,0 +1,32 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Component::set_component (Component * component
+#ifdef POSITION
+				,uint32_t   pos_x  
+				,uint32_t   pos_y  
+				,uint32_t   size_x 
+				,uint32_t   size_y 
+#endif
+				 )
+  {
+    Entity * entity = component->_entity;
+
+    _list_component->push_back(entity);
+
+#ifdef POSITION
+    entity->mapping( pos_x, pos_y, size_x, size_y);
+#endif
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_set_entity.cpp	(revision 42)
@@ -0,0 +1,32 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Entity * Component::set_entity (string        name   
+				  ,string        type   
+#ifdef POSITION
+				  ,schema_t      schema
+#endif
+				  )
+  {
+    Entity * entity = new Entity (name   
+				  ,type   
+#ifdef POSITION
+				  ,schema 
+#endif
+				  );
+    _entity = entity;
+    
+    return entity;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_toXML.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_toXML.cpp	(revision 42)
@@ -0,0 +1,41 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  XML Component::toXML (void)
+  {
+    XML xml (_entity->get_name());
+    
+    xml.balise_open         ("description");
+    xml.  insert_XML        (_entity->toXML());
+    xml.  balise_open       ("architecture");
+
+    if (_list_component->empty()== false)
+      {
+	list<Entity *>::iterator i = _list_component->begin();
+
+	while (i != _list_component->end())
+	  {
+	    xml.insert_XML ((*i)->toXML_mapping());
+	    ++i;
+	  }
+      }
+	
+    xml.  balise_close      ();
+    xml.balise_close        ();
+    
+    return xml;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 42)
@@ -0,0 +1,91 @@
+#ifdef VHDL
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Component.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Component::vhdl_instance (Vhdl * & vhdl)
+  {
+    uint32_t             cpt = 0;
+    map<Signal *,string> tab;
+
+    vhdl->set_library_work (_entity->get_name() + "_Pack");
+
+    // for each entity
+    list<Entity *>         * list_component = _list_component;
+    list<Entity *>::iterator i              = list_component->begin();
+    if (not list_component->empty())
+      {
+	while (i != list_component->end())
+	  {
+	    vhdl->set_library_work ((*i)->get_name() + "_Pack");
+
+	    list<string> list_port_map;
+	    
+	    // for each interface
+	    list<Interface_fifo *>         * list_interface = (*i)->get_interfaces_list()->get_interface_list();
+	    list<Interface_fifo *>::iterator j              = list_interface->begin();
+	    if (not list_interface->empty())
+	      {
+		while (j != list_interface->end())
+		  {
+		    // for each signal
+		    list<Signal *>         * list_signal = (*j)->get_signal_list();
+		    list<Signal *>::iterator k           = list_signal->begin();
+		    if (not list_signal->empty())
+		      {
+			while (k != list_signal->end())
+			  {
+			    // test if is connect with external interface or with an another component.
+			    Signal * signal_src  = (*k);
+			    if (signal_src->presence_vhdl () == true)
+			      {
+				Signal * signal_dest = (*k)->get_signal_link();
+				string   name_src    = signal_src->get_name();
+				string   name_dest;
+				
+				if (_entity->find_signal(signal_dest) == false)
+				  {
+				    // find if signal is already link
+				    map<Signal *,string>::iterator it = tab.find(signal_src); 
+				    if (tab.find(signal_src) == tab.end())
+				      {
+					// Create name
+					name_dest = "signal_"+toString(cpt++);
+					
+					tab [signal_src ] = name_dest;
+					tab [signal_dest] = name_dest;
+					
+					// Add a new signal
+					vhdl->set_signal (name_dest, signal_src->get_size());
+				      }
+				    else
+				      name_dest = (*it).second;
+				  }
+				else
+				  name_dest = signal_dest->get_name();
+				
+				vhdl->set_body_component_port_map (list_port_map, name_src, name_dest);
+			      }
+			    ++k;
+			  }
+		      }
+		    ++j;
+		  }
+	      }
+	    vhdl->set_body_component ("instance_"+(*i)->get_name(),(*i)->get_name(),list_port_map);
+	    ++i;
+	  }
+      }
+  };
+
+}; // end namespace behavioural
+}; // end namespace morpheo
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -12,26 +11,37 @@
 namespace behavioural          {
 
-  Entity::Entity  (string       name   ,
-		   string       type   ,
-		   schema_t     schema):
-    _name       (name      ),
-    _type       (type      ),
-    _schema     (schema    )
+  Entity::Entity  ( string       name   
+		   ,string       type  
+#ifdef POSITION
+		   ,schema_t     schema
+#endif
+		    ):
+     _name       (name      )
+    ,_type       (type      )
+#ifdef POSITION
+    ,_schema     (schema    )
+#endif
   {
     log_printf(FUNC,Behavioural,"Entity","Begin");
     _interfaces = new Interfaces (name);
+#ifdef POSITION
     _is_map     = false;
+#endif
     log_printf(FUNC,Behavioural,"Entity","End");
   };
 
   Entity::Entity  (const Entity & entity):
-    _name       (entity._name      ),
-    _type       (entity._type      ),
-    _schema     (entity._schema    )
+     _name       (entity._name      )
+    ,_type       (entity._type      )
+#ifdef POSITION
+    ,_schema     (entity._schema    )
+#endif
   {
     log_printf(FUNC,Behavioural,"Entity (copy)","Begin");
+    _interfaces = entity._interfaces;
+#ifdef POSITION
     _is_map     = entity._is_map    ;
-    _interfaces = entity._interfaces;
     _comment    = entity._comment   ;
+#endif
     log_printf(FUNC,Behavioural,"Entity (copy)","End");
   };
@@ -43,7 +53,5 @@
     log_printf(FUNC,Behavioural,"~Entity","End");
   };
-  
 
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -19,3 +18,2 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_signal.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_signal.cpp	(revision 42)
@@ -0,0 +1,24 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Entity::find_signal (string name)
+  {
+    return _interfaces->find_signal(name);
+  };
+
+  bool Entity::find_signal (Signal * signal)
+  {
+    return _interfaces->find_signal(signal);
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -20,5 +19,10 @@
   };
 
+  Interfaces * Entity::get_interfaces_list (void)
+  {
+    return _interfaces; 
+  };
+  
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_name.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_name.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_name.cpp	(revision 42)
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Entity::get_name (void)
+  {
+    return _name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_type.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_type.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_type.cpp	(revision 42)
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Entity::get_type (void)
+  {
+    return _type;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp	(revision 41)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Entity.h"
-
-
-namespace morpheo              {
-namespace behavioural          {
-
-  void Entity::mapping (uint32_t pos_x,
-			uint32_t pos_y,
-			uint32_t size_x ,
-			uint32_t size_y )
-  {
-    if (_is_map != false)
-      throw (ErrorMorpheo ("Entity \""+_name+"\" is already mapped"));
-
-    _is_map = true;
-
-    _map_size_x = size_x;
-    _map_size_y = size_y;
-    _map_pos_x  = pos_x ;
-    _map_pos_y  = pos_y ;
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_mapping.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_mapping.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_mapping.cpp	(revision 42)
@@ -0,0 +1,33 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Entity::mapping (uint32_t pos_x,
+			uint32_t pos_y,
+			uint32_t size_x ,
+			uint32_t size_y )
+  {
+    if (_is_map != false)
+      throw (ErrorMorpheo ("Entity \""+_name+"\" is already mapped"));
+
+    _is_map = true;
+
+    _map_size_x = size_x;
+    _map_size_y = size_y;
+    _map_pos_x  = pos_x ;
+    _map_pos_y  = pos_y ;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -16,6 +15,10 @@
 		       morpheo::behavioural::Entity & x)
   {
+#ifdef POSITION
     output_stream << x._name + "\t"+x._type+"\t"+toString(x._schema) << endl;
     output_stream << x.get_comment()    << endl;
+#else
+    output_stream << x._name + "\t"+x._type<< endl;
+#endif
     output_stream << x.get_interfaces() << endl;
     return output_stream;
@@ -24,3 +27,2 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -19,3 +18,2 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 42)
@@ -11,17 +11,22 @@
 namespace behavioural          {
 
-  Interface::Interface  (string                name         ,
-			 direction_t           direction    ,
-			 localisation_t        localisation ):
-    _name         (name        ),
-    _direction    (direction   ),
-    _localisation (localisation)
+  Interface::Interface  (string                name         
+#ifdef POSITION
+			 ,direction_t           direction    
+			 ,localisation_t        localisation 
+#endif
+			 ):
+    _name         (name        )
+#ifdef POSITION
+    ,_direction    (direction   )
+    ,_localisation (localisation)
+#endif
   {
     log_printf(FUNC,Behavioural,"Interface","Begin");
 
-    _comment       = "";
     _list_signal   = new (list<Signal*>);
 
 #ifdef POSITION
+    _comment       = "";
     _is_map        = false;
     _entity_map    = NULL;
@@ -37,12 +42,14 @@
 
   Interface::Interface  (const Interface & interface):
-    _name         (interface._name        ),
-    _direction    (interface._direction   ),
-    _localisation (interface._localisation)
+    _name         (interface._name        )
+#ifdef POSITION
+    ,_direction    (interface._direction   )
+    ,_localisation (interface._localisation)
+#endif
   {
     log_printf(FUNC,Behavioural,"Interface (copy)","Begin");
-    _comment       = interface._comment    ;
     _list_signal   = interface._list_signal;
 #ifdef POSITION
+    _comment       = interface._comment    ;
     _is_map        = interface._is_map     ;
     _entity_map    = interface._entity_map   ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo.cpp	(revision 42)
@@ -11,10 +11,16 @@
 namespace behavioural          {
 
-  Interface_fifo::Interface_fifo  (string         name        ,
-				   direction_t    direction   ,
-				   localisation_t localisation):
-    Interface (name        , 
-	       direction   ,
-	       localisation)
+  Interface_fifo::Interface_fifo  (string         name        
+#ifdef POSITION
+				   ,direction_t    direction   
+				   ,localisation_t localisation
+#endif
+				   ):
+    Interface (name         
+#ifdef POSITION
+	       ,direction   
+	       ,localisation
+#endif
+	       )
   {
     log_printf(FUNC,Behavioural,"Interface_fifo","Begin");
@@ -32,7 +38,10 @@
 
   Interface_fifo::Interface_fifo  (const Interface_fifo & interface_fifo) :
-    Interface (interface_fifo._name        , 
-	       interface_fifo._direction   ,
-	       interface_fifo._localisation)
+    Interface (interface_fifo._name         
+#ifdef POSITION
+	       ,interface_fifo._direction   
+	       ,interface_fifo._localisation
+#endif
+	       )
   {
     log_printf(FUNC,Behavioural,"Interface_fifo (copy)","Begin");
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 42)
@@ -17,6 +17,9 @@
     if (_test_exhaustive == true)
       return Interface::get_cycle();
-    
-    return _list_cycle->back();
+
+    if (_list_cycle->empty() == true)
+      return 0;
+    else
+      return _list_cycle->back();
   };
 
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 42)
@@ -13,5 +13,6 @@
 
   string Interface_fifo::testbench_test (Vhdl * & vhdl,
-				       string   counter_name)
+					 string   counter_name,
+					 string   reset_name  )
   {
     log_printf(FUNC,Behavioural,"testbench_test","Begin");
@@ -19,5 +20,5 @@
     
     if (_test_exhaustive == true)
-      test_name = Interface::testbench_test(vhdl,counter_name);
+      test_name = Interface::testbench_test(vhdl,counter_name,reset_name);
     else
       {
@@ -26,11 +27,15 @@
 	vhdl->set_body("");
 
-	test_name    = testbench_test_name   (vhdl);
-	string test_name_ok = testbench_test_ok     (vhdl);
+	       test_name        = testbench_test_name        (vhdl);
+	string test_name_tmp    = test_name+"_tmp";
+	string test_name_ok     = testbench_test_ok          (vhdl);
+ 	string test_transaction = testbench_test_transaction (vhdl);
+
+	vhdl->set_signal(test_name_tmp,1);
 
 	if (_list_cycle->empty()== false)
 	  {
 	    vhdl->set_body ("with "+counter_name+" select");
-	    vhdl->set_body ("\t"+test_name+" <=");
+	    vhdl->set_body ("\t"+test_name_tmp+" <=");
 	
 	    list<uint32_t>::iterator i = _list_cycle->begin();
@@ -38,9 +43,35 @@
 	    while (i != _list_cycle->end())
 	      {
-		vhdl->set_body ("\t"+test_name_ok+" when "+toString(*i)+",");
+		vhdl->set_body ("\t"+test_transaction+" and "+test_name_ok+" when "+toString(*i)+",");
 		++i;
 	      }
-	    vhdl->set_body ("\t'1' when others;");
+	    vhdl->set_body ("\tnot "+test_transaction+" when others;");
 	  }
+	else
+	  vhdl->set_body (test_name_tmp+" <= not "+test_transaction+";");
+	
+	vhdl->set_body("");
+	vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_tmp+";");
+
+#ifdef VHDL_TESTBENCH_ASSERT
+	if (_list_cycle->empty()== false)
+	  {
+	    vhdl->set_body("");
+	    vhdl->set_body("-- Assert ...");
+	    vhdl->set_body("");
+
+	    uint32_t                 j = 0;
+	    list<uint32_t>::iterator i = _list_cycle->begin();
+	    
+	    while (i != _list_cycle->end())
+	      {
+		vhdl->set_body("assert not ( ("+counter_name+" = "+toString(*i)+")) report \"***** <"+_name+"> interface's test number "+toString(j)+" *****\" severity NOTE;");
+		j++;
+		++i;
+	      }
+
+	    vhdl->set_body("");
+	  }
+#endif
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test_transaction.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test_transaction.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_test_transaction.cpp	(revision 42)
@@ -0,0 +1,56 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface_fifo.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface_fifo::testbench_test_transaction (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_transaction","Begin");
+    
+    string name = testbench_test_transaction_name(vhdl);
+
+    vhdl->set_body(name+" <= '1'");
+
+    // list "val"
+    if (_list_signal_val->empty()== false)
+      {
+	list<Signal*>::iterator i = _list_signal_val->begin();
+
+	while (i != _list_signal_val->end())
+	  {
+	    vhdl->set_body("\tand "+(*i)->get_name());
+	    ++i;
+	  }
+      }
+
+    // list "ack"
+    if (_list_signal_ack->empty()== false)
+      {
+	list<Signal*>::iterator i = _list_signal_ack->begin();
+
+	while (i != _list_signal_ack->end())
+	  {
+	    vhdl->set_body("\tand "+(*i)->get_name());
+	    ++i;
+	  }
+      }
+
+    vhdl->set_body("\t;");
+    vhdl->set_body("");
+
+    log_printf(FUNC,Behavioural,"testbench_test_transaction","End");
+
+    return name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_transaction.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_transaction.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_fifo_testbench_transaction.cpp	(revision 42)
@@ -1,2 +1,3 @@
+#ifdef VHDL_TESTBENCH
 /*
  * $Id$
@@ -48,2 +49,3 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_find_signal.cpp	(revision 42)
@@ -0,0 +1,63 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Interface::find_signal (string name)
+  {
+    log_printf(FUNC,Behavioural,"find_signal","Begin");
+
+    list<Signal*>::iterator i   = _list_signal->begin();
+    Signal *                sig = NULL;
+    if (_list_signal->empty() == false)
+      {
+	while (i != _list_signal->end())
+	  {
+	    if ((*i)->get_name() == name)
+	      {
+		sig = (*i);
+		break;
+	      }
+	    ++i;
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"find_signal","End");
+
+    return sig;
+  };
+
+  bool Interface::find_signal (Signal * signal)
+  {
+    log_printf(FUNC,Behavioural,"find_signal","Begin");
+
+    bool find = false;
+    list<Signal*>::iterator i = _list_signal->begin();
+    if (_list_signal->empty() == false)
+      {
+	while (i != _list_signal->end())
+	  {
+	    if ( (*i) == signal)
+	      {
+		find = true;
+		break;
+	      }
+	    ++i;
+	  }
+      }
+
+    log_printf(FUNC,Behavioural,"find_signal","End");
+
+    return find;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
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 42)
@@ -13,7 +13,7 @@
 namespace behavioural          {
 
-  string Interface::get_clock (void)
+  Signal * Interface::get_clock (void)
   {
-    string clock = "";
+    Signal * clock = NULL;
     
     if (not _list_signal->empty())
@@ -23,11 +23,11 @@
 	while (i != _list_signal->end())
 	  {
-	    string str = (*i)->get_clock ();
+	    Signal * sig = (*i)->get_clock ();
 
-	    if (str != "")
+	    if (sig != NULL)
 	      {
-		if (clock != "")
+		if (clock != NULL)
 		  throw ErrorMorpheo ("<Interface.get_clock> : find too many clock.");
-		clock = str;
+		clock = sig;
 	      }
 	    ++i;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_comment.cpp	(revision 42)
@@ -1,2 +1,3 @@
+#ifdef POSITION
 /*
  * $Id$
@@ -22,2 +23,3 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_name.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_name.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_name.cpp	(revision 42)
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Interface::get_name (void)
+  {
+    log_printf(FUNC,Behavioural,"get_name","Begin");
+    string res = _name;
+    log_printf(FUNC,Behavioural,"get_name","End");
+    return res;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_reset.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_reset.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_reset.cpp	(revision 42)
@@ -0,0 +1,42 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Interface::get_reset (void)
+  {
+    Signal * reset = NULL;
+    
+    if (not _list_signal->empty())
+      {
+	list<Signal*>::iterator i = _list_signal->begin();
+	
+	while (i != _list_signal->end())
+	  {
+	    Signal * sig = (*i)->get_reset ();
+
+	    if (sig != NULL)
+	      {
+		if (reset != NULL)
+		  throw ErrorMorpheo ("<Interface.get_reset> : find too many reset.");
+		reset = sig;
+	      }
+	    ++i;
+	  }
+      }
+
+    return reset;
+  };
+
+}; // 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 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 42)
@@ -69,4 +69,9 @@
 #endif
 
+  list<Signal *> * Interface::get_signal_list (void)
+    {
+      return _list_signal;
+    }
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_interface_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_interface_map.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_interface_map.cpp	(revision 42)
@@ -0,0 +1,29 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface::interface_map (void * entity,
+				 void * interface)
+  {
+    log_printf(FUNC,Behavioural,"interface_map","Begin");
+
+    _is_map        = true     ;
+    _entity_map    = entity   ;
+    _interface_map = interface;
+
+    log_printf(FUNC,Behavioural,"interface_map","End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 42)
@@ -1,3 +1,2 @@
-#ifdef POSITION
 /*
  * $Id$
@@ -13,15 +12,16 @@
 namespace behavioural          {
 
-  void Interface::port_map (void * entity,
-			    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");
-  };
+//   void Interface::port_map (void * entity,
+// 			    void * interface)
+//   {
+//     log_printf(FUNC,Behavioural,"port_map","Begin");
+// #ifdef POSITION
+//     _is_map        = true     ;
+//     _entity_map    = entity   ;
+//     _interface_map = interface;
+// #endif
+//     log_printf(FUNC,Behavioural,"port_map","End");
+//   };
 
 }; // end namespace behavioural          
 }; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_print.cpp	(revision 42)
@@ -16,6 +16,10 @@
   {
     log_printf(FUNC,Behavioural,"operator<<","Begin");
+#ifdef POSITION
     output_stream << x._name + "\t"+toString(x._localisation)+"\t"+toString(x._direction) << endl;
     output_stream << x.get_comment() << endl;
+#else
+    output_stream << x._name << endl;
+#endif
     output_stream << x.get_signal () << endl;
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_comment.cpp	(revision 42)
@@ -1,2 +1,3 @@
+#ifdef POSITION
 /*
  * $Id$
@@ -21,2 +22,3 @@
 }; // end namespace behavioural          
 }; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 42)
@@ -20,8 +20,5 @@
     string signame = signal_name(_name, name, direction);
 
-    Signal * sig = new Signal (signame      ,
-			       direction    ,
-			       size         ,
-			       presence_port);
+    Signal * sig = new Signal       (signame, direction, size, presence_port);
 
     _list_signal->push_back (sig);
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 42)
@@ -14,5 +14,6 @@
 
   void Interface::testbench_body (Vhdl * & vhdl,
-				  string   counter_name)
+				  string   counter_name,
+				  string   reset_name  )
   {
     log_printf(FUNC,Behavioural,"testbench_body","Begin");
@@ -28,5 +29,5 @@
 	while (i != _list_signal->end())
 	  {
-	    (*i)->testbench_body(vhdl, counter_name);
+	    (*i)->testbench_body(vhdl, counter_name, reset_name);
 	    ++i;
 	  }
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 42)
@@ -14,5 +14,6 @@
 
   string Interface::testbench_test (Vhdl * & vhdl,
-				    string   counter_name)
+				    string   counter_name,
+				    string   reset_name  )
   {
     log_printf(FUNC,Behavioural,"testbench_test","Begin");
@@ -25,5 +26,5 @@
     string test_name_ok = testbench_test_ok     (vhdl);
 
-    vhdl->set_body(test_name + " <= "+test_name_ok+";");
+    vhdl->set_body(test_name + " <= '1' when ("+reset_name+" = '0') else "+test_name_ok+";");
 
     log_printf(FUNC,Behavioural,"testbench_test","End");
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 42)
@@ -49,4 +49,22 @@
   };
 
+  string Interface::testbench_test_transaction_name (Vhdl * & vhdl)
+  {
+    log_printf(FUNC,Behavioural,"testbench_test_transaction_name","Begin");
+
+    string name;
+
+    name = "interface_";
+    if (_name != "")
+      name += _name + "_";
+    name += "test_transaction";
+
+    vhdl->set_signal(name,1);
+    
+    log_printf(FUNC,Behavioural,"testbench_test_transaction_name","End");
+
+    return name;
+  };
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
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 42)
@@ -20,4 +20,5 @@
 
     vhdl->set_body(test_name + " <= '1' when true");
+
     // set all condition
     if (_list_signal->empty()== false)
@@ -31,5 +32,5 @@
 	  }
       }
-    vhdl->set_body("else '0';");
+    vhdl->set_body("\telse '0';");
     vhdl->set_body("");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 42)
@@ -1,2 +1,3 @@
+#ifdef POSITION
 /*
  * $Id$
@@ -43,5 +44,4 @@
   };
 
-#ifdef POSITION
   XML Interface::toXML_mapping (void)
   {
@@ -55,6 +55,6 @@
     xml.singleton_begin ("port_map");
     xml.  attribut      ("name"     ,_name               );
-    xml.  attribut      ("component",(static_cast<Entity    *>(_entity_map   ))->_name);
-    xml.  attribut      ("port"     ,(static_cast<Interface *>(_interface_map))->_name);
+    xml.  attribut      ("component",(static_cast<Entity    *>(_entity_map   ))->get_name());
+    xml.  attribut      ("port"     ,(static_cast<Interface *>(_interface_map))->get_name());
     xml.singleton_end   ();
 
@@ -63,5 +63,5 @@
     return xml;
   };
-#endif
 }; // end namespace behavioural          
 }; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 42)
@@ -15,9 +15,9 @@
     if (_list_interface->empty()== false)
       {
-	list<Interface_fifo*>::iterator i     = _list_interface->begin();
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
 
 	while (i != _list_interface->end())
 	  {
-	    if ((*i)->_name == name)
+	    if ((*i)->get_name() == name)
 	      return (*i);
 	    ++i;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_signal.cpp	(revision 42)
@@ -0,0 +1,53 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Interfaces::find_signal (string name)
+  {
+    if (_list_interface->empty()== false)
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    Signal * signal = (*i)->find_signal(name);
+
+	    // Warning : Name of signal is uniq
+	    if (signal != NULL)
+	      return signal;
+
+	    ++i;
+	  }
+      }
+     
+    return NULL;
+  };
+
+  bool Interfaces::find_signal (Signal * signal)
+  {
+    if (_list_interface->empty()== false)
+      {
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    if ((*i)->find_signal(signal) == true)
+	      return true;
+
+	    ++i;
+	  }
+      }
+     
+    return false;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
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 42)
@@ -13,21 +13,21 @@
 namespace behavioural          {
   
-  string Interfaces::get_clock (void)
+  Signal * Interfaces::get_clock (void)
   {
-    string clock = "";
+    Signal * clock = NULL;
     
     if (not _list_interface->empty())
       {
-	list<Interface_fifo*>::iterator i     = _list_interface->begin();
+	list<Interface_fifo*>::iterator i = _list_interface->begin();
 	
 	while (i != _list_interface->end())
 	  {
-	    string str = (*i)->get_clock ();
+	    Signal * sig = (*i)->get_clock ();
 
-	    if (str != "")
+	    if (sig != NULL)
 	      {
-		if (clock != "")
+		if (clock != NULL)
 		  throw ErrorMorpheo ("<Interfaces.get_clock> : find too many clock.");
-		clock = str;
+		clock = sig;
 	      }
 	    ++i;
@@ -35,5 +35,5 @@
       }
 
-    if (clock == "")
+    if (clock == NULL)
       throw ErrorMorpheo ("<Interfaces.get_clock> : no clock find.");
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 42)
@@ -47,4 +47,9 @@
   };
 
+  list<Interface_fifo*>* Interfaces::get_interface_list (void)
+  {
+    return _list_interface;
+  };
+
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_reset.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_reset.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_reset.cpp	(revision 42)
@@ -0,0 +1,45 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+  
+  Signal * Interfaces::get_reset (void)
+  {
+    Signal * reset = NULL;
+    
+    if (not _list_interface->empty())
+      {
+	list<Interface_fifo*>::iterator i     = _list_interface->begin();
+	
+	while (i != _list_interface->end())
+	  {
+	    Signal * sig = (*i)->get_reset ();
+
+	    if (sig != NULL)
+	      {
+		if (reset != NULL)
+		  throw ErrorMorpheo ("<Interfaces.get_reset> : find too many reset.");
+		reset = sig;
+	      }
+	    ++i;
+	  }
+      }
+
+    if (reset == NULL)
+      throw ErrorMorpheo ("<Interfaces.get_reset> : no reset find.");
+    
+    return reset;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 42)
@@ -11,9 +11,17 @@
 namespace behavioural          {
 
-  Interface_fifo * Interfaces::set_interface (string         name        ,
-					 direction_t    direction   ,
-					 localisation_t localisation)
+  Interface_fifo * Interfaces::set_interface (string         name        
+#ifdef POSITION
+					      ,direction_t    direction   
+					      ,localisation_t localisation
+#endif
+					      )
   {
-    Interface_fifo * interface = new Interface_fifo (name, direction, localisation);
+    Interface_fifo * interface = new Interface_fifo (name
+#ifdef POSITION
+						     ,direction
+						     ,localisation
+#endif
+						     );
     
     _list_interface->push_back (interface);
@@ -22,4 +30,5 @@
   };
 
+#ifdef POSITION
   Interface_fifo * Interfaces::set_interface (string         name        ,
 					 direction_t    direction   ,
@@ -33,5 +42,5 @@
     return interface;
   };
-
+#endif
 
 }; // end namespace behavioural          
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 42)
@@ -14,5 +14,6 @@
 
   string Interfaces::testbench_body (Vhdl * & vhdl,
-				   string   counter_name)
+				     string   counter_name,
+				     string   reset_name  )
   {
     log_printf(FUNC,Behavioural,"testbench_body","Begin");
@@ -28,6 +29,6 @@
 	while (i != _list_interface->end())
 	  {
-	    (*i)->testbench_body(vhdl, counter_name);
-	    string str = (*i)->testbench_test(vhdl, counter_name);
+	    (*i)->testbench_body(vhdl, counter_name, reset_name);
+	    string str = (*i)->testbench_test(vhdl, counter_name, reset_name);
 
 	    test += " and "+str;
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 42)
@@ -19,14 +19,18 @@
     Vhdl   * vhdl        = new Vhdl(_name+"_Testbench");
     string   counter     = "counter";
-    string   clock       = this->get_clock();
+    Signal * clock       = this->get_clock();
+    Signal * reset       = this->get_reset();
+    string   clock_name  = clock->get_name();
+    string   reset_name  = reset->get_name();
     uint32_t cycle       = this->get_cycle();
 
-    vhdl      ->set_signal    (counter, "natural", "0");
-    vhdl      ->set_signal    (clock  , 1        , 0); // modif Signal_set_signal
+    vhdl->set_signal    (clock_name, 1, 0);
+    vhdl->set_signal    (reset_name, 1, 0);
+    vhdl->set_signal    (counter, "natural");
     this->set_signal    (vhdl);
 
     vhdl->set_body("");
     vhdl->set_body("------------------------------------------------------");
-    vhdl->set_body("-- Component");
+    vhdl->set_body("-- Component - Intanciation");
     vhdl->set_body("------------------------------------------------------");
     vhdl->set_body("");
@@ -54,30 +58,49 @@
     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);
+    string test_name = this->testbench_body(vhdl,counter, reset_name);
 
     vhdl->set_body("");
     vhdl->set_body("------------------------------------------------------");
-    vhdl->set_body("-- process clock");
+    vhdl->set_body("-- reset");
     vhdl->set_body("------------------------------------------------------");
     vhdl->set_body("");
-    vhdl->set_body(clock+" <= not "+clock+" after 50 ns;");
+    vhdl->set_body("-- if the systemC simulate have multiple reset, we make the last");
+    vhdl->set_body(reset_name+" <= '1' after 150 ns;");    
+
     vhdl->set_body("");
-    vhdl->set_body("process ("+clock+")");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("-- process clock_name");
+    vhdl->set_body("------------------------------------------------------");
+    vhdl->set_body("");
+    vhdl->set_body(clock_name+" <= not "+clock_name+" after 50 ns;");
+    vhdl->set_body("");
+    vhdl->set_body("process ("+clock_name+")");
     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("\tif ("+clock_name+"'event and "+clock_name+" = '1') then");
     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("\t\tif ("+reset_name+" = '0') then");
     vhdl->set_body("");
+    vhdl->set_body("\t\t\t"+counter+" <= "+toString(reset->get_reset_cycle(true))+";");
+    vhdl->set_body("");
+    vhdl->set_body("\t\telse");
+    vhdl->set_body("");
+    vhdl->set_body("\t\t\t"+counter+" <= "+counter+"+1;");
+    vhdl->set_body("");
+    vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cycle)+") report \"Test OK\" severity FAILURE;");
+    vhdl->set_body("\t\t\tassert not ("+test_name+" = '0') report \"Test KO\" severity FAILURE;");
+
+#ifdef VHDL_TESTBENCH_ASSERT
+    vhdl->set_body("\t\t\t-- Assert ...");
+    for (uint32_t cpt=0; cpt<=cycle; cpt++)
+      vhdl->set_body("\t\t\tassert not ("+counter+" = "+toString(cpt)+") report \"===== Test number "+toString(cpt)+" =====\" severity NOTE;");
+#endif
+
+    vhdl->set_body("");
+    vhdl->set_body("\t\tend if;");
     vhdl->set_body("\tend if;");
     vhdl->set_body("end process;");
 
-    vhdl->generate_file();
+
+    vhdl->generate_file(false,true);
 
     delete vhdl;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 42)
@@ -1,2 +1,3 @@
+#ifdef POSITION
 /*
  * $Id$
@@ -29,5 +30,4 @@
   };
 
-#ifdef POSITION
   XML Interfaces::toXML_mapping (void)
   {
@@ -47,5 +47,5 @@
     return xml;
   };
-#endif
 }; // end namespace behavioural          
 }; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp	(revision 41)
+++ 	(revision )
@@ -1,52 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  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");
-  };
-  
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_entity.cpp	(revision 41)
+++ 	(revision )
@@ -1,40 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  Entity * Position::find_entity (string name)
-  {
-
-    if (_entity->_name == name)
-      return _entity;
-    else
-      if (_list_component->empty()== false)
-	{
-	  list<Entity *>::iterator i = _list_component->begin();
-	  
-	  while (i != _list_component->end())
-	    {
-	      if ((*i)->_name == name)
-		{
-		  return  *i;
-		  break;
-		}
-	      ++i;
-	    }
-	}
-
-    return NULL;
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_interface.cpp	(revision 41)
+++ 	(revision )
@@ -1,22 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  Interface * Position::find_interface (string   name  , 
-					Entity * entity)
-  {
-    return entity->find_interface(name);
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_generate_file.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_generate_file.cpp	(revision 41)
+++ 	(revision )
@@ -1,33 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  void Position::generate_file (void)
-  {
-    try 
-      {
-	XML xml = toXML();
-
-	xml.filename_extension ("pos");
-	
-	xml.generate_file("ISO-8859-1");
-
-      }
-    catch (ErrorMorpheo e)
-      {
-	throw (ErrorMorpheo ("Position \""+_entity->_name+"\" have a bad mapping : "+e.what()));
-      }
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_component.cpp	(revision 41)
+++ 	(revision )
@@ -1,51 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  string Position::get_component (void)
-  {
-    uint32_t               depth          = 0;
-    string                 separator      = "\n";
-    bool                   last_separator = false;
-
-    list<Entity *>::iterator  i  = _list_component->begin();
-    bool                   empty = _list_component->empty();
-
-    string                 tab   = string(depth,'\t');
-    ostringstream          text;
-
-    if (not empty)
-      {
-	// First
-	if (i != _list_component->end())
-	  {
-	    text << tab << **i;
-	    ++i;
-	  }
-	
-	while (i != _list_component->end())
-	  {
-	    text << separator;
-	    text << tab << **i;
-	    ++i;
-	  }
-	
-	if (last_separator)
-	  text << separator;
-      }
-
-    return text.str();
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_entity.cpp	(revision 41)
+++ 	(revision )
@@ -1,23 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  string Position::get_entity (void)
-  {
-    ostringstream text;
-    text << *(_entity); 
-    return text.str();
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_port_map.cpp	(revision 41)
+++ 	(revision )
@@ -1,56 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  void Position::port_map (string component1,
-			   string signal1   ,
-			   string component2,
-			   string signal2   )
-  {
-    Entity * entity1 = find_entity(component1);
-
-    if (entity1 == NULL)
-      throw (ErrorMorpheo ("Position \""+_entity->_name+"\", port map with unknow component \""+component1+"\"."));
-
-    bool is_top_level1 = _entity->_name == component1;
-
-    Interface * interface1 = find_interface (signal1, entity1);
-
-    if (interface1 == NULL)
-      throw (ErrorMorpheo ("Position \""+_entity->_name+"\", port map with component \""+component1+"\" and a unknow port \""+signal1+"\"."));
-
-    Entity * entity2 = find_entity(component2);
-
-    if (entity2 == NULL)
-      throw (ErrorMorpheo ("Position \""+_entity->_name+"\", port map with unknow component \""+component2+"\"."));
-
-    bool is_top_level2 = _entity->_name == component2;
-
-    Interface * interface2 = find_interface (signal2, entity2);
-
-    if (interface2 == NULL)
-      throw (ErrorMorpheo ("Position \""+_entity->_name+"\", port map with component \""+component2+"\" and a unknow port \""+signal2+"\"."));
-
-    // all is ok
-    if (is_top_level1 == false)
-      interface1->port_map(static_cast<void *>(entity2   ),
-			   static_cast<void *>(interface2));
-
-    if (is_top_level2 == false)
-      interface2->port_map(static_cast<void *>(entity1   ),
-			   static_cast<void *>(interface1));
-    
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_print.cpp	(revision 41)
+++ 	(revision )
@@ -1,25 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-
-namespace morpheo              {
-namespace behavioural          {
-
-  ostream& operator<< (ostream& output_stream,
-		       morpheo::behavioural::Position & x)
-  {
-    output_stream << x.get_entity    () << endl;
-    output_stream << x.get_component () << endl;
-    return output_stream;
-  };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp	(revision 41)
+++ 	(revision )
@@ -1,29 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  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( pos_x, pos_y, size_x, size_y);
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_entity.cpp	(revision 41)
+++ 	(revision )
@@ -1,28 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  Entity * Position::set_entity (string        name   ,
-					string        type   ,
-					schema_t      schema )
-  {
-    Entity * entity = new Entity (name   ,
-				  type   ,
-				  schema );
-    _entity = entity;
-    
-    return entity;
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_toXML.cpp	(revision 41)
+++ 	(revision )
@@ -1,41 +1,0 @@
-#ifdef POSITION
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Position.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-  XML Position::toXML (void)
-  {
-    XML xml (_entity->_name);
-    
-    xml.balise_open         ("description");
-    xml.  insert_XML        (_entity->toXML());
-    xml.  balise_open       ("architecture");
-
-    if (_list_component->empty()== false)
-      {
-	list<Entity *>::iterator i = _list_component->begin();
-
-	while (i != _list_component->end())
-	  {
-	    xml.insert_XML ((*i)->toXML_mapping());
-	    ++i;
-	  }
-      }
-	
-    xml.  balise_close      ();
-    xml.balise_close        ();
-    
-    return xml;
-  };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 42)
@@ -18,11 +18,15 @@
     _direction     (direction    ),
     _size          (size         ),
-    _presence_port (presence_port)
+    _presence_port ((direction==INTERNAL)?PORT_VHDL_NO_TESTBENCH_NO:presence_port)
   {
     log_printf(FUNC,Behavioural,"Signal","Begin");
+    _is_allocate   = false;
+    _is_map        = false;
+    _signal        = NULL;
+    _sc_signal     = NULL;
+    _sc_signal_map = NULL;
+    _type_info     = UNKNOW;
 #ifdef VHDL_TESTBENCH
-    _signal     = NULL;
-    _type_info  = UNKNOW;
-    _list_value = new list<string>;
+    _list_value    = new list<string>;
 #endif
     log_printf(FUNC,Behavioural,"Signal","End");
@@ -36,7 +40,10 @@
   {
     log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
+    _is_allocate= signal._is_allocate;
+    _is_map     = signal._is_map    ;
+    _sc_signal     = signal._sc_signal    ;
+    _sc_signal_map = signal._sc_signal_map;
+    _type_info  = signal._type_info ;
 #ifdef VHDL_TESTBENCH
-    _signal     = signal._signal    ;
-    _type_info  = signal._type_info ;
     _list_value = signal._list_value;
 #endif
@@ -47,4 +54,50 @@
   {
     log_printf(FUNC,Behavioural,"~Signal","Begin");
+
+//     if (_is_allocate == true)
+//       switch (_direction)
+// 	{
+// 	case IN : 
+// 	  {
+// 	    switch (_type_info)
+// 	      {
+// 	      case BOOL     : {delete (static_cast<sc_in  <bool    > *>(_sc_signal)); break;}
+// 	      case UINT8_T  : {delete (static_cast<sc_in  <uint8_t > *>(_sc_signal)); break;}
+// 	      case UINT16_T : {delete (static_cast<sc_in  <uint16_t> *>(_sc_signal)); break;}
+// 	      case UINT32_T : {delete (static_cast<sc_in  <uint32_t> *>(_sc_signal)); break;}
+// 	      case UINT64_T : {delete (static_cast<sc_in  <uint64_t> *>(_sc_signal)); break;}
+// 	      default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+// 	      }
+// 	    break;
+// 	  }
+// 	case OUT : 
+// 	  {
+// 	    switch (_type_info)
+// 	      {
+// 	      case BOOL     : {delete (static_cast<sc_out <bool    > *>(_sc_signal)); break;}
+// 	      case UINT8_T  : {delete (static_cast<sc_out <uint8_t > *>(_sc_signal)); break;}
+// 	      case UINT16_T : {delete (static_cast<sc_out <uint16_t> *>(_sc_signal)); break;}
+// 	      case UINT32_T : {delete (static_cast<sc_out <uint32_t> *>(_sc_signal)); break;}
+// 	      case UINT64_T : {delete (static_cast<sc_out <uint64_t> *>(_sc_signal)); break;}
+// 	      default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+// 	      }
+// 	    break;
+// 	  }
+// 	case INTERNAL : 
+// 	  {
+// 	    switch (_type_info)
+// 	      {
+// 	      case BOOL     : {delete (static_cast<sc_sc_signal <bool    > *>(_sc_signal)); break;}
+// 	      case UINT8_T  : {delete (static_cast<sc_sc_signal <uint8_t > *>(_sc_signal)); break;}
+// 	      case UINT16_T : {delete (static_cast<sc_sc_signal <uint16_t> *>(_sc_signal)); break;}
+// 	      case UINT32_T : {delete (static_cast<sc_sc_signal <uint32_t> *>(_sc_signal)); break;}
+// 	      case UINT64_T : {delete (static_cast<sc_sc_signal <uint64_t> *>(_sc_signal)); break;}
+// 	      default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+// 	      }
+// 	    break;
+// 	  }
+// 	default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : direction unknow.")); break;}
+// 	}
+
 #ifdef VHDL_TESTBENCH
     delete _list_value;
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 42)
@@ -13,11 +13,11 @@
 namespace behavioural          {
 
-  string Signal::get_clock (void)
+  Signal * Signal::get_clock (void)
   {
     if ((_presence_port == CLOCK_VHDL_YES) or
 	(_presence_port == CLOCK_VHDL_NO ))
-      return _name;
+      return this;
     else
-      return "";
+      return NULL;
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_name.cpp	(revision 42)
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Signal::get_name (void)
+  {
+      return _name;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
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 42)
@@ -1,3 +1,3 @@
-#ifdef VHDL_TESTBENCH
+#  ifdef VHDL_TESTBENCH
 /*
  * $Id$
@@ -17,5 +17,6 @@
     if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
 	(_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or
-	(_presence_port == CLOCK_VHDL_YES))
+	(_presence_port == CLOCK_VHDL_YES)              or
+	(_presence_port == RESET_VHDL_YES))
       list_signal->push_back(_name);
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset.cpp	(revision 42)
@@ -0,0 +1,31 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Signal::get_reset (void)
+  {
+    if ((_presence_port == RESET_VHDL_YES) or
+	(_presence_port == RESET_VHDL_NO ))
+      {
+	if (_size != 1)
+	  throw ErrorMorpheo ("<Signal.get_reset> : size of signal reset is more than one bit.");
+
+	return this;
+      }
+    else
+      return NULL;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset_cycle.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_reset_cycle.cpp	(revision 42)
@@ -0,0 +1,43 @@
+#ifdef VHDL_TESTBENCH
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  uint32_t Signal::get_reset_cycle (bool active_low)
+  {
+    uint32_t num = 0;
+    uint32_t cpt = 0;
+    string   cmp = (active_low==true)?"0":"1";
+
+    if ((_presence_port == RESET_VHDL_YES) or
+	(_presence_port == RESET_VHDL_NO ))
+      {
+	if (_list_value->empty()== false)
+	  {
+	    list<string>::iterator i = _list_value->begin();
+	    
+	    while (i != _list_value->end())
+	      {
+		if ((*i) == cmp)
+		  num = cpt;
+		cpt ++;
+		++i;
+	      }
+	  }
+      }
+
+    return num;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_signal_link.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_signal_link.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_signal_link.cpp	(revision 42)
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Signal * Signal::get_signal_link (void)
+  {
+      return _signal;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_size.cpp	(revision 42)
@@ -0,0 +1,20 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  uint32_t Signal::get_size (void)
+  {
+      return _size;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 42)
@@ -0,0 +1,71 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Signal::link (Signal * signal)
+  {
+    if (        _is_allocate == false)
+      throw (ErrorMorpheo ("Signal \""+_name+"\", can't map with signal \""+        get_name()+"\", because it's not already allocate."));
+    if (signal->_is_allocate == false)
+      throw (ErrorMorpheo ("Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate."));
+    
+    _signal = signal;
+
+    if ((_direction == IN ) and (signal->_direction == IN ))
+      switch (_type_info)
+	{
+	case BOOL     : {(*(static_cast<sc_in  <bool    > *>(_sc_signal))) (*(static_cast<sc_in  <bool    > *>(signal->_sc_signal))); break;}
+	case UINT8_T  : {(*(static_cast<sc_in  <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in  <uint8_t > *>(signal->_sc_signal))); break;}
+	case UINT16_T : {(*(static_cast<sc_in  <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint16_t> *>(signal->_sc_signal))); break;}
+	case UINT32_T : {(*(static_cast<sc_in  <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint32_t> *>(signal->_sc_signal))); break;}
+	case UINT64_T : {(*(static_cast<sc_in  <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint64_t> *>(signal->_sc_signal))); break;}
+	default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+	}
+    else
+      if ((_direction == OUT) and (signal->_direction == OUT))
+	switch (_type_info)
+	  {
+	  case BOOL     : {(*(static_cast<sc_out <bool    > *>(_sc_signal))) (*(static_cast<sc_out <bool    > *>(signal->_sc_signal))); break;} 
+	  case UINT8_T  : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;} 
+	  case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;}
+	  case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;} 
+	  case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;} 
+	  default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+	  }
+      else
+	if ((_direction == IN ) and (signal->_direction == OUT))
+	  switch (_type_info)
+	    {
+	    case BOOL     : {(*(static_cast<sc_in  <bool    > *>(_sc_signal))) (*(static_cast<sc_out <bool    > *>(signal->_sc_signal))); break;}
+	    case UINT8_T  : {(*(static_cast<sc_in  <uint8_t > *>(_sc_signal))) (*(static_cast<sc_out <uint8_t > *>(signal->_sc_signal))); break;}
+	    case UINT16_T : {(*(static_cast<sc_in  <uint16_t> *>(_sc_signal))) (*(static_cast<sc_out <uint16_t> *>(signal->_sc_signal))); break;}
+	    case UINT32_T : {(*(static_cast<sc_in  <uint32_t> *>(_sc_signal))) (*(static_cast<sc_out <uint32_t> *>(signal->_sc_signal))); break;}
+	    case UINT64_T : {(*(static_cast<sc_in  <uint64_t> *>(_sc_signal))) (*(static_cast<sc_out <uint64_t> *>(signal->_sc_signal))); break;}
+	    default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+	    }
+	else
+	  if ((_direction == OUT) and (signal->_direction == IN ))
+	    switch (_type_info)
+	      {
+	      case BOOL     : {(*(static_cast<sc_out <bool    > *>(_sc_signal))) (*(static_cast<sc_in  <bool    > *>(signal->_sc_signal))); break;}
+	      case UINT8_T  : {(*(static_cast<sc_out <uint8_t > *>(_sc_signal))) (*(static_cast<sc_in  <uint8_t > *>(signal->_sc_signal))); break;}
+	      case UINT16_T : {(*(static_cast<sc_out <uint16_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint16_t> *>(signal->_sc_signal))); break;}
+	      case UINT32_T : {(*(static_cast<sc_out <uint32_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint32_t> *>(signal->_sc_signal))); break;}
+	      case UINT64_T : {(*(static_cast<sc_out <uint64_t> *>(_sc_signal))) (*(static_cast<sc_in  <uint64_t> *>(signal->_sc_signal))); break;}
+	      default       : {throw (ErrorMorpheo ("Signal \""+_name+"\" : type unknow.")); break;}
+	      }
+	  else
+	    throw (ErrorMorpheo ("Signal \""+_name+"\" : unsupported direction to link."));
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_mapping.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_mapping.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_mapping.cpp	(revision 42)
@@ -0,0 +1,34 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Signal::mapping (Signal * signal)
+  {
+    if (_is_map == true)
+      throw (ErrorMorpheo ("Signal \""+_name+"\", can't map, because it's already map."));
+    
+    if (signal->_is_allocate == false)
+      throw (ErrorMorpheo ("Signal \""+_name+"\", can't map with signal \""+signal->get_name()+"\", because it's not already allocate."));
+
+    if (_direction == OUT)
+      {
+	// This output is mapped
+	_is_map     = true;
+
+	if (signal->_direction == OUT)
+	  _sc_signal_map = signal->_sc_signal_map;
+      }
+    
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_testbench.cpp	(revision 42)
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  bool Signal::presence_vhdl (void)
+  {
+    return ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	    (_presence_port == PORT_VHDL_NO_TESTBENCH_YES ) or
+	    (_presence_port == CLOCK_VHDL_YES             ) or
+	    (_presence_port == RESET_VHDL_YES             ) );
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_vhdl.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_vhdl.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_presence_vhdl.cpp	(revision 42)
@@ -0,0 +1,23 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  bool Signal::presence_vhdl (void)
+  {
+    return ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	    (_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or
+	    (_presence_port == CLOCK_VHDL_YES             ) or
+	    (_presence_port == RESET_VHDL_YES             ) );
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_print.cpp	(revision 42)
@@ -21,17 +21,4 @@
 		  << toString(x._presence_port);
 
-// #ifdef VHDL_TESTBENCH
-//     if (x._list_value->empty()== false)
-//       {
-// 	list<string>::iterator i = x._list_value->begin();
-
-// 	while (i != x._list_value->end())
-// 	  {
-// 	    output_stream << "\n\t" << *i ;
-// 	    ++i;
-// 	  }
-//       }
-// #endif
-
     log_printf(FUNC,Behavioural,"operator<<","End");
 
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 42)
@@ -19,5 +19,6 @@
     if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
 	(_presence_port == PORT_VHDL_YES_TESTBENCH_NO ) or
-	(_presence_port == CLOCK_VHDL_YES))
+	(_presence_port == CLOCK_VHDL_YES)              or
+	(_presence_port == RESET_VHDL_YES))
       vhdl->set_port (_name,_direction,_size);
 
@@ -30,8 +31,10 @@
     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 ) 
+    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 )
+// 	or (_presence_port == RESET_VHDL_YES)
+// 	or (_presence_port == RESET_VHDL_NO ) 
 	)
       vhdl->set_signal (_name        ,_size);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 41)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_testbench.cpp	(revision 42)
@@ -18,5 +18,7 @@
 
     if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
-	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES ))
+	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES ) or
+	(_presence_port == RESET_VHDL_YES             ) or
+	(_presence_port == RESET_VHDL_NO              ) )
       {
 	string str;
@@ -32,5 +34,5 @@
 		case IN    : {str =             toBase2 (value); break;}
 		case OUT   : {str =             toBase2 (value); break;}
-// 		case INOUT : {break;}
+		default    : {break;}
 		}
 	      break;
@@ -44,5 +46,5 @@
 		case IN    : {str =             toBase2 (value,_size); break;}
 		case OUT   : {str =             toBase2 (value,_size); break;}
-// 		case INOUT : {break;}
+   		default    : {break;}
 		}
 	      break;
@@ -56,5 +58,5 @@
 		case IN    : {str =             toBase2 (value,_size); break;}
 		case OUT   : {str =             toBase2 (value,_size); break;}
-// 		case INOUT : {break;}		
+   		default    : {break;}		
 		}
 	      break;
@@ -68,5 +70,5 @@
 		case IN    : {str =             toBase2 (value,_size); break;}
 		case OUT   : {str =             toBase2 (value,_size); break;}
-// 		case INOUT : {break;}
+   		default    : {break;}
 		}
 	      break;
@@ -80,5 +82,5 @@
 		case IN    : {str =             toBase2 (value,_size); break;}
 		case OUT   : {str =             toBase2 (value,_size); break;}
-// 		case INOUT : {break;}
+   		default    : {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 42)
@@ -13,39 +13,45 @@
 
   void Signal::testbench_body (Vhdl * & vhdl,
-			       string   counter_name)
+			       string   counter_name,
+			       string   reset_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())
+    if ((_presence_port == PORT_VHDL_YES_TESTBENCH_YES) or
+	(_presence_port == PORT_VHDL_NO_TESTBENCH_YES ))
+      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;
+	      
 	      vhdl->set_body ("\t"+separator+*j+separator+" when "+toString(cpt++)+",");
-	    else
-	      vhdl->set_body ("\t"+separator+*j+separator+" when others;");
-	  }
-      }
-
+	    }
+	  
+	  if (_size == 1)
+	    vhdl->set_body ("\t'0' when others;");
+	  else
+	    vhdl->set_body ("\t(others => '0') when others;");
+	}
+  
     log_printf(FUNC,Behavioural,"testbench_body","End");
   };
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 42)
@@ -18,5 +18,5 @@
 
     if (_direction == OUT)
-      vhdl->set_body ("and "+_name+" = "+_name+"_test");
+      vhdl->set_body ("\tand "+_name+" = "+_name+"_test");
 
     log_printf(FUNC,Behavioural,"testbench_test_ok","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_Testbench.cpp	(revision 41)
+++ 	(revision )
@@ -1,37 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-//   Vhdl_Testbench::Vhdl_Testbench  (string   name       ,
-// 				   bool     exhaustive ):
-//     _name        (name       ),
-//     _exhaustive  (exhaustive )
-//   {
-//     _vhdl = new Vhdl (_name + "_Testbench");
-
-//     _size_input  = 0;
-//     _size_output = 0;
-
-//     _num_cycle   = 0;
-//   };
-  
-//   Vhdl_Testbench::~Vhdl_Testbench ()
-//   {
-//     delete _vhdl;
-//   };
-  
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::add_input (uint32_t value)
-//   {
-//     _list_input_cycle.push_front(toBase2(value,*_num_input));
-//     _num_input++;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::add_label (string label)
-//   {
-//     _list_label.push_back(label_t(_num_cycle,label));
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,27 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::add_output (uint32_t value)
-//   {
-//     _list_output_cycle.push_front(toBase2(value,*_num_output));
-//     _num_output ++;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,26 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::add_test (bool must_test)
-//   {
-//     _list_test.push_back(must_test);
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,49 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-#include "Include/ErrorMorpheo.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-//   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."));
-
-//     // 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  ();
-
-// //     if (counter == get_output ())
-// //       throw (ErrorMorpheo ("The number of input is different of number of output."));
-
-//     generate_instance      ();
-//     generate_process_clock (counter);
-    
-//     _vhdl->generate_file(false, true);
-//   };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,38 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-namespace morpheo              {
-namespace behavioural          {
-
-//   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("         );");
-//   };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-namespace morpheo              {
-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("");
-
-//     _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;");
-//   };
-
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   uint32_t Vhdl_Testbench::get_input (void)
-//   {
-//     list<string>::iterator i   = _list_input.begin();
-    
-//     uint32_t counter = 0;
-
-//     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;
-
-// 	    if (i != _list_input.end())
-// 	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
-// 	    else
-// 	      _vhdl->set_body ("\t\""+*j+"\" when others;");
-// 	  }
-//       }
-
-//     return counter;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-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;");  
-//       }
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,48 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   uint32_t Vhdl_Testbench::get_output (void)
-//   {
-//     list<string>::iterator i   = _list_output.begin();
-    
-//     uint32_t counter = 0;
-
-//     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;
-
-// 	    if (i != _list_output.end())
-// 	      _vhdl->set_body ("\t\""+*j+"\" when "+toString(counter++)+",");
-// 	    else
-// 	      _vhdl->set_body ("\t\""+*j+"\" when others;");
-// 	  }
-//       }
-
-//     return counter;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,50 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   uint32_t Vhdl_Testbench::get_test (void)
-//   {
-//     list<bool>::iterator i   = _list_test.begin();
-    
-//     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 <=");
-
-// 	while (i != _list_test.end())
-// 	  {
-// 	    list<bool>::iterator j = i;
-// 	    ++i;
-
-// 	    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;");
-// 	  }
-//       }
-
-//     return counter;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,32 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::new_cycle (void)
-//   {
-//     set_input();
-//     set_output();
-
-//     _num_input   = _list_input_size .begin();
-//     _num_output  = _list_output_size.begin();
-
-//     _num_cycle ++;
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,34 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * must be call after all add port
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   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);
-
-//     _num_input   = _list_input_size .begin();
-//     _num_output  = _list_output_size.begin();
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::set_input (void)
-//   {
-//     string text = "";
-
-//     while (_list_input_cycle.empty() == false)
-//       {
-// 	text += _list_input_cycle.front();
-
-// 	_list_input_cycle.pop_front();
-//       }
-
-//     _list_input.push_back(text);
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,35 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-namespace behavioural          {
-  
-//   void Vhdl_Testbench::set_output (void)
-//   {
-//     string text = "";
-
-//     while (_list_output_cycle.empty() == false)
-//       {
-// 	text += _list_output_cycle.front();
-
-// 	_list_output_cycle.pop_front();
-//       }
-
-//     _list_output.push_back(text);
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
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 41)
+++ 	(revision )
@@ -1,53 +1,0 @@
-#ifdef VHDL_TESTBENCH
-
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/include/Vhdl_Testbench.h"
-
-#include <sstream>
-using namespace std;
-
-namespace morpheo              {
-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";
-//       }
-
-//     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);
-
-//     _list_port.push_back(name);
-//   };
-  
-}; // end namespace behavioural          
-}; // end namespace morpheo              
-
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_direction_toString.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_direction_toString.cpp	(revision 42)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_direction_toString.cpp	(revision 42)
@@ -0,0 +1,31 @@
+#ifdef VHDL
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Vhdl.h"
+
+#include <sstream>
+using namespace std;
+
+namespace morpheo              {
+namespace behavioural          {
+  
+  string Vhdl::direction_toString (direction_t direction)
+  {
+    switch (direction)
+      {
+      case IN    : return "in    "; break;
+      case OUT   : return "out   "; break;
+      default    : return "      "; break;
+      }
+  };
+  
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
