Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/src/Operation.cpp	(revision 88)
@@ -8,14 +8,5 @@
 
 #include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/Operation/include/Operation.h"
-
-#define neg(data)                  (~(data)+1)
-#define sign(data)                 ((data)>>(param->_size_data-1))
-#define unsigned(data)             (data)
-#define signed(data)               ((sign(data)==0)?(data):neg(data))
-#define ovf(op1, op2, res)         ((sign(op1) == sign(op2))?(sign(op1) xor sign(res)):0)
-#define carry(op1, op2, res)       (((res)<(op1)) or ((res)<(op2)))
-#define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag)))
-#define get_flag(data,flag)	   (((data)&(flag))!=0)
-#define concatenation_bool(a,b)    (((a)<<1) | (b))
+#include "Behavioural/include/Operation.h"
 
 namespace morpheo                    {
@@ -43,11 +34,11 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_add");
 
-    Tgeneral_data_t gpr1      = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2      = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1      = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2      = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     
     Tgeneral_data_t gpr3      = param->_mask_data & (gpr1 + gpr2);
 
-    bool            overflow  = ovf  (gpr1,gpr2,gpr3);
-    bool            carry_out = carry(gpr1,gpr2,gpr3);
+    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
+    bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
 
     // Result
@@ -70,10 +61,10 @@
     Tgeneral_data_t carry_in   = get_flag(op->_data_rc,FLAG_CY);
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = param->_mask_data & (gpr1 + gpr2 + carry_in);
 
-    bool            overflow   = ovf  (gpr1,gpr2,gpr3);
-    bool            carry_out  = carry(gpr1,gpr2,gpr3);
+    bool            overflow   = ovf  (param->_size_data,gpr1,gpr2,gpr3);
+    bool            carry_out  = carry(param->_size_data,gpr1,gpr2,gpr3);
 
     // Result
@@ -94,10 +85,10 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sub");
 
-    Tgeneral_data_t gpr1      =     unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2      = neg(unsigned(op->_data_rb));
+    Tgeneral_data_t gpr1      =                       unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2      = neg(param->_size_data,unsigned(param->_size_data,op->_data_rb));
     Tgeneral_data_t gpr3      = param->_mask_data & (gpr1 + gpr2);
 
-    bool            overflow  = ovf  (gpr1,gpr2,gpr3);
-    bool            carry_out = carry(gpr1,gpr2,gpr3);
+    bool            overflow  = ovf  (param->_size_data,gpr1,gpr2,gpr3);
+    bool            carry_out = carry(param->_size_data,gpr1,gpr2,gpr3);
 
     // Result
@@ -118,6 +109,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_and");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = (gpr1 & gpr2);
 
@@ -137,6 +128,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_or");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = (gpr1 | gpr2);
 
@@ -156,6 +147,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_xor");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = (gpr1 ^ gpr2);
 
@@ -175,5 +166,5 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_movhi");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_immediat);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_immediat);
     Tgeneral_data_t gpr2       = param->_mask_data & (gpr1<<16);
 
@@ -195,6 +186,6 @@
     Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned(op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,op->_data_rb);
     Tgeneral_data_t gpr3       = ((f_in==0)?gpr2:gpr1);
 
@@ -215,5 +206,5 @@
 
     Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
 
     // Result
@@ -233,5 +224,5 @@
 
     Tgeneral_data_t f_in       = get_flag(op->_data_rc,FLAG_F);
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
 
     // Result
@@ -254,6 +245,6 @@
 
 
-    Tgeneral_data_t gpr        = unsigned(op->_data_rb);
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
+    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_rb);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
 
     // Result
@@ -272,6 +263,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_s");
 
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     Tgeneral_data_t gpr2       = extend<Tgeneral_data_t>(param->_size_data, gpr1, true , imm);
 
@@ -291,6 +282,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_extend_z");
 
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     Tgeneral_data_t gpr2       = extend<Tgeneral_data_t>(param->_size_data, gpr1, false , imm);
 
@@ -310,6 +301,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sll");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = shift_logic_left<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
 
@@ -329,6 +320,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_srl");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = shift_logic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
 
@@ -348,6 +339,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sra");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = shift_arithmetic_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
 
@@ -367,6 +358,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ror");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = param->_mask_shift & unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     Tgeneral_data_t gpr3       = rotate_right<Tgeneral_data_t>(param->_size_data, gpr1, gpr2);
 
@@ -386,5 +377,5 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_ff1");
 
-    Tgeneral_data_t gpr        = unsigned(op->_data_ra);
+    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_ra);
     Tgeneral_data_t index;
 
@@ -406,5 +397,5 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_fl1");
 
-    Tgeneral_data_t gpr        = unsigned(op->_data_ra);
+    Tgeneral_data_t gpr        = unsigned(param->_size_data,op->_data_ra);
     Tgeneral_data_t index;
 
@@ -426,6 +417,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfeq");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 == gpr2);
@@ -446,6 +437,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfne");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 != gpr2);
@@ -466,6 +457,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgeu");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 >= gpr2);
@@ -486,6 +477,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfgtu");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 >  gpr2);
@@ -506,6 +497,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfleu");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 <= gpr2);
@@ -526,6 +517,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_sfltu");
 
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
 
     bool            f_out      = (gpr1 <  gpr2);
@@ -549,16 +540,16 @@
     Tgeneral_data_t gpr2       =   (op->_has_immediat==1)?op->_immediat:op->_data_rb;
     
-    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra  : %.8x",unsigned(op->_data_ra));
-    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x",  signed(op->_data_ra));
-    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb  : %.8x",unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb));
-    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x",  signed((op->_has_immediat==1)?op->_immediat:op->_data_rb));
+    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ra  : %.8x",unsigned(param->_size_data,op->_data_ra));
+    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_ras : %.8x",  signed(param->_size_data,op->_data_ra));
+    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rb  : %.8x",unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
+    log_printf(TRACE,Functionnal_unit,FUNCTION," * data_rbs : %.8x",  signed(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb));
     
     bool            f_out;
 
-    switch (concatenation_bool(sign(gpr1),sign(gpr2)))
+    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
       {
       case 1 /*b01*/ : f_out = 1                               ; break;
       case 2 /*b10*/ : f_out = 0                               ; break;
-      default        : f_out = signed(gpr1) >= signed(gpr2); break;
+      default        : f_out = signed(param->_size_data,gpr1) >= signed(param->_size_data,gpr2); break;
       }
 
@@ -585,9 +576,9 @@
     bool            f_out;
 
-    switch (concatenation_bool(sign(gpr1),sign(gpr2)))
+    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
       {
       case 1 /*b01*/ : f_out = 1; break;
       case 2 /*b10*/ : f_out = 0; break;
-      default        : f_out = signed(gpr1) >  signed(gpr2); break;
+      default        : f_out = signed(param->_size_data,gpr1) >  signed(param->_size_data,gpr2); break;
       }
 
@@ -612,9 +603,9 @@
     bool            f_out;
 
-    switch (concatenation_bool(sign(gpr1),sign(gpr2)))
+    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
       {
       case 1 /*b01*/ : f_out = 0; break;
       case 2 /*b10*/ : f_out = 1; break;
-      default        : f_out = signed(gpr1) <= signed(gpr2); break;
+      default        : f_out = signed(param->_size_data,gpr1) <= signed(param->_size_data,gpr2); break;
       }
     
