Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/ChangeCase.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/Include/ChangeCase.h	(revision 43)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/ChangeCase.h	(revision 43)
@@ -0,0 +1,42 @@
+#ifndef morpheo_changecase
+#define morpheo_changecase
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <string>
+#include <stdint.h>
+
+using namespace std;
+
+namespace morpheo              {
+  
+  void UpperCase(string& S)
+  {
+    uint32_t n = S.size();
+    for (uint32_t j = 0; j < n; j++)
+      {
+	char sj = S[j];
+	if (sj >= 'a' && sj <= 'z')
+	  S[j] = static_cast<char>(sj - ('a' - 'A'));
+      }
+  }
+  
+  void LowerCase(string& S)
+  {
+    uint32_t n = S.size();
+    for (uint32_t j = 0; j < n; j++)
+      {
+	char sj = S[j];
+	if (sj >= 'A' && sj <= 'Z')
+	  S[j] = static_cast<char>(sj + ('a' - 'A'));
+      }
+  }
+  
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/Debug.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/Debug.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/Debug.h	(revision 43)
@@ -9,4 +9,11 @@
 #include <string>
 using namespace std;
+
+// Debug's Level :
+//  * None    : print elementary information
+//  * Info    : print basic information
+//  * Trace   : trace internal variable
+//  * Func    : trace call and return function
+//  * All     : print all information
 
 enum _debug_verbosity 
@@ -21,40 +28,40 @@
 #ifdef DEBUG
 //Debug
-/*
-#  define log_printf(level, component, str... )                                       \
-do                                                                                    \
-{                                                                                     \
-    if ( ( DEBUG_ ## level     <= DEBUG) and                                          \
-         ( DEBUG_ ## component == true ) )                                            \
-      {                                                                               \
-        fprintf(stdout,"<%s> line %d : ",__FILE__,__LINE__);                          \
-        fprintf(stdout,str);                                                          \
-        fprintf(stdout,"\n");                                                         \
-      }                                                                               \
-} while(0)								            
-*/			
-					            
-#  define log_printf(level, component, func, str... )                                 \
-do                                                                                    \
-{                                                                                     \
-    if ( ( DEBUG_ ## level     <= DEBUG) and                                          \
-         ( DEBUG_ ## component == true ) )                                            \
-      {                                                                               \
-        fprintf(stdout,"In file %s, ",__FILE__);                                      \
-        fprintf(stdout,"at line %d, ",__LINE__);                                      \
-        fprintf(stdout,"in function \"%s\" : ",func);                                \
-        fprintf(stdout,str);                                                          \
-        fprintf(stdout,"\n");                                                         \
-      }                                                                               \
+
+#  define log_printf(level, component, func, str... )                   \
+do                                                                      \
+{                                                                       \
+    if ( (DEBUG == DEBUG_ALL) or                                        \
+         (( DEBUG_ ## level     <= DEBUG) and                           \
+          ( DEBUG_ ## component == true )) )                            \
+      {                                                                 \
+        if (DEBUG >= DEBUG_ALL )                                        \
+          {                                                             \
+            switch (DEBUG_ ## level)                                    \
+            {                                                           \
+	    case DEBUG_NONE  : fprintf(stdout,"(none       ) "); break; \
+	    case DEBUG_INFO  : fprintf(stdout,"(information) "); break; \
+	    case DEBUG_TRACE : fprintf(stdout,"(trace      ) "); break; \
+	    case DEBUG_FUNC  : fprintf(stdout,"(function   ) "); break; \
+	    case DEBUG_ALL   : fprintf(stdout,"(all        ) "); break; \
+	    default          : fprintf(stdout,"(undefine   ) "); break; \
+	    }                                                           \
+          }                                                             \
+        fprintf(stdout,"In file %s, ",__FILE__);                        \
+        fprintf(stdout,"at line %d, ",__LINE__);                        \
+        if (DEBUG >= DEBUG_FUNC)                                        \
+          {                                                             \
+            fprintf(stdout,"in function \"%s\" ",func);                 \
+          }                                                             \
+        fprintf(stdout,": ");                                           \
+        fprintf(stdout,str);                                            \
+        fprintf(stdout,"\n");                                           \
+        fflush (stdout);                                                \
+      }                                                                 \
 } while(0)
 
 #else
 // No debug
-/*
-#  define log_printf(level, component, str... )                                       \
-do                                                                                    \
-{                                                                                     \
-} while(0)									      
-*/									      
+
 #  define log_printf(level, component, func, str... )                                 \
 do                                                                                    \
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/ErrorMorpheo.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/ErrorMorpheo.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/ErrorMorpheo.h	(revision 43)
@@ -29,4 +29,16 @@
   };
 
+  class TestMorpheo : public exception 
+  {
+    // -----[ fields ]----------------------------------------------------
+  private : string _msg;
+    
+    // -----[ methods ]---------------------------------------------------
+  public  :             TestMorpheo   ()           throw() { _msg = "Test error ...";}
+  public  :             TestMorpheo   (string msg) throw() { _msg = msg;}
+  public  :             ~TestMorpheo  (void)       throw() {}
+  public  : const char* what          ()    const  throw() { return ( _msg.c_str() );}
+  };
+
 }; // end namespace morpheo              
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/FromString.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/Include/FromString.h	(revision 43)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/FromString.h	(revision 43)
@@ -0,0 +1,31 @@
+#ifndef morpheo_fromstring
+#define morpheo_fromstring
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+// #include <iosfwd>
+// #include <sstream>
+// #include <iomanip>
+#include <string>
+// #include <limits>
+
+namespace morpheo {
+  
+  template<typename T> inline T   fromString             (const std::string& x)
+  {
+    return static_cast<T>(x.c_str());
+  }
+  
+  template<>           inline int fromString<int>        (const std::string& x)
+  {
+    return atoi(x.c_str());
+  }
+  
+}; // end namespace morpheo              
+
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/Test.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/Test.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/Test.h	(revision 43)
@@ -5,4 +5,5 @@
 #include <sstream>
 #include <stdint.h>
+#include "Include/ErrorMorpheo.h"
 using namespace std;
 
@@ -14,13 +15,13 @@
 void test_ko (T exp1, T exp2, char * file, uint32_t line)
 {
-  cout << "{" << num_test << "} : Test KO" << endl
-       << " * Localisation"                << endl
-       << "   - File : " << file           << endl
-       << "   - Line : " << line           << endl
-       << " * Expression is different "    << endl
-       << "   - exp1 : " << exp1           << endl
-       << "   - exp2 : " << exp2           << endl;
-
-  exit (line);
+  string msg = ("<"+toString(num_test)+"> : Test KO\n" +
+		" * Localisation\n"                    +
+		"   - File : "+file+"\n"               +
+		"   - Line : "+toString(line)+"\n"     +
+		" * Expression is different\n"         +
+		"   - exp1 : "+toString(exp1)+"\n"     +
+		"   - exp2 : "+toString(exp2)+"\n");
+  
+  throw (ErrorMorpheo (msg));
 };
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/ToBase2.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/ToBase2.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/ToBase2.h	(revision 43)
@@ -14,9 +14,9 @@
 namespace morpheo              {
 
-  inline string toBase2 (uint32_t value, uint32_t size)
+  template<typename T> inline std::string toBase2 (const T& value, const uint32_t & size)
   {
     ostringstream res;
-    uint32_t      mask = 1<<(size-1);
-
+    T mask = 1<<(size-1);
+    
     while (mask != 0)
       {
@@ -27,5 +27,31 @@
     return res.str();
   }
-  
+
+  inline std::string toBase2 (const bool    & value)
+  {
+    return toBase2<bool   >  (value, 1);
+  }
+
+  inline std::string toBase2 (const uint8_t & value, const uint32_t & size)
+  {
+    return toBase2<uint8_t>  (value, size);
+  }
+
+  inline std::string toBase2 (const uint16_t& value, const uint32_t & size)
+  {
+    return toBase2<uint16_t> (value, size);
+  }
+
+  inline std::string toBase2 (const uint32_t& value, const uint32_t & size)
+  {
+    return toBase2<uint32_t> (value, size);
+  }
+
+  inline std::string toBase2 (const uint64_t& value, const uint32_t & size)
+  {
+    return toBase2<uint64_t> (value, size);
+  }
+
+
 }; // end namespace morpheo              
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/ToString.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/ToString.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/ToString.h	(revision 43)
@@ -1,4 +1,4 @@
-#ifndef morpheo_Tostring
-#define morpheo_Tostring
+#ifndef morpheo_tostring
+#define morpheo_tostring
 
 /*
@@ -21,5 +21,5 @@
 namespace morpheo              {
   
-  template<typename T> inline std::string toString(const T& x)
+  template<typename T> inline std::string toString             (const T& x)
   {
     ostringstream out;
@@ -28,5 +28,5 @@
   }
   
-  template<> inline std::string toString<bool>       (const bool& x)
+  template<>           inline std::string toString<bool>       (const bool& x)
   {
     ostringstream out;
@@ -36,5 +36,5 @@
   }
   
-  template<> inline std::string toString<float>      (const float& x)
+  template<>           inline std::string toString<float>      (const float& x)
   {
     const int sigdigits = std::numeric_limits<float>::digits10;
@@ -44,5 +44,5 @@
   }
   
-  template<> inline std::string toString<double>     (const double& x)
+  template<>           inline std::string toString<double>     (const double& x)
   {
     const int sigdigits = std::numeric_limits<double>::digits10;
@@ -52,5 +52,5 @@
   }
   
-  template<> inline std::string toString<long double>(const long double& x)
+  template<>           inline std::string toString<long double>(const long double& x)
   {
     const int sigdigits = std::numeric_limits<long double>::digits10;
Index: trunk/IPs/systemC/processor/Morpheo/Common/Include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Include/Types.h	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Common/Include/Types.h	(revision 43)
@@ -35,6 +35,6 @@
 #define SC_CLOCK                 sc_in_clk       
 #define SC_INTERNAL(type)        type
+#define SC_REGISTER(type)        sc_signal<type >
 #define SC_SIGNAL(type)          sc_signal<type >
-#define SC_REGISTER(type)        sc_signal<type >
 #define SC_IN(type)              sc_in    <type >
 #define SC_OUT(type)             sc_out   <type >
