Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/src/Component_signal_internal.cpp	(revision 113)
@@ -2,5 +2,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -14,16 +14,27 @@
 #define FUNCTION "Component::signal_internal"
   Signal * Component::signal_internal (Entity * entity_productor,
-				       Signal * signal_productor)
+				       Signal * signal_productor,
+                                       Entity * entity_consumer,
+				       Signal * signal_consumer)
   {
     log_printf(FUNC,Behavioural,FUNCTION,"Begin");
 
+    bool productor_is_cosimulation = usage_is_set(entity_productor->get_usage(),USE_COSIMULATION);
+    bool consumer_is_cosimulation  = usage_is_set(entity_consumer ->get_usage(),USE_COSIMULATION);
+    bool is_cosimulation           = consumer_is_cosimulation or productor_is_cosimulation;
+    if (productor_is_cosimulation and consumer_is_cosimulation)
+      throw ERRORMORPHEO (FUNCTION,toString(_("Entity \"%s\" and Entity \"%s\" use both cosimulation. It's not supported.\n"),entity_productor->get_name().c_str(),entity_consumer->get_name().c_str()));
+    
     // create name of internal's signal
-    std::string str_entity = entity_productor->get_name();
-    std::string str_signal = signal_productor->get_name();
+    Entity * entity = (consumer_is_cosimulation)?entity_consumer:entity_productor;
+    Signal * signal = (consumer_is_cosimulation)?signal_consumer:signal_productor;
+
+    std::string str_entity = entity->get_name();
+    std::string str_signal = signal->get_name();
     
-    UpperCase (str_entity);
-    UpperCase (str_signal);
+//     UpperCase (str_entity);
+//     UpperCase (str_signal);
     
-    std::string name_internal = "internal_"+str_entity+"_"+str_signal;
+    std::string name_internal = (is_cosimulation)?str_signal:("internal_"+str_entity+"_"+str_signal);
     
     // test if internal's signal exist ... else, create
@@ -38,38 +49,19 @@
 	
 	if (interface == NULL)
-	  throw (ErrorMorpheo ("<Component::port_map> Component \""+_entity->get_name()+"\", doesn't have an interface \"\"."));
-	
-	std::string signame = entity_productor->get_name()+"_"+signal_productor->get_name();
-	
+	  throw ERRORMORPHEO (FUNCTION,toString(_("Component \"%s\", doesn't have an interface \"\".\n"),_entity->get_name().c_str()));
+
+// 	std::string signame   = entity->get_name()+"_"+signal->get_name();
+        std::string signame   = name_internal;
+        type_info_t type_info = signal->get_type_info();
+
 	// Signal's creation
-	switch (signal_productor->get_type_info())
+	switch (type_info)
 	  {
-	  case BOOL     : 
-	    {
-	      interface->set_signal_internal<bool    >(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT8_T  :
-	    {
-	      interface->set_signal_internal<uint8_t >(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT16_T :
-	    {
-	      interface->set_signal_internal<uint16_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT32_T :
-	    {
-	      interface->set_signal_internal<uint32_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  case UINT64_T :
-	    {
-	      interface->set_signal_internal<uint64_t>(signame, signal_productor->get_size());
-	      break;
-	    }
-	  default       :
-	    throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
+	  case BOOL     : interface->set_signal_internal<bool    >(signame, signal->get_size()); break;
+	  case UINT8_T  : interface->set_signal_internal<uint8_t >(signame, signal->get_size()); break;
+	  case UINT16_T : interface->set_signal_internal<uint16_t>(signame, signal->get_size()); break;
+	  case UINT32_T : interface->set_signal_internal<uint32_t>(signame, signal->get_size()); break;
+	  case UINT64_T : interface->set_signal_internal<uint64_t>(signame, signal->get_size()); break;
+	  default       :throw (ErrorMorpheo ("Signal \""+name_internal+"\" : type unknow."));
 	  }
 	