@@ -639,9 +630,9 @@
     bool            f_out;
 
-    switch (concatenation_bool(sign(gpr1),sign(gpr2)))
+    switch (concatenation_bool(sign(param->_size_data,gpr1),sign(param->_size_data,gpr2)))
       {
       case 1 /*b01*/ : f_out = 0; break;
       case 2 /*b10*/ : f_out = 1; break;
-      default        : f_out = signed(gpr1) <  signed(gpr2); break;
+      default        : f_out = signed(param->_size_data,gpr1) <  signed(param->_size_data,gpr2); break;
       }
 
@@ -661,7 +652,7 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mtspr");
 
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2       = unsigned(op->_data_rb);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2       = unsigned(param->_size_data,op->_data_rb);
     Tgeneral_data_t addr       = range<Tgeneral_data_t>(gpr1|imm,16);
 
@@ -694,5 +685,5 @@
     else
       {
-	exception = EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE;
+	exception = EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE;
       }
     
@@ -712,6 +703,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mfspr");
 
-    Tgeneral_data_t imm        = unsigned(op->_immediat);
-    Tgeneral_data_t gpr1       = unsigned(op->_data_ra);
+    Tgeneral_data_t imm        = unsigned(param->_size_data,op->_immediat);
+    Tgeneral_data_t gpr1       = unsigned(param->_size_data,op->_data_ra);
     Tgeneral_data_t gpr2       = 0;
     Tgeneral_data_t addr       = range<Tgeneral_data_t>(gpr1|imm,16);
@@ -745,5 +736,5 @@
     else
       {
-	exception = EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE;
+	exception = EXCEPTION_ALU_SPR_ACCESS_MUST_READ;
       }
 
@@ -784,6 +775,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_mac");
 
-    Tgeneral_data_t gpr1 = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2 = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     uint64_t        temp = range<uint64_t>(gpr1 * gpr2, 32);
 
@@ -808,6 +799,6 @@
     log_printf(TRACE,Functionnal_unit,FUNCTION,"Operation : l_msb");
 
-    Tgeneral_data_t gpr1 = unsigned(op->_data_ra);
-    Tgeneral_data_t gpr2 = unsigned((op->_has_immediat==1)?op->_immediat:op->_data_rb);
+    Tgeneral_data_t gpr1 = unsigned(param->_size_data,op->_data_ra);
+    Tgeneral_data_t gpr2 = unsigned(param->_size_data,(op->_has_immediat==1)?op->_immediat:op->_data_rb);
     uint64_t        temp = range<uint64_t>(gpr1 * gpr2, 32);
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/Makefile
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/Makefile	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/Makefile	(revision 88)
@@ -24,4 +24,6 @@
 library_clean			: Functionnal_unit_library_clean
 
+local_clean			:
+
 include                         $(DIR_COMPONENT)/Makefile.deps
 include                         $(DIR_MORPHEO)/Behavioural/Makefile.flags
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/main.cpp	(revision 88)
@@ -75,5 +75,6 @@
 	 size_load_queue     ,
 	 timing              ,
-	 &(morpheo::behavioural::custom::example_get_custom_information)
+	 &(morpheo::behavioural::custom::example_get_custom_information),
+         true // is_toplevel
         );
       
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/SelfTest/src/test.cpp	(revision 88)
@@ -69,8 +69,8 @@
   _data_rc       (data_rc      & gen_mask<Tspecial_data_t>(param->_size_special_data)),
   _write_rd      (write_rd     ),
-  _num_reg_rd    (num_reg_rd   % param->_nb_special_register),
+  _num_reg_rd    (num_reg_rd   % (1<<param->_size_general_register)),
   _data_rd       (data_rd      & gen_mask<Tgeneral_data_t>(param->_size_general_data)),
   _write_re      (write_re     ),
-  _num_reg_re    (num_reg_re   % param->_nb_special_register),
+  _num_reg_re    (num_reg_re   % (1<<param->_size_special_register)),
   _data_re       (data_re      & gen_mask<Tspecial_data_t>(param->_size_special_data)),
   _exception     (exception    ),
@@ -88,6 +88,16 @@
 
 #ifdef STATISTICS
-  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,50);
+  morpheo::behavioural::Parameters_Statistics * _parameters_statistics = new morpheo::behavioural::Parameters_Statistics (5,CYCLE_MAX);
 #endif
+
+  Tusage_t _usage = USE_ALL;
+
+//   _usage = usage_unset(_usage,USE_SYSTEMC              );
+//   _usage = usage_unset(_usage,USE_VHDL                 );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH       );
+//   _usage = usage_unset(_usage,USE_VHDL_TESTBENCH_ASSERT);
+//   _usage = usage_unset(_usage,USE_POSITION             );
+//   _usage = usage_unset(_usage,USE_STATISTICS           );
+//   _usage = usage_unset(_usage,USE_INFORMATION          );
 
   Functionnal_unit * _Functionnal_unit = new Functionnal_unit (name.c_str(),
@@ -96,5 +106,5 @@
 #endif
 							       _param,
-							       USE_ALL);
+							       _usage);
   
 #ifdef SYSTEMC
@@ -162,5 +172,5 @@
   if (_param->_have_port_ooo_engine_id)
   (*(_Functionnal_unit-> in_EXECUTE_IN_OOO_ENGINE_ID )) ( in_EXECUTE_IN_OOO_ENGINE_ID );
-  if (_param->_have_port_packet_id)
+  if (_param->_have_port_rob_ptr)
   (*(_Functionnal_unit-> in_EXECUTE_IN_PACKET_ID     )) ( in_EXECUTE_IN_PACKET_ID     );
   (*(_Functionnal_unit-> in_EXECUTE_IN_OPERATION     )) ( in_EXECUTE_IN_OPERATION     );
@@ -187,5 +197,5 @@
   if (_param->_have_port_ooo_engine_id)
   (*(_Functionnal_unit->out_EXECUTE_OUT_OOO_ENGINE_ID)) (out_EXECUTE_OUT_OOO_ENGINE_ID);
-  if (_param->_have_port_packet_id)
+  if (_param->_have_port_rob_ptr)
   (*(_Functionnal_unit->out_EXECUTE_OUT_PACKET_ID    )) (out_EXECUTE_OUT_PACKET_ID    );
 //(*(_Functionnal_unit->out_EXECUTE_OUT_OPERATION    )) (out_EXECUTE_OUT_OPERATION    );
@@ -475,6 +485,6 @@
   transaction_in.push_back(execute_transaction(_param,0,0,0,301,OPERATION_TEST_L_SFLTS   ,TYPE_TEST,0,0         ,0x11111111,0xdeadbeef,0              ,0,63,0x0       ,1,15,0              ,EXCEPTION_NONE     ,0)); // + <  - (in unsigned)
 
