Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp	(revision 75)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_allocation.cpp	(revision 76)
@@ -153,48 +153,92 @@
        }
 
-     _function_execute = new function_execute_t * [MAX_OPERATION];
+     _function_execute = new function_execute_t ** [MAX_TYPE];
      
      // Initialisation
-     for (uint32_t i=0; i<MAX_OPERATION; i++)
-       _function_execute [i] = &(operation_unimplemented);
-
-     if (_param->_timing[OPERATION_ALU_L_ADD     ]._latence > 0) _function_execute[OPERATION_ALU_L_ADD     ] = &(operation_l_add     );
-     if (_param->_timing[OPERATION_ALU_L_ADDC    ]._latence > 0) _function_execute[OPERATION_ALU_L_ADDC    ] = &(operation_l_addc    );
-     if (_param->_timing[OPERATION_ALU_L_SUB     ]._latence > 0) _function_execute[OPERATION_ALU_L_SUB     ] = &(operation_l_sub     );
-//      if (_param->_timing[OPERATION_ALU_L_MUL     ]._latence > 0) _function_execute[OPERATION_ALU_L_MUL     ] = &(operation_l_mul     );
-//      if (_param->_timing[OPERATION_ALU_L_MULU    ]._latence > 0) _function_execute[OPERATION_ALU_L_MULU    ] = &(operation_l_mulu    );
-//      if (_param->_timing[OPERATION_ALU_L_DIV     ]._latence > 0) _function_execute[OPERATION_ALU_L_DIV     ] = &(operation_l_div     );
-//      if (_param->_timing[OPERATION_ALU_L_DIVU    ]._latence > 0) _function_execute[OPERATION_ALU_L_DIVU    ] = &(operation_l_divu    );
-     if (_param->_timing[OPERATION_ALU_L_AND     ]._latence > 0) _function_execute[OPERATION_ALU_L_AND     ] = &(operation_l_and     );
-     if (_param->_timing[OPERATION_ALU_L_OR      ]._latence > 0) _function_execute[OPERATION_ALU_L_OR      ] = &(operation_l_or      );
-     if (_param->_timing[OPERATION_ALU_L_XOR     ]._latence > 0) _function_execute[OPERATION_ALU_L_XOR     ] = &(operation_l_xor     );
-     if (_param->_timing[OPERATION_ALU_L_TEST_F  ]._latence > 0) _function_execute[OPERATION_ALU_L_TEST_F  ] = &(operation_l_test_f  );
-     if (_param->_timing[OPERATION_ALU_L_TEST_NF ]._latence > 0) _function_execute[OPERATION_ALU_L_TEST_NF ] = &(operation_l_test_nf );
-     if (_param->_timing[OPERATION_ALU_L_JALR    ]._latence > 0) _function_execute[OPERATION_ALU_L_JALR    ] = &(operation_l_jalr    );
-     if (_param->_timing[OPERATION_ALU_L_SLL     ]._latence > 0) _function_execute[OPERATION_ALU_L_SLL     ] = &(operation_l_sll     );
-     if (_param->_timing[OPERATION_ALU_L_SRA     ]._latence > 0) _function_execute[OPERATION_ALU_L_SRA     ] = &(operation_l_sra     );
-     if (_param->_timing[OPERATION_ALU_L_SRL     ]._latence > 0) _function_execute[OPERATION_ALU_L_SRL     ] = &(operation_l_srl     );
-     if (_param->_timing[OPERATION_ALU_L_ROR     ]._latence > 0) _function_execute[OPERATION_ALU_L_ROR     ] = &(operation_l_ror     );
-     if (_param->_timing[OPERATION_ALU_L_MOVHI   ]._latence > 0) _function_execute[OPERATION_ALU_L_MOVHI   ] = &(operation_l_movhi   );
-     if (_param->_timing[OPERATION_ALU_L_EXTEND_S]._latence > 0) _function_execute[OPERATION_ALU_L_EXTEND_S] = &(operation_l_extend_s);
-     if (_param->_timing[OPERATION_ALU_L_EXTEND_Z]._latence > 0) _function_execute[OPERATION_ALU_L_EXTEND_Z] = &(operation_l_extend_z);
-     if (_param->_timing[OPERATION_ALU_L_CMOV    ]._latence > 0) _function_execute[OPERATION_ALU_L_CMOV    ] = &(operation_l_cmov    ); 
-     if (_param->_timing[OPERATION_ALU_L_FF1     ]._latence > 0) _function_execute[OPERATION_ALU_L_FF1     ] = &(operation_l_ff1     ); 
-     if (_param->_timing[OPERATION_ALU_L_FL1     ]._latence > 0) _function_execute[OPERATION_ALU_L_FL1     ] = &(operation_l_fl1     ); 
-     if (_param->_timing[OPERATION_ALU_L_MFSPR   ]._latence > 0) _function_execute[OPERATION_ALU_L_MFSPR   ] = &(operation_l_mfspr   ); 
-     if (_param->_timing[OPERATION_ALU_L_MTSPR   ]._latence > 0) _function_execute[OPERATION_ALU_L_MTSPR   ] = &(operation_l_mtspr   ); 
-     if (_param->_timing[OPERATION_ALU_L_SFEQ    ]._latence > 0) _function_execute[OPERATION_ALU_L_SFEQ    ] = &(operation_l_sfeq    );
-     if (_param->_timing[OPERATION_ALU_L_SFNE    ]._latence > 0) _function_execute[OPERATION_ALU_L_SFNE    ] = &(operation_l_sfne    );
-     if (_param->_timing[OPERATION_ALU_L_SFGEU   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFGEU   ] = &(operation_l_sfgeu   );
-     if (_param->_timing[OPERATION_ALU_L_SFGTU   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFGTU   ] = &(operation_l_sfgtu   );
-     if (_param->_timing[OPERATION_ALU_L_SFLEU   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFLEU   ] = &(operation_l_sfleu   );
-     if (_param->_timing[OPERATION_ALU_L_SFLTU   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFLTU   ] = &(operation_l_sfltu   );
-     if (_param->_timing[OPERATION_ALU_L_SFGES   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFGES   ] = &(operation_l_sfges   );
-     if (_param->_timing[OPERATION_ALU_L_SFGTS   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFGTS   ] = &(operation_l_sfgts   );
-     if (_param->_timing[OPERATION_ALU_L_SFLES   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFLES   ] = &(operation_l_sfles   );
-     if (_param->_timing[OPERATION_ALU_L_SFLTS   ]._latence > 0) _function_execute[OPERATION_ALU_L_SFLTS   ] = &(operation_l_sflts   );
-     if (_param->_timing[OPERATION_ALU_L_MAC     ]._latence > 0) _function_execute[OPERATION_ALU_L_MAC     ] = &(operation_l_mac     ); 
-     if (_param->_timing[OPERATION_ALU_L_MACRC   ]._latence > 0) _function_execute[OPERATION_ALU_L_MACRC   ] = &(operation_l_macrc   ); 
-     if (_param->_timing[OPERATION_ALU_L_MSB     ]._latence > 0) _function_execute[OPERATION_ALU_L_MSB     ] = &(operation_l_msb     ); 
+     for (uint32_t i=0; i<MAX_TYPE; i++)
+       {
+	 _function_execute [i] = new function_execute_t * [MAX_OPERATION];
+	 
+	 for (uint32_t j=0; j<MAX_OPERATION; j++)
+	   _function_execute [i][j] = &(operation_unimplemented);
+       }
+
+     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_ADD         ]._latence > 0)
+       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_ADD         ] = &(operation_l_add     );
+     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_ADDC        ]._latence > 0) 
+       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_ADDC        ] = &(operation_l_addc    );
+//   if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_SUB         ]._latence > 0) 
+//     _function_execute[TYPE_ALU    ][OPERATION_ALU_L_SUB         ] = &(operation_l_sub     );
+     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_AND         ]._latence > 0) 
+       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_AND         ] = &(operation_l_and     );
+     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_OR          ]._latence > 0) 
+       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_OR          ] = &(operation_l_or      );
+     if (_param->_timing[TYPE_ALU    ][OPERATION_ALU_L_XOR         ]._latence > 0) 
+       _function_execute[TYPE_ALU    ][OPERATION_ALU_L_XOR         ] = &(operation_l_xor     );
+     if (_param->_timing[TYPE_SHIFT  ][OPERATION_SHIFT_L_SLL       ]._latence > 0) 
+       _function_execute[TYPE_SHIFT  ][OPERATION_SHIFT_L_SLL       ] = &(operation_l_sll     );
+     if (_param->_timing[TYPE_SHIFT  ][OPERATION_SHIFT_L_SRA       ]._latence > 0) 
+       _function_execute[TYPE_SHIFT  ][OPERATION_SHIFT_L_SRA       ] = &(operation_l_sra     );
+     if (_param->_timing[TYPE_SHIFT  ][OPERATION_SHIFT_L_SRL       ]._latence > 0) 
+       _function_execute[TYPE_SHIFT  ][OPERATION_SHIFT_L_SRL       ] = &(operation_l_srl     );
+     if (_param->_timing[TYPE_SHIFT  ][OPERATION_SHIFT_L_ROR       ]._latence > 0) 
+       _function_execute[TYPE_SHIFT  ][OPERATION_SHIFT_L_ROR       ] = &(operation_l_ror     );
+     if (_param->_timing[TYPE_MOVE   ][OPERATION_MOVE_L_MOVHI      ]._latence > 0) 
+       _function_execute[TYPE_MOVE   ][OPERATION_MOVE_L_MOVHI      ] = &(operation_l_movhi   );
+     if (_param->_timing[TYPE_MOVE   ][OPERATION_MOVE_L_CMOV       ]._latence > 0) 
+       _function_execute[TYPE_MOVE   ][OPERATION_MOVE_L_CMOV       ] = &(operation_l_cmov    ); 
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFGEU      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFGEU      ] = &(operation_l_sfgeu   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFGTU      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFGTU      ] = &(operation_l_sfgtu   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFLEU      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFLEU      ] = &(operation_l_sfleu   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFLTU      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFLTU      ] = &(operation_l_sfltu   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFGES      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFGES      ] = &(operation_l_sfges   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFGTS      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFGTS      ] = &(operation_l_sfgts   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFLES      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFLES      ] = &(operation_l_sfles   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFLTS      ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFLTS      ] = &(operation_l_sflts   );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFEQ       ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFEQ       ] = &(operation_l_sfeq    );
+     if (_param->_timing[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ]._latence > 0) 
+       _function_execute[TYPE_TEST   ][OPERATION_TEST_L_SFNE       ] = &(operation_l_sfne    );
+//   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MUL     ]._latence > 0) 
+//     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MUL     ] = &(operation_l_mul     );
+//   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MULU    ]._latence > 0) 
+//     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_MULU    ] = &(operation_l_mulu    );
+//   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIV     ]._latence > 0) 
+//     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIV     ] = &(operation_l_div     );
+//   if (_param->_timing[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIVU    ]._latence > 0) 
+//     _function_execute[TYPE_MUL_DIV][OPERATION_MUL_DIV_L_DIVU    ] = &(operation_l_divu    );
+     if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ]._latence > 0) 
+       _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_S ] = &(operation_l_extend_s);
+     if (_param->_timing[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_Z ]._latence > 0) 
+       _function_execute[TYPE_EXTEND ][OPERATION_EXTEND_L_EXTEND_Z ] = &(operation_l_extend_z);
+     if (_param->_timing[TYPE_FIND   ][OPERATION_FIND_L_FF1        ]._latence > 0) 
+       _function_execute[TYPE_FIND   ][OPERATION_FIND_L_FF1        ] = &(operation_l_ff1     ); 
+     if (_param->_timing[TYPE_FIND   ][OPERATION_FIND_L_FL1        ]._latence > 0) 
+       _function_execute[TYPE_FIND   ][OPERATION_FIND_L_FL1        ] = &(operation_l_fl1     ); 
+     if (_param->_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MFSPR   ]._latence > 0) 
+       _function_execute[TYPE_SPECIAL][OPERATION_SPECIAL_L_MFSPR   ] = &(operation_l_mfspr   ); 
+     if (_param->_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MTSPR   ]._latence > 0) 
+       _function_execute[TYPE_SPECIAL][OPERATION_SPECIAL_L_MTSPR   ] = &(operation_l_mtspr   ); 
+     if (_param->_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC     ]._latence > 0) 
+       _function_execute[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC     ] = &(operation_l_mac     ); 
+     if (_param->_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC   ]._latence > 0) 
+       _function_execute[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC   ] = &(operation_l_macrc   ); 
+     if (_param->_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB     ]._latence > 0) 
+       _function_execute[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB     ] = &(operation_l_msb     ); 
+     if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_TEST_F   ]._latence > 0) 
+       _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_TEST_F   ] = &(operation_l_test_f  );
+     if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_TEST_NF  ]._latence > 0) 
+       _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_TEST_NF  ] = &(operation_l_test_nf );
+     if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ]._latence > 0) 
+       _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ] = &(operation_l_jalr    );
+
 
 
