Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Allocation.h	(revision 113)
@@ -101,4 +101,5 @@
 #define PRINT_SIZE_NUL(component,interface,signal) log_printf(TRACE,Allocation,FUNCTION,_("<%s> %s.%s.%s : size is nul."),_name.c_str(),component->get_name().c_str(),interface->get_name().c_str(),signal);
 #define TEST_SIGNAL(name,address) PRINT_SIGNAL_ADDRESS(name,address); TEST_PTR(address)
+#define INSTANCE_FOREIGN_PRINT(name) log_printf(TRACE,Allocation,FUNCTION,"<%s> : %s (%s, %d)",_name.c_str(),name,__FILE__,__LINE__);
 
 // ----------------------------------------------------------------------
@@ -106,6 +107,5 @@
 // ----------------------------------------------------------------------
 
-
-#define __ALLOC0_SIGNAL(sig, name, type)         \
+#define __ALLOC0_SIGNAL(sig, name, type)        \
   {                                             \
     sig = new type (name);                      \
@@ -113,9 +113,9 @@
 
 #ifdef POSITION
-#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
+#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
   INTERFACE_PRINT(name);                                                \
   morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name, direction, localisation, str);
 #else
-#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)            \
+#define ALLOC0_INTERFACE_BEGIN( name, direction, localisation, str)     \
   INTERFACE_PRINT(name);                                                \
   morpheo::behavioural::Interface_fifo * interface = _interfaces->set_interface( name);
@@ -124,13 +124,13 @@
 #define ALLOC0_INTERFACE_END()
 
-#define ALLOC0_VAL_ACK_IN(  sig, name, type)                             \
+#define ALLOC0_VAL_ACK_IN(  sig, name, type)                            \
   {                                                                     \
     sig = interface->set_signal_valack_in (name, type);                 \
   }                                                                     
-#define ALLOC0_VAL_ACK_OUT( sig, name, type)                             \
+#define ALLOC0_VAL_ACK_OUT( sig, name, type)                            \
   {                                                                     \
     sig = interface->set_signal_valack_out(name, type);                 \
   }                                                                     
-#define ALLOC0_VALACK_IN(     sig, type)                                 \
+#define ALLOC0_VALACK_IN(     sig, type)                                \
   {                                                                     \
     sig = interface->set_signal_valack_in (type);                       \
@@ -160,5 +160,5 @@
     }
 
-#define DELETE0_SIGNAL( sig, size)                                       \
+#define DELETE0_SIGNAL( sig, size)                                      \
   if (size > 0)                                                         \
     {                                                                   \
@@ -166,9 +166,35 @@
     }
 
-#define ALLOC0_SC_SIGNAL(  sig, name, type)                              \
-  sc_signal<type> * sig = new sc_signal<type> (name);                   \
+#define ALLOC0_FOREIGN_SIGNAL_IN(  sig, interface, name, type, size)    \
+  if (size > 0)                                                         \
+    {                                                                   \
+      std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
+      sig = new SC_IN    (type) (str.c_str());                          \
+    }
+
+#define ALLOC0_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size)    \
+  if (size > 0)                                                         \
+    {                                                                   \
+      std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(name)); \
+      sig = new SC_OUT   (type) (str.c_str());                          \
+    }
+
+#define DELETE0_FOREIGN_SIGNAL( sig, size) \
+  {                                        \
+    DELETE0_SIGNAL(sig,size);              \
+  }
+
+#define INSTANCE0_FOREIGN_SIGNAL(component, sig, type, name, size)      \
+  if (size > 0)                                                         \
+    {                                                                   \
+      INSTANCE_FOREIGN_PRINT(name);                                     \
+      _component->set_sc_signal<type>(_name,name,static_cast<void*>(component->sig)); \
+    }
+
+#define ALLOC0_SC_SIGNAL(  sig, name, type)                             \
+  sig = new sc_signal<type> (name);                                     \
   PRINT_SIGNAL_ADDRESS(name,sig);
 
-#define INSTANCE0_SC_SIGNAL(component, sig)                     \
+#define INSTANCE0_SC_SIGNAL(component, sig)                    \
   {                                                            \
     TEST_SIGNAL(component->sig->name(),component->sig);        \
@@ -177,5 +203,5 @@
   }
 