-  transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   3,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE,0,(GROUP_ICACHE<<11)|   3));
-  transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   5,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_NOT_COMPLETE,0,(GROUP_ICACHE<<11)|   5));
+  transaction_in.push_back(execute_transaction(_param,0,0,0,400,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   3,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE  ,0,(GROUP_ICACHE<<11)|   3));
+  transaction_in.push_back(execute_transaction(_param,0,0,0,401,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_ICACHE<<11,   5,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_MUST_WRITE  ,0,(GROUP_ICACHE<<11)|   5));
   transaction_in.push_back(execute_transaction(_param,0,0,0,402,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_MAC   <<11,   0,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_SPR_ACCESS_INVALID     ,0,(GROUP_MAC   <<11)|   0));
   transaction_in.push_back(execute_transaction(_param,0,0,0,403,OPERATION_SPECIAL_L_MTSPR   ,TYPE_SPECIAL,1,GROUP_MAC   <<11,   1,0xdeadbeef,0              ,0,63,0xdeadbeef,0, 0,0              ,EXCEPTION_ALU_NONE                   ,0,(GROUP_MAC   <<11)|   1));
@@ -590,5 +600,5 @@
 	      if (_param->_have_port_ooo_engine_id)
 	      in_EXECUTE_IN_OOO_ENGINE_ID .write(transaction_in.front()._ooo_engine_id);
-	      if (_param->_have_port_packet_id)
+	      if (_param->_have_port_rob_ptr)
 	      in_EXECUTE_IN_PACKET_ID     .write(transaction_in.front()._packet_id    );
 	      in_EXECUTE_IN_OPERATION     .write(transaction_in.front()._operation    );
@@ -613,5 +623,5 @@
 	    {
 	      // TEST
-	      if (_param->_have_port_packet_id)
+	      if (_param->_have_port_rob_ptr)
 	      TEST(Tpacket_t         , out_EXECUTE_OUT_PACKET_ID    .read(), transaction_out.front()._packet_id    );
 	      if (_param->_have_port_context_id)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h	(revision 88)
@@ -124,7 +124,9 @@
   private   : Tcontrol_t                      internal_EXECUTE_IN_ACK;
   private   : Tcontrol_t                      internal_EXECUTE_OUT_VAL;
-  private   : bool                            reg_BUSY;
+  private   : bool                            reg_BUSY_IN ;
+  private   : bool                            reg_BUSY_OUT;
 
-  private   : execute_operation_t           * _execute_operation;
+  private   : execute_operation_t           * _execute_operation_in ;
+  private   : execute_operation_t           * _execute_operation_out;
   private   : execute_register_t         **** _execute_register;
   private   : execute_param_t               * _execute_param;
@@ -158,6 +160,4 @@
   public  : void        transition                (void);
   public  : void        genMoore                  (void);
-  public  : void        genMealy                  (void);
-
 
 #endif					       
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Parameters.h	(revision 88)
@@ -25,36 +25,35 @@
 namespace functionnal_unit {
 
-
   class Parameters : public morpheo::behavioural::Parameters
   {
     //-----[ fields ]------------------------------------------------------------
-  public : const uint32_t            _nb_context                   ;
-  public : const uint32_t            _nb_front_end                 ;
-  public : const uint32_t            _nb_ooo_engine                ;
-  public : const uint32_t            _nb_packet                    ;
-  public : const uint32_t            _size_general_data            ;
-  public : const uint32_t            _nb_general_register          ;
-  public : const uint32_t            _size_special_data            ;
-  public : const uint32_t            _nb_special_register          ;
-  public : const uint32_t            _size_store_queue             ;
-  public : const uint32_t            _size_load_queue              ;
+  public : uint32_t            _nb_context                   ;
+  public : uint32_t            _nb_front_end                 ;
+  public : uint32_t            _nb_ooo_engine                ;
+  public : uint32_t            _nb_packet                    ;
+//public : uint32_t            _size_general_data            ;
+//public : uint32_t            _size_special_data            ;
+//public : uint32_t            _nb_general_register          ;
+//public : uint32_t            _nb_special_register          ;
+//public : uint32_t            _size_store_queue             ;
+//public : uint32_t            _size_load_queue              ;
 
-  public :       execute_timing_t ** _timing                       ;
-  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (uint32_t);
+  public : execute_timing_t ** _timing                       ;
+  public : morpheo::behavioural::custom::custom_information_t (*_get_custom_information) (void);
 
-  public : const uint32_t            _size_context_id              ;
-  public : const uint32_t            _size_front_end_id            ;
-  public : const uint32_t            _size_ooo_engine_id           ;
-  public : const uint32_t            _size_packet_id               ;
-  public : const uint32_t            _size_general_register        ;
-  public : const uint32_t            _size_special_register        ;
+//public : uint32_t            _size_context_id              ;
+//public : uint32_t            _size_front_end_id            ;
+//public : uint32_t            _size_ooo_engine_id           ;
+//public : uint32_t            _size_packet_id               ;
+//public : uint32_t            _size_general_register        ;
+//public : uint32_t            _size_special_register        ;
 
-  public : const bool                _have_port_context_id         ;
-  public : const bool                _have_port_front_end_id       ;
-  public : const bool                _have_port_ooo_engine_id      ;
-  public : const bool                _have_port_packet_id          ;
-  public : const bool                _have_port_load_queue_ptr     ;
+//public : bool                _have_port_context_id         ;
+//public : bool                _have_port_front_end_id       ;
+//public : bool                _have_port_ooo_engine_id      ;
+//public : bool                _have_port_packet_id          ;
+//public : bool                _have_port_load_queue_ptr     ;
 
-  public : const bool                _have_groupe_MAC              ;
+  public : bool                _have_groupe_MAC              ;
 
     //-----[ methods ]-----------------------------------------------------------
@@ -70,7 +69,11 @@
 			uint32_t           size_load_queue    ,
 			execute_timing_t** timing             ,
-			morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t));
-  public : Parameters  (Parameters & param) ;
+			morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
+                        bool               is_toplevel=true
+                        );
+//   public : Parameters  (Parameters & param) ;
   public : ~Parameters () ;
