Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp	(revision 2)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Stage_1_Ifetch/Predictor/Meta_Predictor/Two_Level_Branch_Predictor/Pattern_History_Table/SelfTest/src/test.cpp	(revision 3)
@@ -43,14 +43,14 @@
    *********************************************************************/
   sc_clock                                 CLOCK ("clock", 1.0, 0.5);
-  sc_signal<Tcontrol_t>                    PREDICT_VAL             [param._nb_prediction];
-  sc_signal<Tcontrol_t>                    PREDICT_ACK             [param._nb_prediction];
-  sc_signal<Taddress_t>                    PREDICT_ADDRESS         [param._nb_prediction];
-  sc_signal<Thistory_t>                    PREDICT_HISTORY         [param._nb_prediction];
-				           
-  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_VAL     [param._nb_branch_complete];
-  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_ACK     [param._nb_branch_complete];
-  sc_signal<Taddress_t>                    BRANCH_COMPLETE_ADDRESS [param._nb_branch_complete];
-  sc_signal<Thistory_t>                    BRANCH_COMPLETE_HISTORY [param._nb_branch_complete];
-  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_HIT     [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    PREDICT_VAL               [param._nb_prediction];
+  sc_signal<Tcontrol_t>                    PREDICT_ACK               [param._nb_prediction];
+  sc_signal<Taddress_t>                    PREDICT_ADDRESS           [param._nb_prediction];
+  sc_signal<Thistory_t>                    PREDICT_HISTORY           [param._nb_prediction];
+				           			     
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_VAL       [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_ACK       [param._nb_branch_complete];
+  sc_signal<Taddress_t>                    BRANCH_COMPLETE_ADDRESS   [param._nb_branch_complete];
+  sc_signal<Thistory_t>                    BRANCH_COMPLETE_HISTORY   [param._nb_branch_complete];
+  sc_signal<Tcontrol_t>                    BRANCH_COMPLETE_DIRECTION [param._nb_branch_complete];
   
   /********************************************************
@@ -72,9 +72,9 @@
   for (uint32_t i=0; i<param._nb_branch_complete; i++)
     {
-      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL     [i]))        (BRANCH_COMPLETE_VAL     [i]);
-      (*(_Pattern_History_Table->out_BRANCH_COMPLETE_ACK     [i]))        (BRANCH_COMPLETE_ACK     [i]);
-      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS [i]))        (BRANCH_COMPLETE_ADDRESS [i]);
-      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY [i]))        (BRANCH_COMPLETE_HISTORY [i]);
-      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_HIT     [i]))        (BRANCH_COMPLETE_HIT     [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_VAL       [i]))        (BRANCH_COMPLETE_VAL       [i]);
+      (*(_Pattern_History_Table->out_BRANCH_COMPLETE_ACK       [i]))        (BRANCH_COMPLETE_ACK       [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_ADDRESS   [i]))        (BRANCH_COMPLETE_ADDRESS   [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_HISTORY   [i]))        (BRANCH_COMPLETE_HISTORY   [i]);
+      (*(_Pattern_History_Table-> in_BRANCH_COMPLETE_DIRECTION [i]))        (BRANCH_COMPLETE_DIRECTION [i]);
     }
 
@@ -105,12 +105,12 @@
   Thistory_t history_max              = (1<<param._size_counter)-1;
   Thistory_t history                  = 0;
-  Tcontrol_t hit                      = 0;
+  Tcontrol_t direction                = 0;
 
   while (address<param._nb_counter)
     {
-      BRANCH_COMPLETE_VAL     [0].write(1);
-      BRANCH_COMPLETE_ADDRESS [0].write(address);
-      BRANCH_COMPLETE_HISTORY [0].write(0);
-      BRANCH_COMPLETE_HIT     [0].write(0);
+      BRANCH_COMPLETE_VAL       [0].write(1);
+      BRANCH_COMPLETE_ADDRESS   [0].write(address);
+      BRANCH_COMPLETE_HISTORY   [0].write(0);
+      BRANCH_COMPLETE_DIRECTION [0].write(0);
 
       sc_start(1);
@@ -133,16 +133,16 @@
       address                  = rand() % param._nb_counter        ;
       history                  = rand() % (1<<param._size_counter) ;
-      hit                      = rand() % 2;
+      direction                = rand() % 2;
 
       cout << "{"+toString(static_cast<uint32_t>(sc_simulation_time()))+"} ["+toString(num_port_branch_complete)+"]" << endl
 	   << hex
-	   << " - address     : " << address << endl
-	   << " - history old : " << history << endl
-	   << " - hit         : " << hit     << endl;
+	   << " - address     : " << address   << endl
+	   << " - history old : " << history   << endl
+	   << " - direction   : " << direction << endl;
 
-      BRANCH_COMPLETE_VAL     [num_port_branch_complete].write(1);
-      BRANCH_COMPLETE_ADDRESS [num_port_branch_complete].write(address);
-      BRANCH_COMPLETE_HISTORY [num_port_branch_complete].write(history);
-      BRANCH_COMPLETE_HIT     [num_port_branch_complete].write(hit);
+      BRANCH_COMPLETE_VAL       [num_port_branch_complete].write(1);
+      BRANCH_COMPLETE_ADDRESS   [num_port_branch_complete].write(address);
+      BRANCH_COMPLETE_HISTORY   [num_port_branch_complete].write(history);
+      BRANCH_COMPLETE_DIRECTION [num_port_branch_complete].write(direction);
 
       // Wait Ack
@@ -157,5 +157,5 @@
       PREDICT_ADDRESS         [num_port_predict        ].write(address);
       
-      history                  = (hit==1)?((history<history_max)?history+1:history):((history>0)?history-1:history);
+      history                  = (direction==1)?((history<history_max)?history+1:history):((history>0)?history-1:history);
       
       // Wait Ack
