Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity.cpp	(revision 31)
@@ -0,0 +1,42 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Entity::Entity  (string       name   ,
+		   string       type   ,
+		   schema_t     schema):
+    _name       (name      ),
+    _type       (type      ),
+    _schema     (schema    )
+  {
+    _is_map = false;
+  };
+
+  Entity::Entity  (const Entity & entity):
+    _name       (entity._name      ),
+    _type       (entity._type      ),
+    _schema     (entity._schema    )
+  {
+    _is_map     = entity._is_map    ;
+    _interfaces = entity._interfaces;
+    _comment    = entity._comment   ;
+  };
+  
+  Entity::~Entity ()
+  {
+    delete _interfaces;
+  };
+  
+
+}; // 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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_find_interface.cpp	(revision 31)
@@ -0,0 +1,21 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Interface * Entity::find_interface (string name)
+  {
+    return _interfaces->find_interface(name);
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_comment.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_comment.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_comment.cpp	(revision 31)
@@ -0,0 +1,22 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Entity::get_comment (void)
+  {
+    return _comment;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_get_interfaces.cpp	(revision 31)
@@ -0,0 +1,24 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  string Entity::get_interfaces (void)
+  {
+    ostringstream text;
+    text << *(_interfaces); 
+    return text.str();
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_map.cpp	(revision 31)
@@ -0,0 +1,33 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Entity::mapping (uint32_t size_x,
+			uint32_t size_y,
+			uint32_t pos_x ,
+			uint32_t pos_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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_print.cpp	(revision 31)
@@ -0,0 +1,26 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  ostream& operator<< (ostream& output_stream,
+		       morpheo::behavioural::Entity & x)
+  {
+    output_stream << x._name + "\t"+x._type+"\t"+toString(x._schema) << endl;
+    output_stream << x.get_comment()    << endl;
+    output_stream << x.get_interfaces() << endl;
+    return output_stream;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_comment.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_comment.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_comment.cpp	(revision 31)
@@ -0,0 +1,22 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Entity::set_comment (string comment)
+  {
+    _comment = _comment + comment;
+  };
+
+}; // 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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_set_interfaces.cpp	(revision 31)
@@ -0,0 +1,25 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Interfaces * Entity::set_interfaces (void)
+  {
+    Interfaces * interfaces = new Interfaces ();
+
+    _interfaces = interfaces;
+    
+    return interfaces;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_toXML.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Entity_toXML.cpp	(revision 31)
@@ -0,0 +1,63 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Entity.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  XML Entity::toXML (void)
+  {
+    XML xml (_name);
+    
+    xml.  balise_open       ("comment");
+    xml.    text            (get_comment());
+    xml.  balise_close      ();
+    xml.  balise_open_begin ("entity");
+    xml.    attribut        ("name"   ,_name);
+    xml.    attribut        ("type"   ,_type);
+    xml.    attribut        ("schema" ,toString(_schema));
+    xml.  balise_open_end   ();
+    xml.    insert_XML      (_interfaces->toXML());
+    xml.  balise_close      ();
+    
+    return xml;
+  };
+
+  XML Entity::toXML_mapping (void)
+  {
+    if (_is_map != true)
+      throw (ErrorMorpheo ("Entity \""+_name+"\" is never mapped"));
+    
+    XML xml (_name);
+    
+    xml.  balise_open_begin ("component");
+    xml.    attribut        ("name"   ,_name);
+    xml.    attribut        ("type"   ,_type);
+    xml.    attribut        ("size_x" ,toString(_map_size_x));
+    xml.    attribut        ("size_y" ,toString(_map_size_y));
+    xml.    attribut        ("pos_x"  ,toString(_map_pos_x ));
+    xml.    attribut        ("pos_y"  ,toString(_map_pos_y ));
+
+    xml.  balise_open_end   ();
+    try 
+      {
+    xml.    insert_XML      (_interfaces->toXML_mapping());
+      }
+    catch (ErrorMorpheo e)
+      {
+	throw (ErrorMorpheo("Entity \""+_name+"\" : "+e.what()));
+      }
+    xml.  balise_close      ();
+    
+    return xml;
+  };
+
+}; // 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 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface.cpp	(revision 31)
@@ -18,8 +18,25 @@
     _localisation (localisation)
   {
+    _list_signal = new list<Signal>;
+#ifdef POSITION
+    _is_map      = false;
+#endif
+  };
+
+  Interface::Interface  (const Interface & interface):
+    _name         (interface._name        ),
+    _direction    (interface._direction   ),
+    _localisation (interface._localisation)
+  {
+    _comment     = interface._comment    ;
+    _list_signal = interface._list_signal;
+#ifdef POSITION
+    _is_map      = interface._is_map     ;
+#endif
   };
   
   Interface::~Interface ()
   {
+    delete _list_signal;
   };
   
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_get_signal.cpp	(revision 31)
@@ -19,6 +19,6 @@
 
 
-    list<Signal>::iterator i     = _list_signal.begin();
-    bool                   empty = _list_signal.empty();
+    list<Signal>::iterator i     = _list_signal->begin();
+    bool                   empty = _list_signal->empty();
 
     string                 tab   = string(depth,'\t');
@@ -28,5 +28,5 @@
       {
 	// First
-	if (i != _list_signal.end())
+	if (i != _list_signal->end())
 	  {
 	    text << tab << *i;
@@ -34,5 +34,5 @@
 	  }
 	
-	while (i != _list_signal.end())
+	while (i != _list_signal->end())
 	  {
 	    text << separator;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_port_map.cpp	(revision 31)
@@ -0,0 +1,26 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interface.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Interface::port_map (void * entity,
+			    void * interface)
+  {
+    _is_map        = true     ;
+    _entity_map    = entity   ;
+    _interface_map = interface;
+
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_port.cpp	(revision 31)
@@ -15,9 +15,9 @@
   void Interface::set_port (Vhdl * & vhdl)
   {
-    if (not _list_signal.empty())
+    if (not _list_signal->empty())
       {
-	list<Signal>::iterator i     = _list_signal.begin();
+	list<Signal>::iterator i     = _list_signal->begin();
 	
-	while (i != _list_signal.end())
+	while (i != _list_signal->end())
 	  {
 	    presence_port_t p = (*i)._presence_port;
@@ -32,9 +32,9 @@
   void Interface::set_port (Vhdl_Testbench * & vhdl_testbench)
   {
-    if (not _list_signal.empty())
+    if (not _list_signal->empty())
       {
-	list<Signal>::iterator i     = _list_signal.begin();
+	list<Signal>::iterator i     = _list_signal->begin();
 	
-	while (i != _list_signal.end())
+	while (i != _list_signal->end())
 	  {
 	    presence_port_t p = (*i)._presence_port;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_set_signal.cpp	(revision 31)
@@ -12,16 +12,15 @@
 namespace behavioural          {
 
-  string Interface::set_signal (Signal signal)
-  {
-    return set_signal(signal._name     ,
-		      signal._direction,
-		      signal._size     );
-    
-  };
+//   string Interface::set_signal (Signal signal)
+//   {
+//     return set_signal(signal._name     ,
+// 		      signal._direction,
+// 		      signal._size     );
+//   };
 
-  string Interface::set_signal (string          name     ,
-				direction_t     direction,
-				uint32_t        size     ,
-				presence_port_t presence_port)
+  Signal * Interface::set_signal (string          name     ,
+				  direction_t     direction,
+				  uint32_t        size     ,
+				  presence_port_t presence_port)
   {
     string str_direction =  toString(direction);
@@ -39,10 +38,11 @@
       signame += "_"+str_signal;
     
-    _list_signal.push_back (Signal (signame      ,
-				    direction    ,
-				    size         ,
-				    presence_port));
+    Signal * sig = new Signal (signame      ,
+			       direction    ,
+			       size         ,
+			       presence_port);
+    _list_signal->push_back (*sig);
 
-    return signame;
+    return sig;
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interface_toXML.cpp	(revision 31)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/include/Interface.h"
+#include "Behavioural/include/Entity.h"
 
 namespace morpheo              {
@@ -15,5 +16,5 @@
     XML xml ("interface");
     
-    xml.balise_open_begin ("interface");
+    xml.balise_open_begin ("port");
     xml.  attribut        ("name"         ,_name                 );
     xml.  attribut        ("direction"   ,toString(_direction   ));
@@ -22,9 +23,9 @@
     xml.  text            (get_comment());
 
-    if (_list_signal.empty()== false)
+    if (_list_signal->empty()== false)
       {
-	list<Signal>::iterator i     = _list_signal.begin();
+	list<Signal>::iterator i     = _list_signal->begin();
 
-	while (i != _list_signal.end())
+	while (i != _list_signal->end())
 	  {
 	    xml.  insert_XML ((*i).toXML());
@@ -38,4 +39,21 @@
   };
 
+#ifdef POSITION
+  XML Interface::toXML_mapping (void)
+  {
+    if (_is_map != true)
+      throw (ErrorMorpheo ("Interface \""+_name+"\" is never mapped"));
+
+    XML xml ("interface");
+    
+    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.singleton_end   ();
+     
+    return xml;
+  };
+#endif
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces.cpp	(revision 31)
@@ -13,8 +13,15 @@
   Interfaces::Interfaces  (void)
   {
+    _list_interface = new list<Interface>;
+  };
+
+  Interfaces::Interfaces  (const Interfaces & interfaces)
+  {
+    _list_interface = interfaces._list_interface;
   };
   
   Interfaces::~Interfaces ()
   {
+    delete _list_interface;
   };
   
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_find_interface.cpp	(revision 31)
@@ -0,0 +1,31 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Interfaces.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Interface * Interfaces::find_interface (string name)
+  {
+    if (_list_interface->empty()== false)
+      {
+	list<Interface>::iterator i     = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    if ((*i)._name == name)
+	      return &(*i);
+	    ++i;
+	  }
+      }
+     
+    return NULL;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_get_interface.cpp	(revision 31)
@@ -15,10 +15,9 @@
   {
     uint32_t               depth          = 0;
-    string                 separator      = ",\n";
+    string                 separator      = "\n";
     bool                   last_separator = false;
 
-
-    list<Interface>::iterator i  = _list_interface.begin();
-    bool                   empty = _list_interface.empty();
+    list<Interface>::iterator i  = _list_interface->begin();
+    bool                   empty = _list_interface->empty();
 
     string                 tab   = string(depth,'\t');
@@ -28,5 +27,5 @@
       {
 	// First
-	if (i != _list_interface.end())
+	if (i != _list_interface->end())
 	  {
 	    text << tab << *i;
@@ -34,5 +33,5 @@
 	  }
 	
-	while (i != _list_interface.end())
+	while (i != _list_interface->end())
 	  {
 	    text << separator;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_print.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_print.cpp	(revision 31)
@@ -12,5 +12,5 @@
 namespace behavioural          {
 
-  ostream& operator<< (ostream& output_stream,
+  ostream& operator<< (ostream& output_stream ,
 		       morpheo::behavioural::Interfaces & x)
   {
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_interface.cpp	(revision 31)
@@ -11,7 +11,25 @@
 namespace behavioural          {
 
-  void Interfaces::set_interface (Interface interface)
+  Interface * Interfaces::set_interface (string         name        ,
+					 direction_t    direction   ,
+					 localisation_t localisation)
   {
-    _list_interface.push_back (interface);
+    Interface * interface = new Interface (name, direction, localisation);
+    
+    _list_interface->push_back (*interface);
+
+    return interface;
+  };
+
+  Interface * Interfaces::set_interface (string         name        ,
+					 direction_t    direction   ,
+					 localisation_t localisation,
+					 string         comment     )
+  {
+    Interface * interface = set_interface(name, direction, localisation);
+    
+    interface->set_comment (comment);
+
+    return interface;
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_set_port.cpp	(revision 31)
@@ -15,9 +15,9 @@
   void Interfaces::set_port (Vhdl * & vhdl)
   {
-    if (not _list_interface.empty())
+    if (not _list_interface->empty())
       {
-	list<Interface>::iterator i     = _list_interface.begin();
+	list<Interface>::iterator i     = _list_interface->begin();
 	
-	while (i != _list_interface.end())
+	while (i != _list_interface->end())
 	  {
 	    (*i).set_port (vhdl);
@@ -29,9 +29,9 @@
   void Interfaces::set_port (Vhdl_Testbench * & vhdl_testbench)
   {
-    if (not _list_interface.empty())
+    if (not _list_interface->empty())
       {
-	list<Interface>::iterator i     = _list_interface.begin();
+	list<Interface>::iterator i     = _list_interface->begin();
 	
-	while (i != _list_interface.end())
+	while (i != _list_interface->end())
 	  {
 	    (*i).set_port (vhdl_testbench);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Interfaces_toXML.cpp	(revision 31)
@@ -15,11 +15,9 @@
     XML xml ("interfaces");
     
-//     xml.balise_open ("interfaces");
+    if (_list_interface->empty()== false)
+      {
+	list<Interface>::iterator i     = _list_interface->begin();
 
-    if (_list_interface.empty()== false)
-      {
-	list<Interface>::iterator i     = _list_interface.begin();
-
-	while (i != _list_interface.end())
+	while (i != _list_interface->end())
 	  {
 	    xml.  insert_XML ((*i).toXML());
@@ -27,10 +25,27 @@
 	  }
       }
-
-//     xml.balise_close      ();
      
     return xml;
   };
 
+#ifdef POSITION
+  XML Interfaces::toXML_mapping (void)
+  {
+    XML xml ("interfaces");
+    
+    if (_list_interface->empty()== false)
+      {
+	list<Interface>::iterator i     = _list_interface->begin();
+
+	while (i != _list_interface->end())
+	  {
+	    xml.  insert_XML ((*i).toXML_mapping());
+	    ++i;
+	  }
+      }
+     
+    return xml;
+  };
+#endif
 }; // end namespace behavioural          
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position.cpp	(revision 31)
@@ -0,0 +1,34 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Position.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  Position::Position  (void)
+  {
+    _list_component = new list<Entity *>;
+  };
+
+  Position::Position  (const Position & position)
+  {
+    _entity         = position._entity        ;
+    _list_component = position._list_component;
+  };
+  
+  Position::~Position ()
+  {
+    delete _entity;
+    delete _list_component;
+  };
+  
+
+}; // 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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_entity.cpp	(revision 31)
@@ -0,0 +1,40 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_find_interface.cpp	(revision 31)
@@ -0,0 +1,22 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_generate_file.cpp	(revision 31)
@@ -0,0 +1,33 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_component.cpp	(revision 31)
@@ -0,0 +1,51 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_get_entity.cpp	(revision 31)
@@ -0,0 +1,23 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_port_map.cpp	(revision 31)
@@ -0,0 +1,56 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_print.cpp	(revision 31)
@@ -0,0 +1,25 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_component.cpp	(revision 31)
@@ -0,0 +1,27 @@
+#ifdef POSITION
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Position.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void Position::set_component (Entity * entity, 
+				uint32_t size_x,
+				uint32_t size_y,
+				uint32_t pos_x ,
+				uint32_t pos_y )
+  {
+    _list_component->push_back(entity);
+
+    entity->mapping(size_x, size_y, pos_x, pos_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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_set_entity.cpp	(revision 31)
@@ -0,0 +1,28 @@
+#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 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Position_toXML.cpp	(revision 31)
@@ -0,0 +1,41 @@
+#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 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 31)
@@ -21,9 +21,16 @@
   {
   };
-  
+
+  Signal::Signal  (const Signal & signal):
+    _name          (signal._name         ),
+    _direction     (signal._direction    ),
+    _size          (signal._size         ),
+    _presence_port (signal._presence_port)
+  {
+  };
+
   Signal::~Signal ()
   {
   };
-  
 
 }; // end namespace behavioural          
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML.cpp	(revision 31)
@@ -14,4 +14,5 @@
     _name (name)
   {
+    _filename_extension="xml";
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_filename_extension.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_filename_extension.cpp	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_filename_extension.cpp	(revision 31)
@@ -0,0 +1,21 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/XML.h"
+#include <fstream>
+using namespace std;
+
+namespace morpheo              {
+namespace behavioural          {
+
+  void XML::filename_extension (string extension)
+  {
+    _filename_extension = extension;
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/XML_generate_file.cpp	(revision 31)
@@ -18,5 +18,5 @@
 
     string name     = _name;
-    string filename =  name + ".xml";
+    string filename =  name + "." + _filename_extension;
 
     cout << "Generate file \""<< filename << "\"" << endl;