+
+  public :        void            copy       (void);
 
   public :        Parameters_test msg_error  (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit.cpp	(revision 88)
@@ -42,6 +42,12 @@
     allocation ();
 
+#if DEBUG_Functionnal_unit == true
+    log_printf(INFO,Functionnal_unit,FUNCTION,_("<%s> Parameters"),_name.c_str());
+
+    std::cout << *param << std::endl;
+#endif    
+
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {	
 	log_printf(INFO,Functionnal_unit,FUNCTION,"Allocation of statistics");
@@ -52,5 +58,5 @@
 
 #ifdef VHDL
-    if (_usage & USE_VHDL)
+    if (usage_is_set(_usage,USE_VHDL))
       {
 	// generate the vhdl
@@ -62,5 +68,5 @@
 
 #ifdef SYSTEMC
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	log_printf(INFO,Functionnal_unit,FUNCTION,"Method - transition");
@@ -84,16 +90,4 @@
 # endif    
 
-	log_printf(INFO,Functionnal_unit,FUNCTION,"Method - genMealy");
-
-	SC_METHOD (genMealy);
-	dont_initialize ();
-	sensitive << (*(in_CLOCK)).neg()
-		  << (*(in_EXECUTE_OUT_ACK));
-	
-# ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	(*(out_EXECUTE_IN_ACK)) (*(in_EXECUTE_OUT_ACK));
-# endif    
-	
 #endif
       }
@@ -108,5 +102,5 @@
 
 #ifdef STATISTICS
-    if (_usage & USE_STATISTICS)
+    if (usage_is_set(_usage,USE_STATISTICS))
       {
 	log_printf(INFO,Functionnal_unit,FUNCTION,"Generate Statistics file");
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 82)
+++ 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 88)
@@ -67,11 +67,11 @@
       if (_param->_have_port_ooo_engine_id)
        in_EXECUTE_IN_OOO_ENGINE_ID = interface->set_signal_in <Tcontext_t        > ("ooo_engine_id", _param->_size_ooo_engine_id);
-      if (_param->_have_port_packet_id)
-       in_EXECUTE_IN_PACKET_ID     = interface->set_signal_in <Tpacket_t         > ("packet_id"    , _param->_size_packet_id    );
+      if (_param->_have_port_rob_ptr)
+       in_EXECUTE_IN_PACKET_ID     = interface->set_signal_in <Tpacket_t         > ("packet_id"    , _param->_size_rob_ptr    );
        in_EXECUTE_IN_OPERATION     = interface->set_signal_in <Toperation_t      > ("operation"    , _param->_size_operation    );
        in_EXECUTE_IN_TYPE          = interface->set_signal_in <Ttype_t           > ("type"         , _param->_size_type         );
-       in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",log2(_param->_size_store_queue));
+       in_EXECUTE_IN_STORE_QUEUE_PTR_WRITE = interface->set_signal_in <Tlsq_ptr_t> ("store_queue_ptr_write",_param->_size_store_queue_ptr);
        if (_param->_have_port_load_queue_ptr)
-       in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,log2(_param->_size_load_queue));
+       in_EXECUTE_IN_LOAD_QUEUE_PTR_WRITE  = interface->set_signal_in <Tlsq_ptr_t> ("load_queue_ptr_write" ,_param->_size_load_queue_ptr);
        in_EXECUTE_IN_HAS_IMMEDIAT  = interface->set_signal_in <Tcontrol_t        > ("has_immediat" , 1);
        in_EXECUTE_IN_IMMEDIAT      = interface->set_signal_in <Tgeneral_data_t   > ("immediat"     , _param->_size_general_data);
@@ -102,6 +102,6 @@
        if (_param->_have_port_ooo_engine_id)
        out_EXECUTE_OUT_OOO_ENGINE_ID  = interface->set_signal_out<Tcontext_t        > ("ooo_engine_id",_param->_size_ooo_engine_id);
-       if (_param->_have_port_packet_id)
-       out_EXECUTE_OUT_PACKET_ID      = interface->set_signal_out<Tpacket_t         > ("packet_id"    ,_param->_size_packet_id    );
+       if (_param->_have_port_rob_ptr)
+       out_EXECUTE_OUT_PACKET_ID      = interface->set_signal_out<Tpacket_t         > ("packet_id"    ,_param->_size_rob_ptr    );
      //out_EXECUTE_OUT_OPERATION      = interface->set_signal_out<Toperation_t      > ("operation"    ,_param->_size_operation    );
        out_EXECUTE_OUT_TYPE           = interface->set_signal_out<Ttype_t           > ("type"         ,_param->_size_type         );
@@ -117,8 +117,11 @@
      }
 
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-     _execute_operation = new execute_operation_t;
-     _execute_param     = new execute_param_t(_param->_size_general_data,
-					      _param->_timing);
+     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+     if (usage_is_set(_usage,USE_SYSTEMC))
+       {
+     _execute_operation_in  = new execute_operation_t;
+     _execute_operation_out = new execute_operation_t;
+     _execute_param         = new execute_param_t(_param->_size_general_data,
+						  _param->_timing);
 
      _execute_register = new execute_register_t *** [_param->_nb_context];
@@ -134,7 +137,7 @@
 	     for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
 	       {
-		 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
-						      j,_param->_size_front_end_id,
-						      k,_param->_size_ooo_engine_id);
+// 		 uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
+// 						      j,_param->_size_front_end_id,
+// 						      k,_param->_size_ooo_engine_id);
 
 		 _execute_register [i][j][k] = new execute_register_t;
@@ -144,11 +147,11 @@
 
 		 for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
-		   if ((_param->_get_custom_information(num_thread))._get_valid_group(x) == true)
+		   if ((_param->_get_custom_information())._get_valid_group(x) == true)
 		     {
-		       uint32_t nb_reg = (_param->_get_custom_information(num_thread))._get_nb_register(x);
+		       uint32_t nb_reg = (_param->_get_custom_information())._get_nb_register(x);
 		       _execute_register[i][j][k]->implement_group(x,nb_reg);
 
 		       for (uint32_t y=0; y<nb_reg; y++)
-			 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information(num_thread))._get_access_mode(x,y));
+			 _execute_register[i][j][k]->_spr_access_mode->change_mode(x,y,(_param->_get_custom_information())._get_access_mode(x,y));
 		     }
 	       }
@@ -211,12 +214,12 @@
      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_MUL    ][OPERATION_MUL_L_MUL         ]._latence > 0) 
+//     _function_execute[TYPE_MUL    ][OPERATION_MUL_L_MUL         ] = &(operation_l_mul     );
+//   if (_param->_timing[TYPE_MUL    ][OPERATION_MUL_L_MULU        ]._latence > 0) 
+//     _function_execute[TYPE_DIV    ][OPERATION_MUL_L_MULU        ] = &(operation_l_mulu    );
+//   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIV         ]._latence > 0) 
+//     _function_execute[TYPE_DIV    ][OPERATION_DIV_L_DIV         ] = &(operation_l_div     );
+//   if (_param->_timing[TYPE_DIV    ][OPERATION_DIV_L_DIVU        ]._latence > 0) 
+//     _function_execute[TYPE_DIV    ][OPERATION_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);
@@ -243,9 +246,9 @@
      if (_param->_timing[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ]._latence > 0) 
        _function_execute[TYPE_BRANCH ][OPERATION_BRANCH_L_JALR     ] = &(operation_l_jalr    );
-
-
-
-#ifdef POSITION
-    _component->generate_file();
+       }
+
+#ifdef POSITION
+     if (usage_is_set(_usage,USE_POSITION))
+       _component->generate_file();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_deallocation.cpp	(revision 88)
@@ -24,5 +24,5 @@
     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
 
-    if (_usage & USE_SYSTEMC)
+    if (usage_is_set(_usage,USE_SYSTEMC))
       {
 	delete    in_CLOCK ;
@@ -37,5 +37,5 @@
 	if (_param->_have_port_ooo_engine_id)
 	delete  in_EXECUTE_IN_OOO_ENGINE_ID ;
-	if (_param->_have_port_packet_id)
+	if (_param->_have_port_rob_ptr)
 	delete  in_EXECUTE_IN_PACKET_ID     ;
 	delete  in_EXECUTE_IN_OPERATION     ;
@@ -62,5 +62,5 @@
 	if (_param->_have_port_ooo_engine_id)
 	delete out_EXECUTE_OUT_OOO_ENGINE_ID  ; 
-	if (_param->_have_port_packet_id)
+	if (_param->_have_port_rob_ptr)
 	delete out_EXECUTE_OUT_PACKET_ID      ; 
       //delete out_EXECUTE_OUT_OPERATION      ; 
@@ -75,11 +75,13 @@
 	delete out_EXECUTE_OUT_NO_SEQUENCE    ;
 	delete out_EXECUTE_OUT_ADDRESS        ;
+
+        // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+        
+        delete [] _execute_register;
+        delete    _execute_param;
+        delete    _execute_operation_in;
+        delete    _execute_operation_out;
+        delete [] _function_execute;
       }
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
-
-    delete [] _execute_register;
-    delete    _execute_param;
-    delete    _execute_operation;
-    delete [] _function_execute;
 
     delete    _component;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_end_cycle.cpp	(revision 88)
