Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_port_map.cpp	(revision 65)
@@ -88,5 +88,7 @@
 	  }
 
-	signal_dest  = signal_internal (entity_productor, signal_productor);
+	signal_dest= signal_internal (entity_productor, signal_productor);
+	signal_dest->set_size_max(signal_src->get_size());
+
 	dest_is_port = false;
       }
@@ -131,8 +133,13 @@
     if (signal_src->get_direction() != OUT)
       throw (ErrorMorpheo ("<Component::port_map> the direction of the signal '"+signal_src->get_name()+"' must be OUT."));
+
+    Signal * signal_dest;
+
+    signal_dest= signal_internal (entity_src, signal_src);
+    signal_dest->set_size_max(signal_src->get_size());
     
     try
       {
-	signal_src->link(signal_internal (entity_src, signal_src),
+	signal_src->link(signal_dest,
 			 false);
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_vhdl_instance.cpp	(revision 65)
@@ -140,5 +140,4 @@
 // 				else
 // 				  {
-// 				    cout << "Kane à dit : " << signal_dest->get_name() << endl;
 // 				    // Test if output
 // 				    if (signal_dest->get_direction() == OUT)
@@ -156,6 +155,8 @@
 // 				      }				    
 // 				  }
-				
-				  vhdl->set_body_component_port_map (list_port_map, name_src, name_dest);
+				  
+				  vhdl->set_body_component_port_map (list_port_map,
+								     name_src , signal_src ->get_size(),
+								     name_dest, signal_dest->get_size() );
 				}
 			      ++k;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal.cpp	(revision 65)
@@ -17,18 +17,18 @@
     _name          (name         ),
     _direction     (direction    ),
-    _size          (size         ),
     _presence_port ((direction==INTERNAL)?PORT_VHDL_NO_TESTBENCH_NO:presence_port)
   {
     log_printf(FUNC,Behavioural,"Signal","Begin");
-    _is_allocate   = false;
-    _is_map_as_src = false;
-    _is_map_as_dest= false;
+    _size                = size;
+    _is_allocate         = false;
+    _is_map_as_src       = false;
+    _is_map_as_dest      = false;
     _connect_from_signal = NULL;
     _connect_to_signal   = NULL;
-    _sc_signal     = NULL;
-    _sc_signal_map = NULL;
-    _type_info     = UNKNOW;
+    _sc_signal           = NULL;
+    _sc_signal_map       = NULL;
+    _type_info           = UNKNOW;
 #ifdef VHDL_TESTBENCH
-    _list_value    = new list<string>;
+    _list_value          = new list<string>;
 #endif
     log_printf(FUNC,Behavioural,"Signal","End");
@@ -38,18 +38,18 @@
     _name          (signal._name         ),
     _direction     (signal._direction    ),
-    _size          (signal._size         ),
     _presence_port (signal._presence_port)
   {
     log_printf(FUNC,Behavioural,"Signal (copy)","Begin");
-    _is_allocate    = signal._is_allocate;
-    _is_map_as_src  = signal._is_map_as_src ;
-    _is_map_as_dest = signal._is_map_as_dest;
+    _size                = signal._size;
+    _is_allocate         = signal._is_allocate;
+    _is_map_as_src       = signal._is_map_as_src ;
+    _is_map_as_dest      = signal._is_map_as_dest;
     _connect_from_signal = signal._connect_from_signal;
     _connect_to_signal   = signal._connect_to_signal;
-    _sc_signal      = signal._sc_signal    ;
-    _sc_signal_map  = signal._sc_signal_map;
-    _type_info      = signal._type_info ;
+    _sc_signal           = signal._sc_signal    ;
+    _sc_signal_map       = signal._sc_signal_map;
+    _type_info           = signal._type_info ;
 #ifdef VHDL_TESTBENCH
-    _list_value     = signal._list_value;
+    _list_value          = signal._list_value;
 #endif
     log_printf(FUNC,Behavioural,"Signal (copy)","End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_from_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_from_signal.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_from_signal.cpp	(revision 65)
@@ -17,5 +17,11 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
     Signal * _return = _connect_from_signal;
+
+    while ((_return != NULL) and
+	   (_return->get_direction () == INTERNAL))
+      _return = _return->get_connect_from_signal();
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_to_signal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_to_signal.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_get_connect_to_signal.cpp	(revision 65)
@@ -17,5 +17,11 @@
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+
     Signal * _return = _connect_to_signal;
+
+    while ((_return != NULL) and
+	   (_return->get_direction () == INTERNAL))
+      _return = _return->get_connect_to_signal();
+
     log_printf(FUNC,Behavioural,FUNCTION,"End");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_link.cpp	(revision 65)
@@ -29,6 +29,4 @@
       throw (ErrorMorpheo ("<Signal::mapping> Can't mapping signal \""+_name+"\" with \""+signal_dest->get_name()+"\", because the first signal is already mapped."));
 
-    //     log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (before) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal_dest->_sc_signal_map));
-
     // List of all case
     //
@@ -55,4 +53,12 @@
     signal_dest->_is_map_as_dest      = true;
 
+    // an internal signal and port can't be a source. 
+    // also, to fill the connect_to_signal's field 
+    if ((signal_src->_direction == OUT) and 
+	(signal_dest->_direction == INTERNAL))
+      {
+	signal_dest->_connect_to_signal = signal_src;
+      }
+
     // vhdl_testbench : to read an output producte by a internal component
     // TODO : à vérifier !!!!!!!!!!!!
@@ -63,6 +69,4 @@
     connect (signal_dest);
 
-    //  log_printf(TRACE,Behavioural,FUNCTION, " * sc_signal (after ) %.8x - %.8x", (uint32_t)(_sc_signal_map), (uint32_t)(signal_dest->_sc_signal_map));
-    
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp	(revision 65)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Signal_set_size.cpp	(revision 65)
@@ -0,0 +1,34 @@
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/include/Signal.h"
+
+
+namespace morpheo              {
+namespace behavioural          {
+
+#undef  FUNCTION
+#define FUNCTION "Signal::set_size"
+  void Signal::set_size (uint32_t size)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    _size = size;
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+  };
+
+#undef  FUNCTION
+#define FUNCTION "Signal::set_size_max"
+  void Signal::set_size_max (uint32_t size)
+  {
+    log_printf(FUNC,Behavioural,FUNCTION,"Begin");
+    if (size > _size)
+      _size = size;
+    log_printf(FUNC,Behavioural,FUNCTION,"End");
+  };
+
+}; // end namespace behavioural          
+}; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp	(revision 62)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Vhdl_set_body_component_port_map.cpp	(revision 65)
@@ -20,8 +20,21 @@
   void Vhdl::set_body_component_port_map (list<string> & list_port_map      ,
 					  string         name_port          ,
-					  string         name_signal        )
+					  uint32_t       size_port          ,
+					  string         name_signal        ,
+					  uint32_t       size_signal        )
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
-    set_list(list_port_map, name_port + "\t=>" + name_signal);
+
+    if (size_port > size_signal)
+      throw (ErrorMorpheo ("<Vhdl::set_body_component_port_map> size of port '"+name_port+"' ("+toString(size_port)+") is greater than size of signal '"+name_signal+"' ("+toString(size_signal)+")."));
+
+    string str_size = "";
+
+    // test if size is different (possible if multi write
+    if (size_port != size_signal)
+      str_size = std_logic_range(size_port);
+    
+    set_list(list_port_map, name_port + "\t=>" + name_signal+str_size);
+      
     log_printf(FUNC,Behavioural,FUNCTION,"End");
   };
