Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_decod.cpp	(revision 98)
@@ -22,24 +22,46 @@
   void Branch_Target_Buffer_Glue::genMealy_decod (void)
   {
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
+    log_begin(Branch_Target_Buffer_Glue,FUNCTION);
+    log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
       {
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"  * DECOD [%d]",i);
 	Tcontrol_t val          = PORT_READ(in_DECOD_VAL          [i]);
 	Tcontrol_t register_ack = PORT_READ(in_DECOD_REGISTER_ACK [i]);
 	Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_DECOD_VICTIM_ACK [i]):true;
 	
-	PORT_WRITE(out_DECOD_ACK            [i],         register_ack and victim_ack);
-	PORT_WRITE(out_DECOD_REGISTER_VAL   [i], val and                  victim_ack);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d", val         );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d", register_ack);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d", victim_ack  );
 
+	PORT_WRITE(out_DECOD_ACK            [i], (
+//                                                val          and
+                                                  register_ack and 
+                                                  victim_ack
+                                                  ));
+        PORT_WRITE(out_DECOD_REGISTER_VAL   [i], (
+                                                  val          and
+//                                                register_ack and 
+                                                  victim_ack
+                                                  ));
 	if (_param->_have_port_victim)
 	  {
-	PORT_WRITE(out_DECOD_VICTIM_VAL     [i], val and register_ack );
+	PORT_WRITE(out_DECOD_VICTIM_VAL     [i], (
+                                                  val          and
+                                                  register_ack // and 
+//                                                victim_ack
+                                                  ));
 	if (not _param->_is_full_associative)
-	PORT_WRITE(out_DECOD_VICTIM_ADDRESS [i], (PORT_READ(in_DECOD_ADDRESS_SRC [i]) >> _param->_shift_bank)&_param->_mask_bank);
+          {
+            Tgeneral_data_t address_src = PORT_READ(in_DECOD_ADDRESS_SRC [i]);
+            log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * address_src  : %.8x", address_src);
+            
+            PORT_WRITE(out_DECOD_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank);
+          }
 	  }
       }
 
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
+    log_end(Branch_Target_Buffer_Glue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_predict.cpp	(revision 98)
@@ -22,15 +22,21 @@
   void Branch_Target_Buffer_Glue::genMealy_predict (void)
   {
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
+    log_begin(Branch_Target_Buffer_Glue,FUNCTION);
+    log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
     for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
       {
-	Tptr_t          index = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_INDEX [i]):0;
-	Tcontrol_t      hit   = PORT_READ(in_PREDICT_REGISTER_HIT         [i][index]);
-	Tgeneral_data_t addr  = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"  * PREDICT [%d]",i);
+	Tptr_t          index       = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_INDEX [i]):0;
+	Tcontrol_t      hit         = PORT_READ(in_PREDICT_REGISTER_HIT         [i][index]);
+	Tgeneral_data_t address_src = PORT_READ(in_PREDICT_REGISTER_ADDRESS_SRC [i][index]);
+
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * index        : %d"  ,index      );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * hit          : %d"  ,hit        );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * address_src  : %.8x",address_src);
 
 	// Multiplexor
 	PORT_WRITE(out_PREDICT_HIT          [i],hit);
-	PORT_WRITE(out_PREDICT_ADDRESS_SRC  [i],addr);
+	PORT_WRITE(out_PREDICT_ADDRESS_SRC  [i],address_src);
 	PORT_WRITE(out_PREDICT_ADDRESS_DEST [i],PORT_READ(in_PREDICT_REGISTER_ADDRESS_DEST  [i][index]));
 	PORT_WRITE(out_PREDICT_CONDITION    [i],PORT_READ(in_PREDICT_REGISTER_CONDITION     [i][index]));
@@ -42,19 +48,39 @@
 	Tcontrol_t sort_val     = (_param->_have_port_victim)?PORT_READ(in_PREDICT_SORT_VAL   [i]):true;
 	Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_PREDICT_VICTIM_ACK [i]):true;
+
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * sort_val     : %d",sort_val    );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
 	