@@ -26,5 +26,6 @@
 
 #ifdef STATISTICS
-    _stat->end_cycle();
+    if (usage_is_set(_usage,USE_STATISTICS))
+      _stat->end_cycle();
 #endif    
 
@@ -32,5 +33,6 @@
     // Evaluation before read the ouput signal
 //  sc_start(0);
-    _interfaces->testbench();
+    if (usage_is_set(_usage,USE_VHDL_TESTBENCH))
+      _interfaces->testbench();
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMealy.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMealy.cpp	(revision 82)
+++ 	(revision )
@@ -1,46 +1,0 @@
-#ifdef SYSTEMC
-/*
- * $Id$
- *
- * [ Description ]
- * 
- */
-
-#include "Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/include/Functionnal_unit.h"
-
-namespace morpheo                    {
-namespace behavioural {
-namespace core {
-namespace multi_execute_loop {
-namespace execute_loop {
-namespace multi_execute_unit {
-namespace execute_unit {
-namespace functionnal_unit {
-
-
-#undef  FUNCTION
-#define FUNCTION "Functionnal_unit::genMealy"
-  void Functionnal_unit::genMealy (void)
-  {
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
-
-    bool execute_out_transaction = (PORT_READ(in_EXECUTE_OUT_ACK) and
-				    (reg_BUSY and (_execute_operation->_timing._latence == 0)));
-
-    internal_EXECUTE_IN_ACK = not reg_BUSY or (reg_BUSY and execute_out_transaction);
-
-    PORT_WRITE(out_EXECUTE_IN_ACK, internal_EXECUTE_IN_ACK);
-
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
-  };
-
-}; // end namespace functionnal_unit
-}; // end namespace execute_unit
-}; // end namespace multi_execute_unit
-}; // end namespace execute_loop
-}; // end namespace multi_execute_loop
-}; // end namespace core
-
-}; // end namespace behavioural
-}; // end namespace morpheo              
-#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_genMoore.cpp	(revision 88)
@@ -23,30 +23,39 @@
   void Functionnal_unit::genMoore (void)
   {
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
+    log_begin(Functionnal_unit,FUNCTION);
+    log_function(Functionnal_unit,FUNCTION,_name.c_str());
 
-    internal_EXECUTE_OUT_VAL = reg_BUSY and (_execute_operation->_timing._latence == 0);
+    {
+      internal_EXECUTE_IN_ACK = not reg_BUSY_IN;
+      
+      PORT_WRITE(out_EXECUTE_IN_ACK           , internal_EXECUTE_IN_ACK);
+    }
 
-    PORT_WRITE(out_EXECUTE_OUT_VAL          , internal_EXECUTE_OUT_VAL);
-    if (_param->_have_port_context_id)
-    PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID   ,_execute_operation->_context_id   );
-    if (_param->_have_port_front_end_id)
-    PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation->_front_end_id );
-    if (_param->_have_port_ooo_engine_id)
-    PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation->_ooo_engine_id);
-    if (_param->_have_port_packet_id)
-    PORT_WRITE(out_EXECUTE_OUT_PACKET_ID    ,_execute_operation->_packet_id    );
-  //PORT_WRITE(out_EXECUTE_OUT_OPERATION    ,_execute_operation->_operation    );
-    PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation->_type         );
-    PORT_WRITE(out_EXECUTE_OUT_WRITE_RD     ,_execute_operation->_write_rd     );
-    PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD   ,_execute_operation->_num_reg_rd   );
-    PORT_WRITE(out_EXECUTE_OUT_DATA_RD      ,_execute_operation->_data_rd      );
-    PORT_WRITE(out_EXECUTE_OUT_WRITE_RE     ,_execute_operation->_write_re     );
-    PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE   ,_execute_operation->_num_reg_re   );
-    PORT_WRITE(out_EXECUTE_OUT_DATA_RE      ,_execute_operation->_data_re      );
-    PORT_WRITE(out_EXECUTE_OUT_EXCEPTION    ,_execute_operation->_exception    );
-    PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE  ,_execute_operation->_no_sequence  );
-    PORT_WRITE(out_EXECUTE_OUT_ADDRESS      ,_execute_operation->_address      );
+    {
+      internal_EXECUTE_OUT_VAL = reg_BUSY_OUT and (_execute_operation_out->_timing._latence == 0);
+      
+      PORT_WRITE(out_EXECUTE_OUT_VAL          , internal_EXECUTE_OUT_VAL);
+      if (_param->_have_port_context_id)
+      PORT_WRITE(out_EXECUTE_OUT_CONTEXT_ID   ,_execute_operation_out->_context_id   );
+      if (_param->_have_port_front_end_id)
+      PORT_WRITE(out_EXECUTE_OUT_FRONT_END_ID ,_execute_operation_out->_front_end_id );
+      if (_param->_have_port_ooo_engine_id)
+      PORT_WRITE(out_EXECUTE_OUT_OOO_ENGINE_ID,_execute_operation_out->_ooo_engine_id);
+      if (_param->_have_port_rob_ptr)
+      PORT_WRITE(out_EXECUTE_OUT_PACKET_ID    ,_execute_operation_out->_packet_id    );
+  //  PORT_WRITE(out_EXECUTE_OUT_OPERATION    ,_execute_operation_out->_operation    );
+      PORT_WRITE(out_EXECUTE_OUT_TYPE         ,_execute_operation_out->_type         );
+      PORT_WRITE(out_EXECUTE_OUT_WRITE_RD     ,_execute_operation_out->_write_rd     );
+      PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RD   ,_execute_operation_out->_num_reg_rd   );
+      PORT_WRITE(out_EXECUTE_OUT_DATA_RD      ,_execute_operation_out->_data_rd      );
+      PORT_WRITE(out_EXECUTE_OUT_WRITE_RE     ,_execute_operation_out->_write_re     );
+      PORT_WRITE(out_EXECUTE_OUT_NUM_REG_RE   ,_execute_operation_out->_num_reg_re   );
+      PORT_WRITE(out_EXECUTE_OUT_DATA_RE      ,_execute_operation_out->_data_re      );
+      PORT_WRITE(out_EXECUTE_OUT_EXCEPTION    ,_execute_operation_out->_exception    );
+      PORT_WRITE(out_EXECUTE_OUT_NO_SEQUENCE  ,_execute_operation_out->_no_sequence  );
+      PORT_WRITE(out_EXECUTE_OUT_ADDRESS      ,_execute_operation_out->_address      );
+    }
 
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
+    log_end(Functionnal_unit,FUNCTION);
   };
 
@@ -57,5 +66,4 @@
 }; // end namespace multi_execute_loop
 }; // end namespace core
