Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/include/Types.h	(revision 117)
@@ -41,5 +41,5 @@
       CONTEXT_STATE_KO_MSYNC_EXEC                      , // wait completion of     msync  operation
 //    CONTEXT_STATE_KO_PSYNC                           , // wait completion of all        operation and after flush pipeline
-      CONTEXT_STATE_KO_PSYNC_FLUSH                     , // wait completion of all 
+      CONTEXT_STATE_KO_PSYNC_FLUSH                     , // wait completion of all
       CONTEXT_STATE_KO_PSYNC_ADDR                      , // wait completion of all 
 //    CONTEXT_STATE_KO_CSYNC                           , // wait completion of all        operation and after flush pipeline and flush ALL units (MMU, cache ...)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Context_State/src/Context_State_transition.cpp	(revision 117)
@@ -352,10 +352,12 @@
               log_printf(TRACE,Context_State,FUNCTION,"  * BRANCH_COMPLETE [%d]",i);
 
-              context_state_t state = reg_STATE [i];
+              Tcontext_t context_id = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
+
+              context_state_t state = reg_STATE [context_id];
 
               Tdepth_t   depth      = (_param->_have_port_depth)?PORT_READ(in_BRANCH_COMPLETE_DEPTH [i]):0;
-              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [i];
-              Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [i]):0;
-              Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [i];
+              Tdepth_t   depth_cur  = reg_EVENT_DEPTH [context_id];
+              Tdepth_t   depth_min  = (_param->_have_port_depth)?PORT_READ(in_DEPTH_MIN [context_id]):0;
+              Tdepth_t   depth_max  = _param->_nb_inst_branch_speculated [context_id];
               
               Tdepth_t   depth0     = (depth_cur>=depth_min)?(depth_cur-depth_min):((depth_cur+depth_max-depth_min));
@@ -375,4 +377,5 @@
                                        ((depth1==depth0) and (priority1>=priority0))); // >= because another branch can be a miss prediction with same depth
 
+              log_printf(TRACE,Context_State,FUNCTION,"    * context_id: %d",context_id);
               log_printf(TRACE,Context_State,FUNCTION,"    * depth     : %d",depth     );
               log_printf(TRACE,Context_State,FUNCTION,"    * depth_cur : %d",depth_cur );
@@ -387,7 +390,7 @@
               if (is_valid)
                 {
-//                reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
-                  reg_STATE                  [i] =  CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE;
-                  reg_EVENT_DEPTH            [i] =  depth;
+//                reg_STATE                  [context_id] =  CONTEXT_STATE_KO_MISS_BRANCH_ADDR;
+                  reg_STATE                  [context_id] =  CONTEXT_STATE_KO_MISS_BRANCH_WAIT_UPDATE;
+                  reg_EVENT_DEPTH            [context_id] =  depth;
                 }
             }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/Instruction/src/Instruction.cpp	(revision 117)
