Index: trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h	(revision 53)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/BitManipulation.h	(revision 63)
@@ -15,6 +15,6 @@
 namespace morpheo              {
 
-  // gen_mask .....................................
-
+  // gen_mask ..................................................................
+  
   template <typename T>
   T gen_mask       (uint32_t size) 
@@ -29,5 +29,18 @@
   };
 
-  // shift_left_logic, shift_right_logic ..........
+  // mask, mask_not ............................................................
+  template <typename T>
+  T mask           (uint32_t data, uint32_t index_max, uint32_t index_min)  
+  {
+    return     (gen_mask<T>(index_max-index_min+1)<<index_min) & data;
+  }
+
+  template <typename T>
+  T mask_not       (uint32_t data, uint32_t index_max, uint32_t index_min)  
+  {
+    return (~(gen_mask<T>(index_max-index_min+1)<<index_min)) & data;
+  }
+
+  // shift_left_logic, shift_right_logic .......................................
   template <typename T>
   T shift_logic_left (uint32_t size, uint32_t data, uint32_t value)  
@@ -46,5 +59,5 @@
   }
 
-  // shift_logic ..................................
+  // shift_logic ...............................................................
   template <typename T>
   T shift_logic      (uint32_t size, uint32_t data, uint32_t value, bool is_direction_left)
@@ -56,5 +69,5 @@
   }
 
-  // shift_left_arithmetic, shift_right_arithmetic 
+  // shift_left_arithmetic, shift_right_arithmetic .............................
   template <typename T>
   T shift_arithmetic_left (uint32_t size, uint32_t data, uint32_t value)  
@@ -92,5 +105,5 @@
   }
 
-  // shift_arithmetic .............................
+  // shift_arithmetic ..........................................................
   template <typename T>
   T shift_arithmetic      (uint32_t size, uint32_t data, uint32_t value, bool is_direction_left)
@@ -102,5 +115,5 @@
   }
 
-  // shift ........................................
+  // shift .....................................................................
   template <typename T>
   T shift            (uint32_t size, uint32_t data, uint32_t value, bool is_direction_left, bool is_shift_arithmetic)
@@ -112,5 +125,5 @@
   }
 
-  // rotate_left, rotate_right ....................
+  // rotate_left, rotate_right .................................................
 
   template <typename T>
@@ -132,5 +145,5 @@
   }
 
-  // rotate .......................................
+  // rotate ....................................................................
   template <typename T>
   T rotate         (uint32_t size, uint32_t data, uint32_t value, bool is_direction_left)  
@@ -142,18 +155,16 @@
   }
 
-  // range ........................................
+  // range .....................................................................
   template <typename T>
-  T range          (uint32_t size, uint32_t data, uint32_t index_max, uint32_t index_min)  
+  T range          (uint32_t data, uint32_t index_max, uint32_t index_min)  
   {
-    return gen_mask<T>(index_max-index_min+1) & shift_logic_left<T> (size, data, index_min);
+    return gen_mask<T>(index_max-index_min+1) & (data << index_min);
   }
 
   template <typename T>
-  T range          (uint32_t size, uint32_t data, uint32_t nb_bits)  
+  T range          (uint32_t data, uint32_t nb_bits)  
   {
     return gen_mask<T>(nb_bits) & data;
   }
-
-
 }; // end namespace morpheo              
 
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/ChangeCase.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/ChangeCase.h	(revision 53)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/ChangeCase.h	(revision 63)
@@ -16,5 +16,5 @@
 namespace morpheo              {
   
-  void UpperCase(string& S)
+  inline void UpperCase(string& S)
   {
     uint32_t n = S.size();
@@ -27,5 +27,5 @@
   }
   
-  void LowerCase(string& S)
+  inline void LowerCase(string& S)
   {
     uint32_t n = S.size();
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 53)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Debug.h	(revision 63)
@@ -28,9 +28,9 @@
 #ifdef DEBUG
 //Debug
-
 #  define log_printf(level, component, func, str... )                   \
 do                                                                      \
 {                                                                       \
-    if ( (DEBUG == DEBUG_ALL) or                                        \
+    if ( (DEBUG == DEBUG_ALL ) or                                       \
+         (DEBUG_ ## level == DEBUG_NONE) or                             \
          (( DEBUG_ ## level     <= DEBUG) and                           \
           ( DEBUG_ ## component == true )) )                            \
Index: trunk/IPs/systemC/processor/Morpheo/Common/include/Log2.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Common/include/Log2.h	(revision 63)
+++ trunk/IPs/systemC/processor/Morpheo/Common/include/Log2.h	(revision 63)
@@ -0,0 +1,24 @@
+#ifndef morpheo_Log2
+#define morpheo_Log2
+
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include <stdint.h>
+#include <math.h>
+using namespace std;
+
+namespace morpheo              {
+
+  inline uint32_t log2 (uint32_t value)
+  {
+    return static_cast<uint32_t>(ceil(::log2(value)));
+  }
+
+}; // end namespace morpheo              
+
+#endif
