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 112)
+++ 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 115)
@@ -57,18 +57,25 @@
     //  MSB : pht_history
     //  LSB : bht_history
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _have_bht                 : %d",_have_bht        );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_size_shifter         : %d",_bht_size_shifter);
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _bht_nb_shifter           : %d",_bht_nb_shifter  );
+
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _have_pht                 : %d",_have_pht        );
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_size_counter         : %d",_pht_size_counter);
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_nb_counter           : %d",_pht_nb_counter  );
                        
     _size_history            = _bht_size_shifter + _pht_size_counter;
     _bht_history_mask        = gen_mask<Thistory_t>(_bht_size_shifter);
-    _bht_history_rshift      = 0;
+    _bht_history_shift       = 0;
     _pht_history_mask        = gen_mask<Thistory_t>(_pht_size_counter);
-    _pht_history_rshift      = _bht_size_shifter;
+    _pht_history_shift       = _bht_size_shifter;
                              
     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_rshift       : %d",_bht_history_rshift);
+    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_rshift       : %d",_pht_history_rshift);
+    log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_history_shift        : %d",_pht_history_shift );
 
-    _bht_init_take           = (Thistory_t)(-1)&_bht_history_mask;
+    _bht_init_take           = static_cast<Thistory_t>(-1)&_bht_history_mask;
     _bht_init_ntake          = 0;
     _pht_init_take           = (1<<(_pht_size_counter-1)); // size = 4 : 1000/2
@@ -91,18 +98,26 @@
         _pht_counter_max         = (1<<_pht_size_counter)-1;
         
-        _pht_nb_bank             = (_pht_nb_counter - (1<<_bht_size_shifter))+1;
-        _pht_size_bank           = _pht_nb_counter / _pht_nb_bank;
+        _pht_size_bank           = (_have_bht)?(1<<_bht_size_shifter):1;
+        _pht_nb_bank             = _pht_nb_counter / _pht_size_bank;
+
+	// -------->|
+	//   +---+  |
+	//   |   |  |--->
+	// ---> --->|
+	//   |   |  |
+	//   +---+
+	//
 
         _pht_address_share_mask  = gen_mask<Taddress_t>(_pht_size_address_share);
-        _pht_address_share_lshift= _bht_size_shifter-_pht_size_address_share;
+        _pht_address_share_shift = _bht_size_shifter-_pht_size_address_share;
         _pht_address_bank_mask   = gen_mask<Taddress_t>(log2(_pht_nb_bank));
-        _pht_address_bank_rshift = _pht_size_address_share;
+        _pht_address_bank_shift  = _pht_size_address_share;
 
         log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_nb_bank              : %d"  ,_pht_nb_bank   );
         log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_size_bank            : %d"  ,_pht_size_bank );
         log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_share_mask   : 0x%x",_pht_address_share_mask  );
-        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_share_lshift : %d"  ,_pht_address_share_lshift);
+        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_share_shift  : %d"  ,_pht_address_share_shift );
         log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_bank_mask    : 0x%x",_pht_address_bank_mask   );
-        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_bank_rshift  : %d"  ,_pht_address_bank_rshift );
+        log_printf(TRACE,Two_Level_Branch_Predictor,FUNCTION,"  * _pht_address_bank_shift   : %d"  ,_pht_address_bank_shift  );
       }
 
