Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Parameters.cpp	(revision 124)
@@ -72,8 +72,8 @@
                              
     log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _size_history             : %d",_size_history  );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_history_mask         : 0x%x",_bht_history_mask  );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_history_shift        : %d",_bht_history_shift );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_history_mask         : 0x%x",_pht_history_mask  );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_history_shift        : %d",_pht_history_shift );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_history_mask         : 0x%llx",_bht_history_mask  );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_history_shift        : %lld",_bht_history_shift );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_history_mask         : 0x%llx",_pht_history_mask  );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_history_shift        : %lld",_pht_history_shift );
 
     _bht_init_take           = static_cast<Thistory_t>(-1)&_bht_history_mask;
@@ -82,8 +82,8 @@
     _pht_init_ntake          = _pht_init_take-1;           // size = 4 : 0111/2
 
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_init_take            : 0x%x",_bht_init_take );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_init_ntake           : 0x%x",_bht_init_ntake);
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_init_take            : 0x%x",_pht_init_take );
-    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_init_ntake           : 0x%x",_pht_init_ntake);
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_init_take            : 0x%llx",_bht_init_take );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_init_ntake           : 0x%llx",_bht_init_ntake);
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_init_take            : 0x%llx",_pht_init_take );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_init_ntake           : 0x%llx",_pht_init_ntake);
     
     if (_have_bht)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_genMealy_predict.cpp	(revision 124)
@@ -42,5 +42,5 @@
           Taddress_t address     = PORT_READ(in_PREDICT_ADDRESS   [i]);
           Thistory_t history     = 0;
-          Tcontrol_t direction;
+          Tcontrol_t direction   = 0;
 
           log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * address          : 0x%.8x",address);
@@ -58,6 +58,6 @@
               pht_bht_history = bht_history;
 
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history      : 0x%x",bht_history);
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_num_reg      : %d",bht_num_reg);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history      : 0x%llx",bht_history);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_num_reg      : %lld",bht_num_reg);
 
               history   = (bht_history << _param->_bht_history_shift )&_param->_bht_history_mask ;
@@ -73,11 +73,11 @@
               Thistory_t pht_num_reg = (pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift));
 
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history      : 0x%x",pht_bht_history);
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_reg      : %d",pht_num_reg);
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_bank     : %d",pht_num_bank);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history      : 0x%llx",pht_bht_history);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_reg      : %lld",pht_num_reg);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_bank     : %lld",pht_num_bank);
 
               Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg];
               
-              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history      : 0x%x",pht_history);
+              log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history      : 0x%llx",pht_history);
               
               history  |= (pht_history << _param->_pht_history_shift )&_param->_pht_history_mask;
@@ -92,5 +92,5 @@
 
           log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * direction        : %d",direction);
-          log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * history          : 0x%x",history);
+          log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * history          : 0x%llx",history);
 
           PORT_WRITE(out_PREDICT_DIRECTION [i],direction);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/src/Two_Level_Branch_Predictor_transition.cpp	(revision 124)
@@ -52,5 +52,5 @@
                       {
                         Thistory_t bht_num_reg = internal_PREDICT_BHT_NUM_REG [i];
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_num_reg      : %d",bht_num_reg);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_num_reg      : %lld",bht_num_reg);
 
 // #ifdef DEBUG_TEST
@@ -59,9 +59,9 @@
 
                         Thistory_t bht_history = reg_BHT[bht_num_reg];
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history (old): %x",bht_history);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history (old): %llx",bht_history);
 
                         
                         bht_history = ((bht_history<<1) | direction)&_param->_bht_history_mask ;
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history (new): %x",bht_history);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * bht_history (new): %llx",bht_history);
                         reg_BHT [bht_num_reg] = bht_history;
                       }
@@ -71,14 +71,14 @@
                         Thistory_t pht_num_reg = internal_PREDICT_PHT_NUM_REG  [i];
                         Thistory_t pht_num_bank= internal_PREDICT_PHT_NUM_BANK [i];
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_reg      : %d",pht_num_reg);
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_bank     : %d",pht_num_bank);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_reg      : %lld",pht_num_reg);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_num_bank     : %lld",pht_num_bank);
 
                         Thistory_t pht_history = reg_PHT [pht_num_bank][pht_num_reg];
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (old): %x",pht_history);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (old): %llx",pht_history);
                         
                         // PHT : saturation counter
                         pht_history = (direction==1)?((pht_history<_param->_pht_counter_max)?(pht_history+1):(pht_history)):((pht_history>0)?(pht_history-1):(pht_history));
                         
-                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (new): %x",pht_history);
+                        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * pht_history (new): %llx",pht_history);
                         
                         reg_PHT [pht_num_bank][pht_num_reg] = pht_history;
