Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h	(revision 137)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Constants.h	(revision 142)
@@ -704,4 +704,6 @@
   //--------------------------------------------------[ instruction ]-----
 #  define NB_INSTRUCTION                           213        // 92 ORBIS, 30 ORFPX (15 simple, 15 double), 91 ORVDX (38 on byte, 41 on half, 12 independant format)
+#  define SIZE_INSTRUCTION                         8
+#  define MAX_INSTRUCTION                          (1<<SIZE_TYPE)
 
   enum 
@@ -1363,4 +1365,226 @@
   };
 
+  inline std::string toString_operation(const morpheo::behavioural::type_t& type, const uint32_t& operation)
+  {
+    switch (type)
+      {
+      case morpheo::behavioural::TYPE_ALU     :
+        {
+          switch (operation)
+            {
+            case OPERATION_ALU_L_ADD              : return "L_ADD";
+            case OPERATION_ALU_L_ADDC             : return "L_ADDC";
+            case OPERATION_ALU_L_SUB              : return "L_SUB";
+            case OPERATION_ALU_L_AND              : return "L_AND";
+            case OPERATION_ALU_L_OR               : return "L_OR";
+            case OPERATION_ALU_L_XOR              : return "L_XOR";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_SHIFT   :
+        {
+          switch (operation)
+            {
+            case OPERATION_SHIFT_L_SLL            : return "L_SLL";
+            case OPERATION_SHIFT_L_SRA            : return "L_SRA";
+            case OPERATION_SHIFT_L_SRL            : return "L_SRL";
+            case OPERATION_SHIFT_L_ROR            : return "L_ROR";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_MOVE    :
+        {
+          switch (operation)
+            {
+            case OPERATION_MOVE_L_MOVHI           : return "L_MOVHI";
+            case OPERATION_MOVE_L_CMOV            : return "L_CMOV";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_TEST    :
+        {
+          switch (operation)
+            {
+            case OPERATION_TEST_L_SFGES           : return "L_SFGES";
+            case OPERATION_TEST_L_SFGEU           : return "L_SFGEU";
+            case OPERATION_TEST_L_SFGTS           : return "L_SFGTS";
+            case OPERATION_TEST_L_SFGTU           : return "L_SFGTU";
+            case OPERATION_TEST_L_SFLES           : return "L_SFLES";
+            case OPERATION_TEST_L_SFLEU           : return "L_SFLEU";
+            case OPERATION_TEST_L_SFLTS           : return "L_SFLTS";
+            case OPERATION_TEST_L_SFLTU           : return "L_SFLTU";
+            case OPERATION_TEST_L_SFEQ            : return "L_SFEQ";
+            case OPERATION_TEST_L_SFNE            : return "L_SFNE";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_MUL     :
+        {
+          switch (operation)
+            {
+            case OPERATION_MUL_L_MUL              : return "L_MUL";
+            case OPERATION_MUL_L_MULU             : return "L_MULU";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_DIV     :
+        {
+          switch (operation)
+            {
+            case OPERATION_DIV_L_DIV              : return "L_DIV";
+            case OPERATION_DIV_L_DIVU             : return "L_DIVU";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_EXTEND  :
+        {
+          switch (operation)
+            {
+            case OPERATION_EXTEND_L_EXTEND_Z      : return "L_EXTEND_Z";
+            case OPERATION_EXTEND_L_EXTEND_S      : return "L_EXTEND_S";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_FIND    :
+        {
+          switch (operation)
+            {
+            case OPERATION_FIND_L_FF1             : return "L_FF1";
+            case OPERATION_FIND_L_FL1             : return "L_FL1";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_SPECIAL :
+        {
+          switch (operation)
+            {
+            default :
+              {
+            case OPERATION_SPECIAL_L_NOP          : return "L_NOP";
+            case OPERATION_SPECIAL_L_MFSPR        : return "L_MFSPR";
+            case OPERATION_SPECIAL_L_MTSPR        : return "L_MTSPR";
+            case OPERATION_SPECIAL_L_RFE          : return "L_RFE";
+            case OPERATION_SPECIAL_L_MAC          : return "L_MAC";
+            case OPERATION_SPECIAL_L_MACRC        : return "L_MACRC";
+            case OPERATION_SPECIAL_L_MSB          : return "L_MSB";
+            case OPERATION_SPECIAL_L_SYS          : return "L_SYS";
+            case OPERATION_SPECIAL_L_TRAP         : return "L_TRAP";
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_CUSTOM  :
+        {
+          switch (operation)
+            {
+            case OPERATION_CUSTOM_L_1             : return "L_1";
+            case OPERATION_CUSTOM_L_2             : return "L_2";
+            case OPERATION_CUSTOM_L_3             : return "L_3";
+            case OPERATION_CUSTOM_L_4             : return "L_4";
+            case OPERATION_CUSTOM_L_5             : return "L_5";
+            case OPERATION_CUSTOM_L_6             : return "L_6";
+            case OPERATION_CUSTOM_L_7             : return "L_7";
+            case OPERATION_CUSTOM_L_8             : return "L_8";
+            case OPERATION_CUSTOM_LF_1_D          : return "LF_1_D";
+            case OPERATION_CUSTOM_LF_1_S          : return "LF_1_S";
+            case OPERATION_CUSTOM_LV_1            : return "LV_1";
+            case OPERATION_CUSTOM_LV_2            : return "LV_2";
+            case OPERATION_CUSTOM_LV_3            : return "LV_3";
+            case OPERATION_CUSTOM_LV_4            : return "LV_4";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_BRANCH  :
+        {
+          switch (operation)
+            {
+            case OPERATION_BRANCH_NONE            : return "NONE";
+            case OPERATION_BRANCH_L_TEST_NF       : return "L_TEST_NF";
+            case OPERATION_BRANCH_L_TEST_F        : return "L_TEST_F";
+            case OPERATION_BRANCH_L_JALR          : return "L_JALR";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_MEMORY  :
+        {
+          switch (operation)
+            {
+            case OPERATION_MEMORY_LOAD_8_Z        : return "LOAD_8_Z";
+            case OPERATION_MEMORY_LOAD_16_Z       : return "LOAD_16_Z";
+            case OPERATION_MEMORY_LOAD_32_Z       : return "LOAD_32_Z";
+            case OPERATION_MEMORY_LOAD_64_Z       : return "LOAD_64_Z";
+            case OPERATION_MEMORY_LOAD_8_S        : return "LOAD_8_S";
+            case OPERATION_MEMORY_LOAD_16_S       : return "LOAD_16_S";
+            case OPERATION_MEMORY_LOAD_32_S       : return "LOAD_32_S";
+            case OPERATION_MEMORY_LOAD_64_S       : return "LOAD_64_S";
+            case OPERATION_MEMORY_STORE_8         : return "STORE_8";
+            case OPERATION_MEMORY_STORE_16        : return "STORE_16";
+            case OPERATION_MEMORY_STORE_32        : return "STORE_32";
+            case OPERATION_MEMORY_STORE_64        : return "STORE_64";
+            case OPERATION_MEMORY_STORE_HEAD_OK   : return "STORE_HEAD_OK";
+            case OPERATION_MEMORY_STORE_HEAD_KO   : return "STORE_HEAD_KO";
+            case OPERATION_MEMORY_LOCK            : return "LOCK";
+            case OPERATION_MEMORY_INVALIDATE      : return "INVALIDATE";
+            case OPERATION_MEMORY_PREFETCH        : return "PREFETCH";
+            case OPERATION_MEMORY_FLUSH           : return "FLUSH";
+            case OPERATION_MEMORY_SYNCHRONIZATION : return "SYNCHRONIZATION";
+            default :
+              {
+                break;
+              }
+            }
+          break;
+        }
+      case morpheo::behavioural::TYPE_INVALID :
+      default :
+        {
+          break;
+        }
+      }
+
+    return "";
+  };
+
 }; // end namespace morpheo              
 