-#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                       \
+#define _INSTANCE0_SC_SIGNAL(component, sig1,sig2)                      \
   {                                                                     \
     TEST_SIGNAL(component->sig1->name(),component->sig1);               \
@@ -185,6 +211,7 @@
 
 #define DELETE0_SC_SIGNAL( sig)                  \
-  {                                             \
-    delete sig;                                 \
+  {                                              \
+    PRINT_SIGNAL_ADDRESS("",sig);                \
+    delete sig;                                  \
   }
 
@@ -326,6 +353,33 @@
   }
 
+#define ALLOC1_FOREIGN_SIGNAL_IN(sig, interface, name, type, size,x1)   \
+  {                                                                     \
+    sig = new SC_IN (type) * [x1];                                   \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      if (size > 0)                                                     \
+        {                                                               \
+          std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
+          sig [it1] = new SC_IN (type) (str.c_str());                   \
+        }                                                               \
+  }
+
+#define ALLOC1_FOREIGN_SIGNAL_OUT(sig, interface, name, type, size,x1)  \
+  {                                                                     \
+    sig = new SC_OUT (type) * [x1];                                     \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      if (size > 0)                                                     \
+        {                                                               \
+          std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(name)); \
+          sig [it1] = new SC_OUT (type) (str.c_str());                  \
+        }                                                               \
+  }
+
+#define DELETE1_FOREIGN_SIGNAL( sig, size,x1)            \
+  {                                                      \
+    DELETE1_SIGNAL(sig,x1,size);                         \
+  }
+
 #define ALLOC1_SC_SIGNAL( sig, name, type, x1)                          \
-  sc_signal<type> ** sig = new sc_signal<type> * [x1];                  \
+  sig = new sc_signal<type> * [x1];                                     \
   {                                                                     \
     std::string separator="_";                                          \
@@ -359,4 +413,5 @@
     for (uint32_t it1=0; it1<x1; it1++)                                 \
       {                                                                 \
+        PRINT_SIGNAL_ADDRESS("",sig[it1]);                         \
         delete sig[it1];                                                \
       }                                                                 \
@@ -530,6 +585,42 @@
   }
 
+
+#define ALLOC2_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2) \
+  {                                                                     \
+    sig = new SC_IN (type) ** [x1];                                     \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_IN (type) * [x2];                            \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          if (size > 0)                                                 \
+            {                                                           \
+              std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
+              sig [it1][it2] = new SC_IN    (type) (str.c_str()); \
+            }                                                           \
+      }                                                                 \
+  }
+
+#define ALLOC2_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2) \
+  {                                                                     \
+    sig = new SC_OUT (type) ** [x1];                                    \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_OUT (type) * [x2];                           \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          if (size > 0)                                                 \
+            {                                                           \
+              std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(name)); \
+              sig [it1][it2] = new SC_IN    (type) (str.c_str());       \
+            }                                                           \
+      }                                                                 \
+  }
+
+#define DELETE2_FOREIGN_SIGNAL( sig, size,x1,x2)            \
+  {                                                         \
+    DELETE2_SIGNAL(sig,x1,x2,size);                         \
+  }
+
 #define ALLOC2_SC_SIGNAL( sig, name, type, x1, x2)                      \
-  sc_signal<type> *** sig = new sc_signal<type> ** [x1];                \
+  sig = new sc_signal<type> ** [x1];                                    \
   {                                                                     \
     std::string separator="_";                                          \
@@ -571,4 +662,5 @@
         for (uint32_t it2=0; it2<x2; it2++)                             \
           {                                                             \
+            PRINT_SIGNAL_ADDRESS("",sig[it1][it2]);                     \
             delete sig[it1][it2];                                       \
           }                                                             \
@@ -758,6 +850,49 @@
   }
 
