Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue.cpp	(revision 3)
@@ -47,5 +47,5 @@
     _vhdl_testbench = new Vhdl_Testbench (_name);
     vhdl_testbench_port           ();
-    _vhdl_testbench->set_clock    ("in_CLOCK",true);
+    _vhdl_testbench->set_clock    ("in_CLOCK",false);
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_branch_complete_pht_address.cpp	(revision 3)
@@ -26,5 +26,5 @@
 	{
 	  // Address
-	  Taddress_t address = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
+	  Taddress_t     address = PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]);
 	  Tbht_history_t history = 0;
 	  
@@ -34,6 +34,10 @@
 	      address = address << _param._pht_size_address_shift;
 	    }
+
+	  Taddress_t     pht_address = (history ^ address) & gen_mask<Taddress_t>(_param._pht_size_address);
+
+	  log_printf(TRACE,Two_Level_Branch_Predictor_Glue,"genMealy_branch_complete_address","out_BRANCH_COMPLETE_PHT_ADDRESS [%d]= %.8x xor %.8x<<%d = %.8x",i,history,PORT_READ(in_BRANCH_COMPLETE_ADDRESS [i]),_param._pht_size_address_shift, pht_address);
 	  
-	  PORT_WRITE (out_BRANCH_COMPLETE_PHT_ADDRESS [i], (history xor address) & gen_mask<Taddress_t>(_param._pht_size_address));
+	  PORT_WRITE (out_BRANCH_COMPLETE_PHT_ADDRESS [i], pht_address);
 	}
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_genMealy_predict_bht_address.cpp	(revision 3)
@@ -26,7 +26,8 @@
 	{
 	  // Address
-	  Taddress_t address = PORT_READ(in_PREDICT_ADDRESS [i]);
+	  Taddress_t     address = PORT_READ(in_PREDICT_ADDRESS [i]);
+	  Taddress_t bht_address = range<Taddress_t>(_param._size_address, address, _param._bht_size_address);
 	  
-	  PORT_WRITE (out_PREDICT_BHT_ADDRESS [i], range<Taddress_t>(_param._size_address, address, _param._bht_size_address));
+	  PORT_WRITE (out_PREDICT_BHT_ADDRESS [i], bht_address);
 	}
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Two_Level_Branch_Predictor_Glue/src/Two_Level_Branch_Predictor_Glue_vhdl_port.cpp	(revision 3)
@@ -21,6 +21,4 @@
   {
     log_printf(FUNC,Two_Level_Branch_Predictor_Glue,"vhdl_port","Begin");
-
-    vhdl.set_port (" in_CLOCK" , IN, 1);
 
     for (uint32_t i=0; i<_param._nb_prediction; i++)