@@ -24,6 +24,6 @@
 namespace decod {
 
-#define EXTENDS(x,nb_bits) extend<Tgeneral_data_t>(32, x,true ,nb_bits)
-#define EXTENDZ(x,nb_bits) extend<Tgeneral_data_t>(32, x,false,nb_bits)
+#define EXTENDS(x,nb_bits) extend<Tgeneral_data_t>(param->_size_data, x,true ,nb_bits)
+#define EXTENDZ(x,nb_bits) extend<Tgeneral_data_t>(param->_size_data, x,false,nb_bits)
 
   void instruction_decod               (decod_instruction_t * inst, decod_param_t * param)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/SelfTest/src/test.cpp	(revision 117)
@@ -52,4 +52,76 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+  sc_signal<Tcontrol_t         > ***  in_IFETCH_VAL                         ;
+  sc_signal<Tcontrol_t         > *** out_IFETCH_ACK                         ;
+  sc_signal<Tinstruction_t     > ***  in_IFETCH_INSTRUCTION                 ;
+
+  sc_signal<Tcontext_t         >  **  in_IFETCH_CONTEXT_ID                  ;
+  sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS                     ;
+//sc_signal<Tgeneral_address_t >  **  in_IFETCH_ADDRESS_NEXT                ;
+  sc_signal<Tinst_ifetch_ptr_t >  **  in_IFETCH_INST_IFETCH_PTR             ;
+  sc_signal<Tbranch_state_t    >  **  in_IFETCH_BRANCH_STATE                ;
+  sc_signal<Tprediction_ptr_t  >  **  in_IFETCH_BRANCH_UPDATE_PREDICTION_ID ;
+  sc_signal<Texception_t       >  **  in_IFETCH_EXCEPTION                   ;
+
+  sc_signal<Tcontrol_t         >  ** out_DECOD_VAL                          ;
+  sc_signal<Tcontrol_t         >  **  in_DECOD_ACK                          ;
+  sc_signal<Tcontext_t         >  ** out_DECOD_CONTEXT_ID                   ;
+  sc_signal<Tdepth_t           >  ** out_DECOD_DEPTH                        ;
+  sc_signal<Ttype_t            >  ** out_DECOD_TYPE                         ;
+  sc_signal<Toperation_t       >  ** out_DECOD_OPERATION                    ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_NO_EXECUTE                   ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_IS_DELAY_SLOT                ;
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS                      ;
+
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_ADDRESS_NEXT                 ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_HAS_IMMEDIAT                 ;
+  sc_signal<Tgeneral_data_t    >  ** out_DECOD_IMMEDIAT                     ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RA                      ;
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RA                   ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RB                      ;
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RB                   ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_READ_RC                      ;
+  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RC                   ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RD                     ;
+  sc_signal<Tgeneral_address_t >  ** out_DECOD_NUM_REG_RD                   ;
+  sc_signal<Tcontrol_t         >  ** out_DECOD_WRITE_RE                     ;
+  sc_signal<Tspecial_address_t >  ** out_DECOD_NUM_REG_RE                   ;
+  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION_USE                ;
+  sc_signal<Texception_t       >  ** out_DECOD_EXCEPTION                    ;
+
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_VAL                        ;
+  sc_signal<Tcontrol_t         >  **  in_PREDICT_ACK                        ;
+  sc_signal<Tcontext_t         >  ** out_PREDICT_CONTEXT_ID                 ;
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_MATCH_INST_IFETCH_PTR      ;
+  sc_signal<Tbranch_state_t    >  ** out_PREDICT_BRANCH_STATE               ;
+  sc_signal<Tprediction_ptr_t  >  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID;
+  sc_signal<Tbranch_condition_t>  ** out_PREDICT_BRANCH_CONDITION           ;
+//sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_STACK_WRITE         ;
+  sc_signal<Tcontrol_t         >  ** out_PREDICT_BRANCH_DIRECTION           ;
+  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_SRC                ;
+  sc_signal<Tgeneral_data_t    >  ** out_PREDICT_ADDRESS_DEST               ;
+  sc_signal<Tcontrol_t         >  **  in_PREDICT_CAN_CONTINUE               ;
+
+  sc_signal<Tdepth_t           >  **  in_DEPTH_MIN                          ;
+  sc_signal<Tdepth_t           >  **  in_DEPTH_MAX                          ;
+  sc_signal<Tcontrol_t         >  **  in_DEPTH_FULL                         ;
+
+  sc_signal<Tcounter_t         >  ** out_NB_INST_DECOD_ALL                  ;
+
+  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DECOD_ENABLE               ;
+  sc_signal<Tcontrol_t         >  **  in_CONTEXT_DEPTH_VAL                  ;
+  sc_signal<Tdepth_t           >  **  in_CONTEXT_DEPTH                      ;
+
+  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_VAL                  ;
+  sc_signal<Tcontrol_t         >   *  in_CONTEXT_EVENT_ACK                  ;
+  sc_signal<Tcontext_t         >   * out_CONTEXT_EVENT_CONTEXT_ID           ;
+  sc_signal<Tdepth_t           >   * out_CONTEXT_EVENT_DEPTH                ;
+  sc_signal<Tevent_type_t      >   * out_CONTEXT_EVENT_TYPE                 ;
+  sc_signal<Tcontrol_t         >   * out_CONTEXT_EVENT_IS_DELAY_SLOT        ;
+  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS              ;
+  sc_signal<Tgeneral_data_t    >   * out_CONTEXT_EVENT_ADDRESS_EPCR         ;
+
+
 
   ALLOC2_SC_SIGNAL( in_IFETCH_VAL                         ," in_IFETCH_VAL                         ",Tcontrol_t         ,_param->_nb_context, _param->_nb_inst_fetch[it1]);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 115)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 117)
@@ -242,9 +242,11 @@
 
 #if defined(DEBUG) and defined(DEBUG_Update_Prediction_Table) and (DEBUG_Update_Prediction_Table == true)
+    directory_init ();
+
     branchement_log_file = new std::ofstream [_param->_nb_thread];
     for (uint32_t i=0; i<_param->_nb_thread; ++i)
       if (_param->_have_thread [i])
         {
-          std::string filename = "Branchement_prediction-thread_" + toString(i) + ".log";
+          std::string filename = MORPHEO_LOG+"/"+toString(getpid())+"-Branchement_prediction-thread_"+toString(i)+".log";
           
           branchement_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc);