+#define ALLOC3_FOREIGN_SIGNAL_IN( sig, interface, name, type, size, x1, x2,x3)     \
+  {                                                                     \
+    sig = new SC_IN (type) *** [x1];                                    \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_IN (type) ** [x2];                           \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          {                                                             \
+            sig [it1][it2] = new SC_IN (type) * [x3];                   \
+            for (uint32_t it3=0; it3<x3; it3++)                         \
+              if (size > 0)                                             \
+                {                                                       \
+                  std::string str = (toString("in")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
+                  sig [it1][it2][it3] = new SC_IN (type) (str.c_str()); \
+                }                                                       \
+          }                                                             \
+      }                                                                 \
+  }
+
+#define ALLOC3_FOREIGN_SIGNAL_OUT( sig, interface, name, type, size, x1, x2,x3)    \
+  {                                                                     \
+    sig = new SC_OUT (type) *** [x1];                                   \
+    for (uint32_t it1=0; it1<x1; it1++)                                 \
+      {                                                                 \
+        sig [it1] = new SC_OUT (type) ** [x2];                          \
+        for (uint32_t it2=0; it2<x2; it2++)                             \
+          {                                                             \
+            sig [it1][it2] = new SC_OUT (type) * [x3];                  \
+            for (uint32_t it3=0; it3<x3; it3++)                         \
+              if (size > 0)                                             \
+                {                                                       \
+                  std::string str = (toString("out")+"_"+((interface!="")?(toString(interface)+"_"):toString(""))+toString(it1)+"_"+toString(it2)+"_"+toString(it3)+"_"+toString(name)); \
+                  sig [it1][it2][it3] = new SC_OUT(type) (str.c_str()); \
+                }                                                       \
+          }                                                             \
+      }                                                                 \
+  }
+
+#define DELETE3_FOREIGN_SIGNAL( sig, size,x1,x2,x3)            \
+  {                                                            \
+    DELETE3_SIGNAL(sig,x1,x2,x3,size);                         \
+  }
+
 #define ALLOC3_SC_SIGNAL( sig, name, type, x1, x2, x3)                  \
-  sc_signal<type> **** sig = new sc_signal<type> *** [x1];              \
+  sig = new sc_signal<type> *** [x1];                                   \
   {                                                                     \
     std::string separator="_";                                          \
@@ -807,4 +942,5 @@
             for (uint32_t it3=0; it3<x3; it3++)                         \
               {                                                         \
+                PRINT_SIGNAL_ADDRESS("",sig[it1][it2][it3]);            \
                 delete sig[it1][it2][it3];                              \
               }                                                         \
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Component.h	(revision 113)
@@ -72,4 +72,5 @@
     public : Entity    * _entity   ;
     public : Tinstance_t _instance ;
+    public : std::string _architecture;
     } Tcomponent_t;    
   
@@ -102,4 +103,5 @@
 #endif
 						       ,Tinstance_t instance=INSTANCE_ALL 
+                                                       ,std::string architecture=""
 						       );
 
@@ -116,5 +118,7 @@
 
   private   : Signal *              signal_internal   (Entity * entity_productor,
-						       Signal * signal_productor);
+						       Signal * signal_productor,
+                                                       Entity * entity_consumer,
+						       Signal * signal_consumer);
 
   public    : void                  port_map          (std::string component_src ,
@@ -125,4 +129,10 @@
   public    : bool                  test_map          (bool recursive=true);
   private   : bool                  test_map          (uint32_t depth, bool recursive);
+
+  public    : void *                get_sc_signal     (std::string component,
+						       std::string port     );
+//   public    : void                  set_sc_signal     (std::string component,
+// 						       std::string port     ,
+//                                                        void *      sc_signal);
 
 //   public    : bool                  test_equi         (bool recursive=true);
@@ -141,4 +151,31 @@
   public    : friend std::ostream&  operator<<        (std::ostream& output_stream,
 						       morpheo::behavioural::Component & x);
+
+
+#undef  FUNCTION
+#define FUNCTION "Component::set_sc_signal"
+  public    : template <typename T>
+  void set_sc_signal (std::string component,
+                      std::string port     ,
+                      void *      sc_signal)
+    {
+      log_begin(Behavioural,FUNCTION);
+      
+      std::string name_entity = _entity->get_name();
+      
+      Entity * entity = find_entity(component);
+      
+      if (entity == NULL)
+        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" is unknow.\n"));
+      
+      Signal * signal = entity->find_signal (port);
+      
+      if (signal == NULL)
+        throw (ERRORMORPHEO (FUNCTION,"In component \""+name_entity+"\", the component \""+component+"\" have not the signal \""+port+"\".\n"));
+      
+      signal->alloc<T>(sc_signal);
+      
+      log_end(Behavioural,FUNCTION);
+    };
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Entity.h	(revision 113)
@@ -58,4 +58,5 @@
   public    : std::string           get_name          (void);
   public    : std::string           get_type          (void);