-
 }; // end namespace behavioural
 }; // end namespace morpheo              
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Functionnal_unit_transition.cpp	(revision 88)
@@ -23,9 +23,11 @@
   void Functionnal_unit::transition (void)
   {
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
+    log_begin(Functionnal_unit,FUNCTION);
+    log_function(Functionnal_unit,FUNCTION,_name.c_str());
 
     if (PORT_READ(in_NRESET) == 0)
       {
-	reg_BUSY = false;
+	reg_BUSY_IN  = false;
+	reg_BUSY_OUT = false;
 	
 	for (uint32_t i=0; i<_param->_nb_context; i++)
@@ -33,11 +35,11 @@
 	    for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
 	      {
-		uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
-						     j,_param->_size_front_end_id,
-						     k,_param->_size_ooo_engine_id);
+// 		uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
+// 						     j,_param->_size_front_end_id,
+// 						     k,_param->_size_ooo_engine_id);
 		
 		for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
 		  {
-		    function_execute_end_cycle_t * fct = (_param->_get_custom_information(num_thread)._get_custom_execute_reset(x));
+		    function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_reset(x));
 		    
 		    if (fct != NULL)
@@ -51,6 +53,7 @@
 	if (internal_EXECUTE_OUT_VAL and PORT_READ(in_EXECUTE_OUT_ACK))
 	  {
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"  * EXECUTE_OUT : Transaction Accepted");
 	    // transaction
-	    reg_BUSY = false;
+	    reg_BUSY_OUT = false;
 	  }
 	
@@ -60,29 +63,47 @@
 	if (PORT_READ(in_EXECUTE_IN_VAL) and internal_EXECUTE_IN_ACK)
 	  {
-	    reg_BUSY = true;
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"  * EXECUTE_IN : Transaction Accepted");
+
+	    reg_BUSY_IN = true;
 
 	    Tcontext_t   context_id    = (_param->_have_port_context_id   )?PORT_READ(in_EXECUTE_IN_CONTEXT_ID   ):0;
 	    Tcontext_t   front_end_id  = (_param->_have_port_front_end_id )?PORT_READ(in_EXECUTE_IN_FRONT_END_ID ):0;
 	    Tcontext_t   ooo_engine_id = (_param->_have_port_ooo_engine_id)?PORT_READ(in_EXECUTE_IN_OOO_ENGINE_ID):0;
-	    Tcontext_t   packet_id     = (_param->_have_port_packet_id    )?PORT_READ(in_EXECUTE_IN_PACKET_ID    ):0;
+	    Tcontext_t   packet_id     = (_param->_have_port_rob_ptr      )?PORT_READ(in_EXECUTE_IN_PACKET_ID    ):0;
 	    Toperation_t operation     = PORT_READ(in_EXECUTE_IN_OPERATION);
 	    Ttype_t      type          = PORT_READ(in_EXECUTE_IN_TYPE);
 	    
-	    _execute_operation->_context_id    = context_id   ;
-	    _execute_operation->_front_end_id  = front_end_id ;
-	    _execute_operation->_ooo_engine_id = ooo_engine_id;
-	    _execute_operation->_packet_id     = packet_id    ;
-	    _execute_operation->_operation     = operation    ;
-	    _execute_operation->_type          = type         ;
-	    _execute_operation->_has_immediat  = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT);
-	    _execute_operation->_immediat      = PORT_READ(in_EXECUTE_IN_IMMEDIAT    );
-	    _execute_operation->_data_ra       = PORT_READ(in_EXECUTE_IN_DATA_RA     );
-	    _execute_operation->_data_rb       = PORT_READ(in_EXECUTE_IN_DATA_RB     );
-	    _execute_operation->_data_rc       = PORT_READ(in_EXECUTE_IN_DATA_RC     );
-	    _execute_operation->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
-	    _execute_operation->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
-	    _execute_operation->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
-	    _execute_operation->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
-
+	    _execute_operation_in->_context_id    = context_id   ;
+	    _execute_operation_in->_front_end_id  = front_end_id ;
+	    _execute_operation_in->_ooo_engine_id = ooo_engine_id;
+	    _execute_operation_in->_packet_id     = packet_id    ;
+	    _execute_operation_in->_operation     = operation    ;
+	    _execute_operation_in->_type          = type         ;
+	    _execute_operation_in->_has_immediat  = PORT_READ(in_EXECUTE_IN_HAS_IMMEDIAT);
+	    _execute_operation_in->_immediat      = PORT_READ(in_EXECUTE_IN_IMMEDIAT    );
+	    _execute_operation_in->_data_ra       = PORT_READ(in_EXECUTE_IN_DATA_RA     );
+	    _execute_operation_in->_data_rb       = PORT_READ(in_EXECUTE_IN_DATA_RB     );
+	    _execute_operation_in->_data_rc       = PORT_READ(in_EXECUTE_IN_DATA_RC     );
+	    _execute_operation_in->_write_rd      = PORT_READ(in_EXECUTE_IN_WRITE_RD    );
+	    _execute_operation_in->_num_reg_rd    = PORT_READ(in_EXECUTE_IN_NUM_REG_RD  );
+	    _execute_operation_in->_write_re      = PORT_READ(in_EXECUTE_IN_WRITE_RE    );
+	    _execute_operation_in->_num_reg_re    = PORT_READ(in_EXECUTE_IN_NUM_REG_RE  );
+
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * context_id    : %d",_execute_operation_in->_context_id   );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * front_end_id  : %d",_execute_operation_in->_front_end_id );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * ooo_engine_id : %d",_execute_operation_in->_ooo_engine_id);
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * packet_id     : %d",_execute_operation_in->_packet_id    );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * operation     : %d",_execute_operation_in->_operation    );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * type          : %s",toString_type(_execute_operation_in->_type).c_str());
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * has_immediat  : %d",_execute_operation_in->_has_immediat );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * immediat      : %.8x",_execute_operation_in->_immediat     );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_ra       : %.8x",_execute_operation_in->_data_ra      );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rb       : %.8x",_execute_operation_in->_data_rb      );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rc       : %.8x",_execute_operation_in->_data_rc      );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * write_rd      : %d"  ,_execute_operation_in->_write_rd     );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * num_reg_rd    : %d"  ,_execute_operation_in->_num_reg_rd   );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * write_re      : %d"  ,_execute_operation_in->_write_re     );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * num_reg_re    : %d"  ,_execute_operation_in->_num_reg_re   );
+            
 #ifdef DEBUG_TEST
 	    if (type >= _param->_nb_type)
@@ -98,18 +119,30 @@
 	    if (type == TYPE_CUSTOM)
 	      {
-		uint32_t num_thread = get_num_thread(context_id   ,_param->_size_context_id,
-						     front_end_id ,_param->_size_front_end_id,
-						     ooo_engine_id,_param->_size_ooo_engine_id);
-
-		(*(_param->_get_custom_information(num_thread)._get_custom_execute_genMoore(operation))) (_execute_operation, execute_register, _execute_param);
+// 		uint32_t num_thread = get_num_thread(context_id   ,_param->_size_context_id,
+// 						     front_end_id ,_param->_size_front_end_id,
+// 						     ooo_engine_id,_param->_size_ooo_engine_id);
+
+		(*(_param->_get_custom_information()._get_custom_execute_genMoore(operation))) (_execute_operation_in, execute_register, _execute_param);
 	      }
 	    else
