Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/configuration.cfg	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/SelfTest/configuration.cfg	(revision 31)
@@ -1,4 +1,4 @@
 Select_Priority_Fixed
-16	16	*2	# nb_entity
-0	0	+1	# encoding_one_hot
+2	16	*2	# nb_entity
+0	1	+1	# encoding_one_hot
 1	1	+1	# encoding_compact
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h	(revision 31)
@@ -19,5 +19,9 @@
 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Parameters.h"
 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Types.h"
+#ifdef POSITION
+#include "Behavioural/include/Position.h"
+#else
 #include "Behavioural/include/Interfaces.h"
+#endif
 
 #ifdef STATISTICS
@@ -62,5 +66,9 @@
 #endif
 
-  private   : Interfaces                     * interfaces;
+#ifdef POSITION
+  private   : Position                       * _position;
+#endif
+
+  private   : Interfaces                     * _interfaces;
 
 #ifdef SYSTEMC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_allocation.cpp	(revision 31)
@@ -9,5 +9,5 @@
 #include "Behavioural/Generic/Select/Select_Priority_Fixed/include/Select_Priority_Fixed.h"
 
-namespace morpheo                    {
+namespace morpheo{
 namespace behavioural {
 namespace generic {
@@ -21,12 +21,25 @@
     log_printf(FUNC,Select_Priority_Fixed,"allocation","Begin");
 
-    interfaces = new Interfaces;
+#ifdef POSITION
+    _position   = new Position ();
+
+    Entity * entity = _position->set_entity (_name                  ,
+					     "Select_Priority_Fixed",
+					     COMBINATORY            );
+
+    _interfaces = entity->set_interfaces();
+#else
+    _interfaces = new Interfaces();
+#endif
 
     // ~~~~~[ Interface : "" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-    Interface interface_ ("", IN, WEST);
-    
-    in_CLOCK        = interface_.set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
-    in_NRESET       = interface_.set_signal_in  <Tcontrol_t> ("nreset",1);
 
+    Interface * interface_ = _interfaces->set_interface(""  ,
+							IN  ,
+							WEST,
+							"...");
+
+     in_CLOCK        = interface_->set_signal_clk              ("clock" ,1, PORT_VHDL_YES_TESTBENCH_NO);
+     in_NRESET       = interface_->set_signal_in  <Tcontrol_t> ("nreset",1);
      in_VAL          = new SC_IN (Tcontrol_t)           * [_param._nb_entity];
     if (_param._encoding_one_hot)
@@ -35,16 +48,20 @@
     for (uint32_t i=0; i<_param._nb_entity; i++)
       {
-	 in_VAL [i]    = interface_.set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
+	 in_VAL [i]    = interface_->set_signal_in  <Tcontrol_t> ("val_"+toString(i),1);
 	if (_param._encoding_one_hot)
-	out_ACK [i]    = interface_.set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
+	out_ACK [i]    = interface_->set_signal_out <Tcontrol_t> ("ack_"+toString(i),1);
       }
 
     if (_param._encoding_compact)
       {
-	out_ENTITY     = interface_.set_signal_out <Tentity_t > ("entity"    , _param._size_entity);
-	out_ENTITY_ACK = interface_.set_signal_out <Tcontrol_t> ("entity_ack", 1);
+	out_ENTITY     = interface_->set_signal_out <Tentity_t > ("entity"    , _param._size_entity);
+	out_ENTITY_ACK = interface_->set_signal_out <Tcontrol_t> ("entity_ack", 1);
       }
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+#ifdef POSITION
+    _position->generate_file();
+#endif
 
     log_printf(FUNC,Select_Priority_Fixed,"allocation","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_deallocation.cpp	(revision 31)
@@ -40,6 +40,9 @@
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
-    delete interfaces;
-
+#ifdef POSITION
+    delete _position;
+#else
+    delete _interfaces;
+#endif
     log_printf(FUNC,Select_Priority_Fixed,"deallocation","End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/Select/Select_Priority_Fixed/src/Select_Priority_Fixed_vhdl_port.cpp	(revision 31)
@@ -20,8 +20,8 @@
 
 #ifdef VHDL
-    interfaces->set_port(vhdl);
+    _interfaces->set_port(vhdl);
 #endif
 #ifdef VHDL_TESTBENCH
-    interfaces->set_port(_vhdl_testbench);			
+    _interfaces->set_port(_vhdl_testbench);			
    _vhdl_testbench->set_clock    ("in_CLOCK",true);
 #endif    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Makefile.Selftest	(revision 31)
@@ -125,4 +125,5 @@
 					$(DIR_CFG_USER)/*~	\
 					*.vhdl			\
+					*.pos			\
 					*.stat			\
 					generated_by_systemcass \
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Direction.h	(revision 31)
@@ -1,4 +1,2 @@
-#ifdef VHDL
-
 #ifndef morpheo_behavioural_Direction_h
 #define morpheo_behavioural_Direction_h
@@ -13,17 +11,16 @@
 }; // end namespace behavioural          
   
-template<>           inline std::string toString<morpheo::behavioural::direction_t>(const morpheo::behavioural::direction_t& x)
-{
-  switch (x)
-    {
-    case morpheo::behavioural::IN    : return "in"    ; break;
-    case morpheo::behavioural::OUT   : return "out"   ; break;
-    case morpheo::behavioural::INOUT : return "inout" ; break;
-    default    : return ""      ; break;
-    }
-}
-
+  template<> inline std::string toString<morpheo::behavioural::direction_t>(const morpheo::behavioural::direction_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::IN    : return "in"    ; break;
+      case morpheo::behavioural::OUT   : return "out"   ; break;
+      case morpheo::behavioural::INOUT : return "inout" ; break;
+      default    : return ""      ; break;
+      }
+  }
+  
 }; // end namespace morpheo              
 
 #endif
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 31)
@@ -0,0 +1,75 @@
+#ifdef POSITION
+#ifndef morpheo_behavioural_Entity_h
+#define morpheo_behavioural_Entity_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <stdint.h>
+#include <iostream>
+#include <list>
+#include "Behavioural/include/Interfaces.h"
+#include "Behavioural/include/Schema.h"
+#include "Include/ErrorMorpheo.h"
+#include "Include/ToString.h"
+#include "Include/Debug.h"
+
+using namespace std;
+
+namespace morpheo              {
+namespace behavioural          {
+
+  class Entity
+  {
+    friend class Position;
+    friend class Interface;
+
+    // -----[ fields ]----------------------------------------------------
+  private   : const string          _name         ;
+  private   : const string          _type         ;
+  private   : const schema_t        _schema       ;
+  private   : Interfaces          * _interfaces   ;
+  private   : string                _comment      ;
+
+  private   :       bool            _is_map       ;
+  private   :       uint32_t        _map_size_x   ;
+  private   :       uint32_t        _map_size_y   ;
+  private   :       uint32_t        _map_pos_x    ;
+  private   :       uint32_t        _map_pos_y    ;
+
+    // -----[ methods ]---------------------------------------------------
+  public    :                       Entity            (string        name   ,
+						       string        type   ,
+						       schema_t      schema );
+  public    :                        Entity           (const Entity & entity);
+  public    :                       ~Entity           ();
+
+  public    : void                  set_comment       (string comment);
+  private   : string                get_comment       (void          );
+
+  public    : Interfaces *          set_interfaces    (void);
+  private   : string                get_interfaces    (void);
+
+  public    : Interface  *          find_interface    (string name);
+
+  public    : void                  mapping           (uint32_t size_x,
+						       uint32_t size_y,
+						       uint32_t pos_x ,
+						       uint32_t pos_y );
+
+  public    : XML                   toXML             (void);
+  public    : XML                   toXML_mapping     (void);
+
+  public    : friend ostream&       operator<<        (ostream& output_stream,
+  					  	       morpheo::behavioural::Entity & x);
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 31)
@@ -26,4 +26,5 @@
 #endif
 #include "Include/ToString.h"
+#include "Include/ErrorMorpheo.h"
 #include "Include/Debug.h"
 
@@ -35,4 +36,6 @@
   class Interface
   {
+    friend class Interfaces;
+
     // -----[ fields ]----------------------------------------------------
   private   : const string          _name         ;
@@ -40,5 +43,11 @@
   private   : const localisation_t  _localisation ;
   private   :       string          _comment      ;
-  private   : list<Signal>          _list_signal  ;
+
+#ifdef POSITION
+  private   :       bool            _is_map       ;
+  private   :       void          * _entity_map   ; // Entity -> erreur cyclique
+  private   :       void          * _interface_map; // pour être homogène avec _entity_map
+#endif
+  private   : list<Signal>        * _list_signal  ;
 
     // -----[ methods ]---------------------------------------------------
@@ -47,11 +56,12 @@
 							  localisation_t localisation);
 
+  public    :                       Interface            (const Interface    & interface);
   public    :                       ~Interface           ();
 
   public    : void                  set_comment          (string comment);
-  public    : string                get_comment          (void          );
+  private   : string                get_comment          (void          );
 
-  public    : string                set_signal           (Signal          signal   );
-  public    : string                set_signal           (string          name     ,
+  private   : string                get_signal           (void);
+  public    : Signal *              set_signal           (string          name     ,
 							  direction_t     direction,
 							  uint32_t        size     ,
@@ -63,6 +73,6 @@
 							  presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      string str = set_signal (name, IN , size, presence_port);
-      sc_in_clk * signal = new sc_in_clk (str.c_str());
+      Signal * sig = set_signal (name, IN , size, presence_port);
+      sc_in_clk * signal = new sc_in_clk (sig->_name.c_str());
       return signal;
     };
@@ -73,6 +83,6 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      string str = set_signal (name, IN , size, presence_port);
-      sc_in <T> * signal = new sc_in <T> (str.c_str());
+      Signal * sig = set_signal (name, IN , size, presence_port);
+      sc_in <T> * signal = new sc_in <T> (sig->_name.c_str());
       return signal;
     };
@@ -83,11 +93,9 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      string str = set_signal (name, OUT , size, presence_port);
-      sc_out <T> * signal = new sc_out <T> (str.c_str());
+      Signal * sig = set_signal (name, OUT , size, presence_port);
+      sc_out <T> * signal = new sc_out <T> (sig->_name.c_str());
       return signal;
     };
 #endif
-
-  public    : string                get_signal           (void);
 
 #ifdef VHDL
@@ -98,6 +106,13 @@
 #endif
 
+#ifdef POSITION
+  public    : void                  port_map             (void * entity,
+							  void * interface);
+#endif
+
   public    : XML                   toXML                (void);
-
+#ifdef POSITION
+  public    : XML                   toXML_mapping        (void);
+#endif
   public    : friend ostream&       operator<<           (ostream& output_stream,
   					  		  morpheo::behavioural::Interface & x);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interfaces.h	(revision 31)
@@ -30,13 +30,19 @@
   {
     // -----[ fields ]----------------------------------------------------
-  private   : list<Interface>       _list_interface;
+  private   : list<Interface>     * _list_interface;
 
     // -----[ methods ]---------------------------------------------------
   public    :                       Interfaces            (void);
-
+  public    :                       Interfaces            (const Interfaces & interfaces);
   public    :                       ~Interfaces           ();
 
-  public    : void                  set_interface         (Interface interface);
-  public    : string                get_interface         (void);
+  public    : Interface *           set_interface         (string         name        ,
+							   direction_t    direction   ,
+							   localisation_t localisation);
+  public    : Interface *           set_interface         (string         name        ,
+							   direction_t    direction   ,
+							   localisation_t localisation,
+							   string         comment     );
+  private   : string                get_interface         (void);
 
 #ifdef VHDL
@@ -47,6 +53,10 @@
 #endif
 
+  public    : Interface  *          find_interface        (string name);
+
   public    : XML                   toXML                 (void);
-
+#ifdef POSITION
+  public    : XML                   toXML_mapping         (void);
+#endif
   public    : friend ostream&       operator<<            (ostream& output_stream,
   					  		   morpheo::behavioural::Interfaces & x);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Localisation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Localisation.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Localisation.h	(revision 31)
@@ -1,4 +1,2 @@
-#ifdef VHDL
-
 #ifndef morpheo_behavioural_Localisation_h
 #define morpheo_behavioural_Localisation_h
@@ -28,3 +26,2 @@
 
 #endif
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Position.h	(revision 31)
@@ -0,0 +1,69 @@
+#ifdef POSITION
+#ifndef morpheo_behavioural_Position_h
+#define morpheo_behavioural_Position_h
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <stdint.h>
+#include <iostream>
+#include <list>
+#include "Behavioural/include/Entity.h"
+#include "Include/ToString.h"
+#include "Include/Debug.h"
+
+using namespace std;
+
+namespace morpheo              {
+namespace behavioural          {
+
+  class Position
+  {
+    // -----[ fields ]----------------------------------------------------
+  private   : Entity              * _entity        ;
+  private   : list<Entity *>      * _list_component;
+    
+    // -----[ methods ]---------------------------------------------------
+  public    :                       Position          (void);
+  public    :                       Position          (const Position & position);
+  public    :                       ~Position         ();
+
+  public    : Entity *              set_entity        (string        name   ,
+						       string        type   ,
+						       schema_t      schema );
+  private   : string                get_entity        (void);
+
+  public    : void                  set_component     (Entity * entity,
+						       uint32_t size_x,
+						       uint32_t size_y,
+						       uint32_t pos_x ,
+						       uint32_t pos_y );
+
+  private   : string                get_component     (void);
+
+  public    : void                  port_map          (string component1,
+						       string signal1   ,
+						       string component2,
+						       string signal2   );
+
+  public    : XML                   toXML             (void);
+
+  private   : Entity *              find_entity       (string name);
+  private   : Interface *           find_interface    (string   name  , 
+						       Entity * entity);
+
+  public    : void                  generate_file     (void);
+    
+  public    : friend ostream&       operator<<        (ostream& output_stream,
+  					  	       morpheo::behavioural::Position & x);
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
+
+#endif
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Schema.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Schema.h	(revision 31)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Schema.h	(revision 31)
@@ -0,0 +1,37 @@
+#ifdef POSITION
+
+#ifndef morpheo_behavioural_Schema_h
+#define morpheo_behavioural_Schema_h
+
+#include "Include/ToString.h"
+
+namespace morpheo              {
+namespace behavioural          {
+
+typedef enum { MIXTE      ,
+	       COMBINATORY,
+	       FIFO       ,
+	       REGISTER   ,
+	       SHIFTER    ,
+	       ADDER      } schema_t;
+
+}; // end namespace behavioural          
+  
+template<>           inline std::string toString<morpheo::behavioural::schema_t>(const morpheo::behavioural::schema_t& x)
+{
+  switch (x)
+    {
+    case morpheo::behavioural::MIXTE       : return "Mixte"      ; break;
+    case morpheo::behavioural::COMBINATORY : return "Combinatory"; break;
+    case morpheo::behavioural::FIFO        : return "FIFO"       ; break;
+    case morpheo::behavioural::REGISTER    : return "Register"   ; break;
+    case morpheo::behavioural::SHIFTER     : return "Shifter"    ; break;
+    case morpheo::behavioural::ADDER       : return "Adder"      ; break;
+    default                                : return ""           ; break;
+    }
+}
+
+}; // end namespace morpheo
+
+#endif
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 31)
@@ -28,9 +28,11 @@
   class Signal
   {
+    friend class Interface;
+
     // -----[ fields ]----------------------------------------------------
-  public    : const string          _name         ;
-  public    : const direction_t     _direction    ;
-  public    : const uint32_t        _size         ;
-  public    : const presence_port_t _presence_port;
+  private   : const string          _name         ;
+  private   : const direction_t     _direction    ;
+  private   : const uint32_t        _size         ;
+  private   : const presence_port_t _presence_port;
 
     // -----[ methods ]---------------------------------------------------
@@ -39,4 +41,5 @@
 						 uint32_t        size          ,
 						 presence_port_t presence_port = PORT_VHDL_YES_TESTBENCH_YES);
+  public    :                   Signal          (const Signal &);
   public    :                   ~Signal         ();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h	(revision 29)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/XML.h	(revision 31)
@@ -24,7 +24,8 @@
   {
     // -----[ fields ]----------------------------------------------------
-  private  : const string     _name            ;
-  private  : string           _body            ;
-  private  : list<string>     _list_balise_name;
+  private  : const string     _name              ;
+  private  : string           _filename_extension;
+  private  : string           _body              ;
+  private  : list<string>     _list_balise_name  ;
 
     // -----[ methods ]---------------------------------------------------
@@ -42,4 +43,5 @@
   public   : bool             insert_XML          (XML    xml );
 
+  public   : void             filename_extension  (string extension);
   public   : void             generate_file       (void);
   public   : void             generate_file       (string encoding);
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;