+  public    : Tusage_t              get_usage         (void);
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Interface.h	(revision 113)
@@ -91,9 +91,12 @@
 
 #ifdef SYSTEMC
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_clk"
   public    : sc_in_clk *           set_signal_clk       (std::string     name     ,
 							  uint32_t        size     ,
 							  presence_port_t presence_port=CLOCK_VHDL_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_clk","Begin");
+      log_begin(Behavioural,FUNCTION);
 
       if ((presence_port != CLOCK_VHDL_YES) and
@@ -101,8 +104,10 @@
 	throw ErrorMorpheo ("Signal \""+name+"\" is a clock, bad presence_port.");
 
+      LowerCase(name);
+
       Signal    * sig  = set_signal (name, IN , size, presence_port);
       sc_in_clk * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_in_clk (sig->_name.c_str());
@@ -114,9 +119,11 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_clk","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_in"
   public    : template <typename T>
               sc_in <T> *           set_signal_in       (std::string     name     ,
@@ -124,5 +131,5 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_in","Begin");
+      log_begin(Behavioural,FUNCTION);
 
       if ((presence_port == CLOCK_VHDL_YES) or 
@@ -130,8 +137,10 @@
 	throw ErrorMorpheo ("Signal \""+name+"\" is not a clock, bad presence_port.");
 
+      LowerCase(name);
+
       Signal    * sig  = set_signal (name, IN , size, presence_port);
       sc_in <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_in <T> (sig->_name.c_str());
@@ -143,9 +152,11 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_in","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_out"
   public    : template <typename T>
               sc_out <T> *          set_signal_out      (std::string     name     ,
@@ -153,5 +164,7 @@
 							 presence_port_t presence_port=PORT_VHDL_YES_TESTBENCH_YES)
     {
-      log_printf(FUNC,Behavioural,"set_signal_out","Begin");
+      log_begin(Behavioural,FUNCTION);
+
+      LowerCase(name);
 
       if ((presence_port == CLOCK_VHDL_YES) or 
@@ -162,5 +175,5 @@
       sc_out <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_out <T> (sig->_name.c_str());
@@ -172,19 +185,23 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_out","End");
-
-      return port;
-    };
-
+      log_end(Behavioural,FUNCTION);
+
+      return port;
+    };
+
+#undef  FUNCTION
+#define FUNCTION "Interface::set_signal_internal"
   public    : template <typename T>
               sc_signal <T> *       set_signal_internal (std::string   name,
 							 uint32_t size)
     {
-      log_printf(FUNC,Behavioural,"set_signal_internal","Begin");
+      log_begin(Behavioural,FUNCTION);
+
+      LowerCase(name);
 
       Signal * sig = set_signal (name, INTERNAL , size, PORT_VHDL_NO_TESTBENCH_NO);
       sc_signal <T> * port;
 
-      if (_usage & USE_SYSTEMC)
+      if (_usage & USE_SYSTEMC_INTERFACE)
 	{
 	  port = new sc_signal <T> (sig->_name.c_str());
@@ -196,5 +213,5 @@
 	}
 
-      log_printf(FUNC,Behavioural,"set_signal_internal","End");
+      log_end(Behavioural,FUNCTION);
 
       return port;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Model.h	(revision 113)
@@ -40,7 +40,18 @@
   public  : model_type_t      get_type  (std::string component);
   public  : debug_verbosity_t get_debug (std::string component);
+  public  : void              print     (void);
   };
   
 }; // end namespace behavioural          
+
+  template<> inline std::string toString<morpheo::behavioural::model_type_t>(const morpheo::behavioural::model_type_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::MODEL_SYSTEMC : return "systemc" ; break;
+      case morpheo::behavioural::MODEL_VHDL    : return "vhdl"    ; break;
+      default : return ""; break;
+      }
+  };
 
   template<> inline morpheo::behavioural::model_type_t fromString<morpheo::behavioural::model_type_t>(const std::string& x)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Parameters.h	(revision 113)
@@ -33,4 +33,6 @@
   class Parameters
   {
+  public   :        const std::string _type;
+
     // -----[ fields ]----------------------------------------------------
   public   : static const uint32_t   _size_instruction              = 32;
@@ -127,4 +129,5 @@
     // -----[ methods ]---------------------------------------------------
   public   :                            Parameters (void);
+  public   :                            Parameters (std::string type);
   public   : virtual                   ~Parameters ();
 	
@@ -132,4 +135,5 @@
   public   : virtual std::string        print       (uint32_t depth) = 0;
   public   : virtual Parameters_test    msg_error   (void) = 0;
+  public   : virtual std::string        id          (void) const {return "";}
 
     // methods to copy depends parameters
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Signal.h	(revision 113)
@@ -5,5 +5,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -90,4 +90,6 @@
   public    : type_info_t       get_type_info           (void);
 
+  public    : void *            get_sc_signal           (void);
+
   public    : bool              presence_vhdl           (void);
   public    : bool              presence_testbench      (void);
@@ -174,5 +176,5 @@
       else
 	_type_info = UNKNOW;
-
+      
       log_printf(TRACE,Behavioural,FUNCTION, "Allocation of %s (%s, 0x%.8x)", _name.c_str(),toString(_type_info).c_str(), static_cast<uint32_t>(reinterpret_cast<uint64_t>(_sc_signal_map)));
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Usage.h	(revision 113)
@@ -2,4 +2,5 @@
 #define morpheo_behavioural_Usage_h
 
+#include "Common/include/Environment.h"
 #include <stdint.h>
 
@@ -7,25 +8,29 @@
 namespace behavioural {
 
-  typedef uint8_t Tusage_t;
+  typedef uint16_t Tusage_t;
 
-#  define USE_SYSTEMC               0x01
-#  define USE_VHDL                  0x02
-#  define USE_VHDL_TESTBENCH        0x04
-#  define USE_VHDL_TESTBENCH_ASSERT 0x08
-#  define USE_POSITION              0x10
-#  define USE_STATISTICS            0x20
-#  define USE_INFORMATION           0x40
-#  define USE_HEADER                0x80
-//#define USE_                      0x80
+#  define USE_SYSTEMC               0x003
+#  define USE_SYSTEMC_INTERFACE     0x001
+#  define USE_SYSTEMC_BODY          0x002
+#  define USE_VHDL                  0x004
+#  define USE_VHDL_TESTBENCH        0x008
+#  define USE_VHDL_TESTBENCH_ASSERT 0x010
+#  define USE_POSITION              0x020
+#  define USE_STATISTICS            0x040
+//#define USE_INFORMATION           0x080
+#  define USE_HEADER                0x100
+#  define USE_COSIMULATION          0x200
+//#define USE_                      0x400
 
 #  define USE_NONE                  0x00
-//#define USE_ALL                   0xff
 #  define USE_ALL                   usage_all()
 
-
+#ifdef MODELSIM_COSIMULATION
+  Tusage_t usage_cosimulation(Tusage_t usage);
+#endif
   Tusage_t usage_set         (Tusage_t usage, Tusage_t flag);
   Tusage_t usage_unset       (Tusage_t usage, Tusage_t flag);
   bool     usage_is_set      (Tusage_t usage, Tusage_t flag);
-  void     usage_environment (Tusage_t usage);
+  Tusage_t usage_environment (Tusage_t usage);
   Tusage_t usage_all         (void);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Version.h	(revision 113)
@@ -10,9 +10,9 @@
 #define MORPHEO_MAJOR_VERSION "0"
 #define MORPHEO_MINOR_VERSION "2"
-#define MORPHEO_REVISION      "112"
+#define MORPHEO_REVISION      "113"
 #define MORPHEO_CODENAME      "Castor"
 
-#define MORPHEO_DATE_DAY      "18"  
-#define MORPHEO_DATE_MONTH    "03"
+#define MORPHEO_DATE_DAY      "14"  
+#define MORPHEO_DATE_MONTH    "04"
 #define MORPHEO_DATE_YEAR     "2009" 
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h	(revision 112)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Vhdl.h	(revision 113)
@@ -7,5 +7,5 @@
  * $Id$
  *
- * [ Description ]
+ * [ Description ]
  * 
  */
@@ -14,4 +14,5 @@
 #include <iostream>
 #include <list>
+#include <map>
 #include "Common/include/Environment.h"
 #include "Behavioural/include/Direction.h"
@@ -23,4 +24,14 @@
   namespace behavioural          {
 
+#define VHDL_EXTENSION ".vhdl"
+
+    typedef enum 
+      {
+        VHDL_SEVERITY_NOTE   ,
+        VHDL_SEVERITY_WARNING,
+        VHDL_SEVERITY_ERROR  ,
+        VHDL_SEVERITY_FAILURE
+      } vhdl_severity_t;
+    
     std::string  std_logic        (uint32_t size);
     std::string  std_logic_conv   (uint32_t size, std::string   value);
@@ -37,16 +48,29 @@
     class Vhdl
     {
-      // -----[ fields ]----------------------------------------------------
-    private   : const std::string     _name                         ;
-
-    private   : std::list<std::string>     _list_library_work            ;
-    private   : std::list<std::string>     _list_signal                  ;
-    private   : std::list<std::string>     _list_type                    ;
-    private   : std::list<std::string>     _list_alias                   ;
-    private   : std::list<std::string>     _list_port                    ;
-    private   : std::list<std::string>     _list_body                    ;
-
-      // -----[ methods ]---------------------------------------------------
-    public    :                  Vhdl                        (std::string name);
+      typedef struct
+      {
+        std::list<std::string> _list_signal;
+        std::list<std::string> _list_type  ;
+        std::list<std::string> _list_alias ;
+        std::list<std::string> _list_body  ;
+        std::list<std::string> _list_debug ;
+      } vhdl_architecture_t;
+
+      // -----[ fields ]----------------------------------------------------
+    private   : const std::string                         _name;
+    private   : const std::string                         _id;
+
+    private   : std::list<std::string>                    _list_library;
+      // Entity
+//  private   : std::string                               _port_clock;
+    private   : std::list<std::string>                    _list_port;
+      // Architecture
+    public    : const std::string                         _name_architecture_default;
+    private   :       std::string                         _name_architecture;
+    private   : std::map<std::string,vhdl_architecture_t> _architecture;
+
+      // -----[ methods ]---------------------------------------------------
+    public    :                  Vhdl                        (std::string name,
+                                                              std::string id="");
     public    :                  ~Vhdl                       ();
 
@@ -64,13 +88,17 @@
     private   : std::string      get_model                   (uint32_t    depth                 ,
                                                               std::string filename              ,
-                                                              std::string entity_name           ,
-                                                              std::string architecture_name     );
+                                                              std::string entity_name           );
     private   : std::string      get_header                  (uint32_t    depth                 ,
                                                               std::string filename              );
     private   : std::string      get_entity                  (uint32_t    depth                 ,
                                                               std::string name                  );
+    private   : void             test_architecture           (void);
+    private   : std::string      test_architecture           (std::string name                  );
+    public    : std::string      set_architecture            (std::string name                  );
     private   : std::string      get_architecture            (uint32_t    depth                 , 
-                                                              std::string name                  ,
                                                               std::string entity_name           );
+    private   : std::string      get_configuration           (uint32_t    depth                 ,
+                                                              std::string entity_name           ,
+                                                              std::string configuration_name    );
     private   : std::string      get_component               (uint32_t    depth                 ,
                                                               std::string name                  );
@@ -83,4 +111,5 @@
 							      direction_t direction             ,
 							      uint32_t    size                  );
+//  public    : void             set_port_clock              (std::string name                  );
     private   : std::string      get_signal                  (uint32_t    depth                 );
     public    : void             set_signal                  (std::string name                  ,
@@ -136,4 +165,6 @@
     public    : void             set_body_component          (std::string  name_instance        ,
                                                               std::string  name_component       ,
+                                                              std::string  name_architecture    ,
+                                                              std::string  name_package         ,
                                                               std::list<std::string>   list_port_map);
     public    : void             set_body_component_port_map (std::list<std::string> & list_port_map,
@@ -147,6 +178,15 @@
                                                               std::string  text                 );
 
-    private   : std::string      get_library_ieee            (uint32_t     depth                );
-    private   : std::string      get_library_work            (uint32_t     depth                );
+    public    : void             set_debug                   (std::string  condition            ,
+                                                              std::string  text                 ,
+                                                              vhdl_severity_t severity = VHDL_SEVERITY_NOTE);
+    private   : std::string      get_debug                   (uint32_t     depth                );
+
+    private   : std::string      get_library                 (uint32_t     depth                );
+    private   : std::string      get_library_default         (uint32_t     depth                );
+    private   : void             set_library_default         (void                              );
+    public    : void             set_library                 (std::string  library_name         ,
+                                                              std::string  package_name         ,
+                                                              std::string  declarative_unit="all");
     public    : void             set_library_work            (std::string  package_name         );
 
@@ -154,5 +194,20 @@
     };
 
+    std::string vhdl_get_id (std::string model_name);
+
   }; // end namespace behavioural          
+
+  template<> inline std::string toString<morpheo::behavioural::vhdl_severity_t>(const morpheo::behavioural::vhdl_severity_t& x)
+  {
+    switch (x)
+      {
+      case morpheo::behavioural::VHDL_SEVERITY_NOTE    : return "note"   ; break;
+      case morpheo::behavioural::VHDL_SEVERITY_WARNING : return "warning"; break;
+      case morpheo::behavioural::VHDL_SEVERITY_ERROR   : return "error"  ; break;
+      case morpheo::behavioural::VHDL_SEVERITY_FAILURE : return "failure"; break;
+      default : return ""; break;
+      }
+  };
+
 }; // end namespace morpheo              
 