-	      (*(_function_execute[type][operation])) (_execute_operation, execute_register, _execute_param);
-
+	      (*(_function_execute[type][operation])) (_execute_operation_in, execute_register, _execute_param);
+
+
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    -----------------");
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * latence       : %.8x",_execute_operation_in->_timing._latence);
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * delay         : %.8x",_execute_operation_in->_timing._delay);
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_rd       : %.8x",_execute_operation_in->_data_rd    );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * data_re       : %.8x",_execute_operation_in->_data_re    );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * exception     : %d"  ,_execute_operation_in->_exception  );
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * no_sequence   : %d"  ,_execute_operation_in->_no_sequence);
+            log_printf(TRACE,Functionnal_unit,FUNCTION,"    * address       : %.8x",_execute_operation_in->_address    );
 
 #ifdef STATISTICS
-            (*_stat_use_functionnal_unit) ++;
-	    (*_stat_sum_delay)   += _execute_operation->_timing._delay;
-	    (*_stat_sum_latence) += _execute_operation->_timing._latence;
+            if (usage_is_set(_usage,USE_STATISTICS))
+              {
+                (*_stat_use_functionnal_unit) ++;
+                (*_stat_sum_delay)   += _execute_operation_in->_timing._delay;
+                (*_stat_sum_latence) += _execute_operation_in->_timing._latence;
+              }
 #endif
 	  }
@@ -121,11 +154,11 @@
 	      for (uint32_t k=0; k<_param->_nb_ooo_engine; k++)
 		{
-		  uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
-						       j,_param->_size_front_end_id,
-						       k,_param->_size_ooo_engine_id);
+// 		  uint32_t num_thread = get_num_thread(i,_param->_size_context_id,
+// 						       j,_param->_size_front_end_id,
+// 						       k,_param->_size_ooo_engine_id);
 
 		  for (uint32_t x=GROUP_CUSTOM_1; x<GROUP_CUSTOM_8; x++)
 		    {
-		      function_execute_end_cycle_t * fct = (_param->_get_custom_information(num_thread)._get_custom_execute_transition(x));
+		      function_execute_end_cycle_t * fct = (_param->_get_custom_information()._get_custom_execute_transition(x));
 		      
 		      if (fct != NULL)
@@ -142,9 +175,37 @@
 	    }
 	}
+
+	if (reg_BUSY_IN and not reg_BUSY_OUT)
+	  {
+	    reg_BUSY_OUT = reg_BUSY_IN;
+	    reg_BUSY_IN  = false;
+
+	    _execute_operation_out->_timing        = _execute_operation_in->_timing       ;
+	    _execute_operation_out->_context_id    = _execute_operation_in->_context_id   ;
+	    _execute_operation_out->_front_end_id  = _execute_operation_in->_front_end_id ;
+	    _execute_operation_out->_ooo_engine_id = _execute_operation_in->_ooo_engine_id;
+	    _execute_operation_out->_packet_id     = _execute_operation_in->_packet_id    ;
+	    _execute_operation_out->_operation     = _execute_operation_in->_operation    ;
+	    _execute_operation_out->_type          = _execute_operation_in->_type         ;
+	    _execute_operation_out->_has_immediat  = _execute_operation_in->_has_immediat ;
+	    _execute_operation_out->_immediat      = _execute_operation_in->_immediat     ;
+	    _execute_operation_out->_data_ra       = _execute_operation_in->_data_ra      ;
+	    _execute_operation_out->_data_rb       = _execute_operation_in->_data_rb      ;
+	    _execute_operation_out->_data_rc       = _execute_operation_in->_data_rc      ;
+	    _execute_operation_out->_data_rd       = _execute_operation_in->_data_rd      ;
+	    _execute_operation_out->_data_re       = _execute_operation_in->_data_re      ;
+	    _execute_operation_out->_write_rd      = _execute_operation_in->_write_rd     ;
+	    _execute_operation_out->_num_reg_rd    = _execute_operation_in->_num_reg_rd   ;
+	    _execute_operation_out->_write_re      = _execute_operation_in->_write_re     ;
+	    _execute_operation_out->_num_reg_re    = _execute_operation_in->_num_reg_re   ;
+	    _execute_operation_out->_exception     = _execute_operation_in->_exception    ;
+	    _execute_operation_out->_no_sequence   = _execute_operation_in->_no_sequence  ;
+	    _execute_operation_out->_address       = _execute_operation_in->_address      ;
+	  }
+	
+	// each cycle : decrease the latence
+	if (reg_BUSY_OUT and (_execute_operation_out->_timing._latence > 0))
+	  _execute_operation_out->_timing._latence --;
       }
-
-    // each cycle : decrease the latence
-    if (reg_BUSY and (_execute_operation->_timing._latence > 0))
-      _execute_operation->_timing._latence --;
 
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
@@ -152,5 +213,5 @@
 #endif
 
-    log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
+    log_end(Functionnal_unit,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters.cpp	(revision 88)
@@ -31,36 +31,38 @@
 			  uint32_t           size_load_queue    ,
 			  execute_timing_t** timing             ,
-			  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (uint32_t)) :
-    _nb_context              (nb_context            ),
-    _nb_front_end            (nb_front_end          ),
-    _nb_ooo_engine           (nb_ooo_engine         ),
-    _nb_packet               (nb_packet             ),
-    _size_general_data       (size_general_data     ),
-    _nb_general_register     (nb_general_register   ),
-    _size_special_data       (size_special_data     ),
-    _nb_special_register     (nb_special_register   ),
-    _size_store_queue        (size_store_queue      ),
-    _size_load_queue         (size_load_queue       ),
-
-    _size_context_id         (log2(nb_context      )),
-    _size_front_end_id       (log2(nb_front_end    )),
-    _size_ooo_engine_id      (log2(nb_ooo_engine   )),
-    _size_packet_id          (log2(nb_packet       )),
-    _size_general_register   (log2(nb_general_register)),
-    _size_special_register   (log2(nb_special_register)),
-
-    _have_port_context_id    (_size_context_id    > 0),
-    _have_port_front_end_id  (_size_front_end_id  > 0),
-    _have_port_ooo_engine_id (_size_ooo_engine_id > 0),
-    _have_port_packet_id     (_size_packet_id     > 0),
-    _have_port_load_queue_ptr(_size_load_queue    > 1),
-
-    _have_groupe_MAC         ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
-			       (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or
-			       (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence > 0))
+			  morpheo::behavioural::custom::custom_information_t (*get_custom_information) (void),
+                          bool               is_toplevel)
   {
     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
 
-    _timing                 = timing;
+    _nb_context              = nb_context            ;
+    _nb_front_end            = nb_front_end          ;
+    _nb_ooo_engine           = nb_ooo_engine         ;
+    _nb_packet               = nb_packet             ;
+//  _size_general_data       = size_general_data     ;
+//  _size_special_data       = size_special_data     ;
+//  _nb_general_register     = nb_general_register   ;
+//  _nb_special_register     = nb_special_register   ;
+//  _size_store_queue        = size_store_queue      ;
+//  _size_load_queue         = size_load_queue       ;
+
+//  _size_context_id         = log2(nb_context         );
+//  _size_front_end_id       = log2(nb_front_end       );
+//  _size_ooo_engine_id      = log2(nb_ooo_engine      );
+//  _size_packet_id          = log2(nb_packet          );
+//  _size_general_register   = log2(nb_general_register);
+//  _size_special_register   = log2(nb_special_register);
+
+//  _have_port_context_id    = _size_context_id    > 0;
+//  _have_port_front_end_id  = _size_front_end_id  > 0;
+//  _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
+//  _have_port_packet_id     = _size_packet_id     > 0;
+//  _have_port_load_queue_ptr= _size_load_queue    > 1;
+
+    _have_groupe_MAC         = ( (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence > 0) or
+                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence > 0) or
+                                 (timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence > 0));
+
+    _timing                  = timing;
 
     if (get_custom_information == NULL)