@@ -95,4 +95,5 @@
             {
               log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * UPDATE [%d]",i);
+              if (_param->_update_on_prediction)
               log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * miss             : %d",PORT_READ(in_UPDATE_MISS [i]));
               log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * update_on_predict: %d",_param->_update_on_prediction);
@@ -125,6 +126,6 @@
                       Thistory_t bht_num_reg = address & _param->_bht_address_mask;
                       
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (old): %x",bht_history);
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_num_reg      : %x",bht_num_reg);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (old): %llx",bht_history);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_num_reg      : %llx",bht_num_reg);
                       
                       // BHT : shift register
@@ -139,5 +140,5 @@
                         
                       pht_bht_history = bht_history;
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (new): %x",bht_history);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (new): %llx",bht_history);
 
 // #ifdef DEBUG_TEST
@@ -156,8 +157,8 @@
                       Thistory_t pht_num_reg = pht_bht_history xor ((address&_param->_pht_address_share_mask)<<_param->_pht_address_share_shift);
                       
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (old): %x",pht_bht_history);
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_history (old): %x",pht_history);
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_num_reg      : %x",pht_num_reg);
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_num_bank     : %x",pht_num_bank);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * bht_history (old): %llx",pht_bht_history);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_history (old): %llx",pht_history);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_num_reg      : %llx",pht_num_reg);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_num_bank     : %llx",pht_num_bank);
                       
                       // PHT : saturation counter
@@ -171,5 +172,5 @@
 			}
                       
-                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_history (new): %x",pht_history);
+                      log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"    * pht_history (new): %llx",pht_history);
                       
                       reg_PHT [pht_num_bank][pht_num_reg] = pht_history;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 124)
@@ -141,12 +141,12 @@
 	  }
 	
-# ifdef SYSTEMCASS_SPECIFIC
-	// List dependency information
-	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
-	  {
-	    if (_param->_have_port_context_id)
-	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID  [i]));
-	  }
-# endif    
+// # ifdef SYSTEMCASS_SPECIFIC
+// 	// List dependency information
+// 	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
+// 	  {
+// 	    if (_param->_have_port_context_id)
+// 	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID  [i]));
+// 	  }
+// # endif    
 
 	log_printf(INFO,Update_Prediction_Table,FUNCTION,"Method - genMealy_branch_complete");
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 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 124)
@@ -258,6 +258,6 @@
                                                    "",
                                                    "log",
-                                                   false,
-                                                   log_with_pid,
+                                                   _simulation_file_with_date,
+                                                   _simulation_file_with_pid,
                                                    true);
           
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 123)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 124)
@@ -120,6 +120,6 @@
                           branchement_log_file [num_thread] 
                             << std::hex
-                            << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src       << " "
-                            << "0x" << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest      << " "
+                            << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_src  << " "
+                            << "0x" << std::setfill('0') << std::setw(_param->_size_general_data/4) << reg_UPDATE_PREDICTION_TABLE [i][bottom]._address_dest << " "
                             << std::dec
                             <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._good_take         << " - "
@@ -127,5 +127,5 @@
                             <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._miss_prediction   << " "
                             <<         reg_UPDATE_PREDICTION_TABLE [i][bottom]._ifetch_prediction << " "
-                            << "("  << (uint32_t)reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition         << ")"
+                            << "("  << toString(reg_UPDATE_PREDICTION_TABLE [i][bottom]._condition) << ")"
                             << std::endl;
                         }
@@ -671,5 +671,5 @@
                         log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * top_state           : %s",toString(top_state).c_str());
                         
-                        bool              previous_ufpt_event = (reg_UFPT_EVENT_STATE [i] == UFPT_EVENT_STATE_KO_FLUSH);
+                        bool              previous_ufpt_event = (reg_UFPT_EVENT_STATE [context] == UFPT_EVENT_STATE_KO_FLUSH);
                         
                         
@@ -1166,5 +1166,6 @@
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UFPT_NB_UPDATE      : %d",reg_UFPT_NB_UPDATE      [i]);
 	for (uint32_t j=0; j<_param->_size_ufpt_queue[i]; j++)
-	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d   %.1d, %.8d %.8x (%.8x) %.4d - %s",
+          {
+	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d   %.1d, %.8lld %.8x (%.8x) %.4d - %s",
                      j,
                      reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._condition,
@@ -1181,4 +1182,5 @@
                      toString(reg_UPDATE_FETCH_PREDICTION_TABLE [i][j]._state).c_str()
                      );
+          }
 
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * Dump UPT [%d] (Update_Prediction_Table)",i);
@@ -1189,5 +1191,5 @@
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      * reg_UPT_EMPTY           : %d",reg_UPT_EMPTY          [i]);
 	for (uint32_t j=0; j<_param->_size_upt_queue[i]; j++)
-	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8d %.8x (%.8x) %.4d - %s",
+	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"        [%d] %.4d, %.8x (%.8x) %.8x (%.8x), %.1d %.1d %.1d, %.8lld %.8x (%.8x) %.4d - %s",
                      j,
                      reg_UPDATE_PREDICTION_TABLE [i][j]._condition,