-	PORT_WRITE(out_PREDICT_ACK            [i],         register_ack and sort_val and victim_ack);
-	PORT_WRITE(out_PREDICT_REGISTER_VAL   [i], val and                  sort_val and victim_ack);
+	PORT_WRITE(out_PREDICT_ACK            [i], (
+//                                                  val          and 
+                                                    register_ack and
+                                                    sort_val     and
+                                                    victim_ack
+                                                    ));
+	PORT_WRITE(out_PREDICT_REGISTER_VAL   [i], (
+                                                    val          and 
+//                                                  register_ack and
+                                                    sort_val     and
+                                                    victim_ack
+                                                    ));
 
 	if (_param->_have_port_victim)
 	  {
-	PORT_WRITE(out_PREDICT_VICTIM_VAL     [i], val and register_ack and sort_val               );
+	PORT_WRITE(out_PREDICT_VICTIM_VAL     [i], (
+                                                    val          and 
+                                                    register_ack and
+                                                    sort_val     // and
+//                                                  victim_ack
+                                                    ));
 	PORT_WRITE(out_PREDICT_VICTIM_HIT     [i], hit);
 	if (not _param->_is_full_associative)
-	PORT_WRITE(out_PREDICT_VICTIM_ADDRESS [i], (addr >> _param->_shift_bank)&_param->_mask_bank);
+	PORT_WRITE(out_PREDICT_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank);
 	PORT_WRITE(out_PREDICT_VICTIM_INDEX   [i], index);
 	  }
       }
 
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
+    log_end(Branch_Target_Buffer_Glue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Branch_Target_Buffer_Glue_genMealy_update.cpp	(revision 98)
@@ -22,11 +22,18 @@
   void Branch_Target_Buffer_Glue::genMealy_update (void)
   {
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"Begin");
+    log_begin(Branch_Target_Buffer_Glue,FUNCTION);
+    log_function(Branch_Target_Buffer_Glue,FUNCTION,_name.c_str());
 
     for (uint32_t i=0; i<_param->_nb_inst_update; i++)
       {
-	Tcontrol_t val          = PORT_READ(in_UPDATE_VAL          [i]);
-	Tcontrol_t register_ack = PORT_READ(in_UPDATE_REGISTER_ACK [i]);
-	Tcontrol_t victim_ack   = (_param->_have_port_victim)?PORT_READ(in_UPDATE_VICTIM_ACK [i]):true;
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"  * UPDATE [%d]",i);
+
+	Tcontrol_t      val          = PORT_READ(in_UPDATE_VAL          [i]);
+	Tcontrol_t      register_ack = PORT_READ(in_UPDATE_REGISTER_ACK [i]);
+	Tcontrol_t      victim_ack   = (_param->_have_port_victim)?PORT_READ(in_UPDATE_VICTIM_ACK [i]):true;
+
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * val          : %d",val         );
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * register_ack : %d",register_ack);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * victim_ack   : %d",victim_ack  );
 	
 	PORT_WRITE(out_UPDATE_ACK            [i],         register_ack and victim_ack);
@@ -37,9 +44,14 @@
 	PORT_WRITE(out_UPDATE_VICTIM_VAL     [i], val and register_ack );
 	if (not _param->_is_full_associative)
-	PORT_WRITE(out_UPDATE_VICTIM_ADDRESS [i], (PORT_READ(in_UPDATE_ADDRESS_SRC [i]) >> _param->_shift_bank)&_param->_mask_bank);
+          {
+        Tgeneral_data_t address_src  = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
+        log_printf(TRACE,Branch_Target_Buffer_Glue,FUNCTION,"    * address_src  : %.8x",address_src);
+
+	PORT_WRITE(out_UPDATE_VICTIM_ADDRESS [i], (address_src >> _param->_shift_bank)&_param->_mask_bank);
+          }
 	  }
       }
 
-    log_printf(FUNC,Branch_Target_Buffer_Glue,FUNCTION,"End");
+    log_end(Branch_Target_Buffer_Glue,FUNCTION);
   };
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/src/Parameters.cpp	(revision 98)
@@ -48,5 +48,5 @@
 
     _mask_bank              = gen_mask<Tgeneral_data_t> (_size_victim_address);
-    _shift_bank             = log2(max_nb_instruction)+2;
+    _shift_bank             = log2(max_nb_instruction);
 
     test();
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters.cpp	(revision 88)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Parameters.cpp	(revision 98)
@@ -60,5 +60,5 @@
     _mask_offset  = gen_mask<Tgeneral_data_t> (size_offset);
     _mask_bank    = gen_mask<Tgeneral_data_t> (size_bank  );
-    _shift_offset = 2;
+    _shift_offset = 0;
     _shift_bank   = _shift_offset+size_offset;
     _shift_tag    = _shift_bank  +size_bank  ;