@@ -71,48 +73,82 @@
     test();
 
+    if (is_toplevel)
+      {
+        _size_context_id         = log2(nb_context         );
+        _size_front_end_id       = log2(nb_front_end       );
+        _size_ooo_engine_id      = log2(nb_ooo_engine      );
+        _size_rob_ptr            = log2(nb_packet          );
+        _size_general_register   = log2(nb_general_register);
+        _size_special_register   = log2(nb_special_register);
+
+        _size_general_data       = size_general_data     ;
+        _size_special_data       = size_special_data     ;
+        _size_general_register   = log2(nb_general_register);
+        _size_special_register   = log2(nb_special_register);
+
+        _size_load_queue_ptr     = log2(size_load_queue );
+        _size_store_queue_ptr    = log2(size_store_queue);
+   
+        _have_port_context_id    = _size_context_id    > 0;
+        _have_port_front_end_id  = _size_front_end_id  > 0;
+        _have_port_ooo_engine_id = _size_ooo_engine_id > 0;
+        _have_port_rob_ptr       = _size_rob_ptr       > 0;
+        _have_port_load_queue_ptr= _size_load_queue_ptr> 0;
+
+        copy();
+      }
+
     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
   };
   
+// #undef  FUNCTION
+// #define FUNCTION "Functionnal_unit::Parameters (copy)"
+//   Parameters::Parameters (Parameters & param):
+//     _nb_context              (param._nb_context             ),
+//     _nb_front_end            (param._nb_front_end           ),
+//     _nb_ooo_engine           (param._nb_ooo_engine          ),
+//     _nb_packet               (param._nb_packet              ),
+//     _size_general_data       (param._size_general_data      ),
+//     _nb_general_register     (param._nb_general_register    ),
+//     _size_special_data       (param._size_special_data      ),
+//     _nb_special_register     (param._nb_special_register    ),
+//     _size_store_queue        (param._size_store_queue       ),
+//     _size_load_queue         (param._size_load_queue        ),
+
+//     _size_context_id         (param._size_context_id        ),
+//     _size_front_end_id       (param._size_front_end_id      ),
+//     _size_ooo_engine_id      (param._size_ooo_engine_id     ),
+//     _size_packet_id          (param._size_packet_id         ),
+//     _size_general_register   (param._size_general_register  ),
+//     _size_special_register   (param._size_special_register  ),
+
+//     _have_port_context_id    (param._have_port_context_id   ),
+//     _have_port_front_end_id  (param._have_port_front_end_id ),
+//     _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
+//     _have_port_packet_id     (param._have_port_packet_id    ),
+//     _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
+
+//     _have_groupe_MAC         (param._have_groupe_MAC        )
+//   {
+//     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
+
+//     _timing                 = param._timing;
+//     _get_custom_information = param._get_custom_information;
+
+//     test();
+//     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
+//   };
+
 #undef  FUNCTION
-#define FUNCTION "Functionnal_unit::Parameters (copy)"
-  Parameters::Parameters (Parameters & param):
-    _nb_context              (param._nb_context             ),
-    _nb_front_end            (param._nb_front_end           ),
-    _nb_ooo_engine           (param._nb_ooo_engine          ),
-    _nb_packet               (param._nb_packet              ),
-    _size_general_data       (param._size_general_data      ),
-    _nb_general_register     (param._nb_general_register    ),
-    _size_special_data       (param._size_special_data      ),
-    _nb_special_register     (param._nb_special_register    ),
-    _size_store_queue        (param._size_store_queue       ),
-    _size_load_queue         (param._size_load_queue        ),
-
-    _size_context_id         (param._size_context_id        ),
-    _size_front_end_id       (param._size_front_end_id      ),
-    _size_ooo_engine_id      (param._size_ooo_engine_id     ),
-    _size_packet_id          (param._size_packet_id         ),
-    _size_general_register   (param._size_general_register  ),
-    _size_special_register   (param._size_special_register  ),
-
-    _have_port_context_id    (param._have_port_context_id   ),
-    _have_port_front_end_id  (param._have_port_front_end_id ),
-    _have_port_ooo_engine_id (param._have_port_ooo_engine_id),
-    _have_port_packet_id     (param._have_port_packet_id    ),
-    _have_port_load_queue_ptr(param._have_port_load_queue_ptr),
-
-    _have_groupe_MAC         (param._have_groupe_MAC        )
+#define FUNCTION "Functionnal_unit::~Parameters"
+  Parameters::~Parameters (void)
   {
     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
-
-    _timing                 = param._timing;
-    _get_custom_information = param._get_custom_information;
-
-    test();
     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
   };
 
 #undef  FUNCTION
-#define FUNCTION "Functionnal_unit::~Parameters"
-  Parameters::~Parameters () 
+#define FUNCTION "Functionnal_unit::copy"
+  void Parameters::copy (void)
   {
     log_printf(FUNC,Functionnal_unit,FUNCTION,"Begin");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_msg_error.cpp	(revision 88)
@@ -31,10 +31,10 @@
       for (uint32_t j=0; j<_nb_operation; j++)
 	if (_timing[i][j]._delay != _timing[i][j]._latence)
-	  test.error("For the type '"+toString(i)+"', and the operation '"+toString(j)+"', the delay and the latence must be equal.");
+	  test.error(toString(_("For the type '%d', and the operation '%d', the delay and the latence must be equal.\n"),i,j));
 
     if (_have_groupe_MAC and ((_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MAC  ]._latence == 0) or
 			      (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MACRC]._latence == 0) or
 			      (_timing[TYPE_SPECIAL][OPERATION_SPECIAL_L_MSB  ]._latence == 0)))
-      test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.");
+      test.error("The functionnal unit implement a MAC unit, the latence to operation OPERATION_ALU_L_MAC, OPERATION_ALU_L_MACRC and OPERATION_ALU_L_MSB must be higher than 0.\n");
 
     log_printf(FUNC,Functionnal_unit,FUNCTION,"End");
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Execute_loop/Execute_loop/Multi_Execute_unit/Execute_unit/Functionnal_unit/src/Parameters_print.cpp	(revision 88)
@@ -32,7 +32,7 @@
     xml.singleton_begin("nb_packet          "); xml.attribut("value",toString(_nb_packet          )); xml.singleton_end();
     xml.singleton_begin("size_general_data  "); xml.attribut("value",toString(_size_general_data  )); xml.singleton_end();
-    xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
+//  xml.singleton_begin("nb_general_register"); xml.attribut("value",toString(_nb_general_register)); xml.singleton_end();
     xml.singleton_begin("size_special_data  "); xml.attribut("value",toString(_size_special_data  )); xml.singleton_end();
-    xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
+//  xml.singleton_begin("nb_special_register"); xml.attribut("value",toString(_nb_special_register)); xml.singleton_end();
     xml.balise_close();
 
