Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config.cfg	(revision 82)
@@ -0,0 +1,8 @@
+Branch_Target_Buffer_Glue
+1	4	*4	# max_nb_instruction
+4	16	*4	# size_buffer       
+1	4	*4	# associativity     
+32	32	*4	# size_address      
+1	4	*4	# nb_inst_predict   
+1	4	*4	# nb_inst_decod     
+1	4	*4	# nb_inst_update    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_example
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_example	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_example	(revision 82)
@@ -0,0 +1,8 @@
+Branch_Target_Buffer_Glue
+1	4	*4	# max_nb_instruction
+4	16	*4	# size_buffer       
+1	4	*4	# associativity     
+32	32	*4	# size_address      
+1	4	*4	# nb_inst_predict   
+1	4	*4	# nb_inst_decod     
+1	4	*4	# nb_inst_update    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_min.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/config_min.cfg	(revision 82)
@@ -0,0 +1,8 @@
+Branch_Target_Buffer_Glue
+1	1	*4	# max_nb_instruction
+1	1 	*4	# size_buffer       
+1	1	*4	# associativity     
+32	32	*4	# size_address      
+1	1	*4	# nb_inst_predict   
+1	1	*4	# nb_inst_decod     
+1	1	*4	# nb_inst_update    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/configuration.cfg	(revision 81)
+++ 	(revision )
@@ -1,8 +1,0 @@
-Branch_Target_Buffer_Glue
-1	4	*4	# max_nb_instruction
-4	16	*4	# size_buffer       
-1	4	*4	# associativity     
-32	32	*4	# size_address      
-1	4	*4	# nb_inst_predict   
-1	4	*4	# nb_inst_decod     
-1	4	*4	# nb_inst_update    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/src/test.cpp	(revision 82)
@@ -7,38 +7,10 @@
  */
 
+#define NB_ITERATION  1
+#define CYCLE_MAX     (128*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/SelfTest/include/test.h"
 #include "Common/include/Test.h"
 #include "Behavioural/include/Allocation.h"
-
-#define NB_ITERATION  1
-#define CYCLE_MAX     (128*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)                                                       \
-  do									             \
-    {									             \
-      /*cout << "SC_START (begin)" << endl;*/				             \
-									             \
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
-      if (cycle_offset != 0)						             \
-	{								             \
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
-	}								             \
-									             \
-      if (cycle_current > CYCLE_MAX)					             \
-	{								             \
-	  TEST_KO("Maximal cycles Reached");				             \
-	}								             \
-									             \
-      sc_start(cycle_offset);						             \
-									             \
-      /*cout << "SC_START (end  )" << endl;*/				             \
-    } while(0)
 
 void test (string name,
@@ -51,9 +23,11 @@
 #endif
 
-  Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue (name.c_str(),
+  Branch_Target_Buffer_Glue * _Branch_Target_Buffer_Glue = new Branch_Target_Buffer_Glue 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
-#endif
-					     _param);
+     _parameters_statistics,
+#endif
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Glue/include/Branch_Target_Buffer_Glue.h	(revision 82)
@@ -139,5 +139,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Branch_Target_Buffer_Glue             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_min.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/config_min.cfg	(revision 82)
@@ -0,0 +1,10 @@
+Branch_Target_Buffer_Register
+1	1	+1	# nb_context     
+1 	1  	*2	# nb_instruction [0] [nb_context]
+1 	1	*4	# size_buffer    
+1 	1	*4	# associativity  
+32	32	*2	# size_address   
+2	2	+1	# size_counter   
+1	1	*4	# nb_inst_predict
+1	1	*4	# nb_inst_decod  
+1	1  	*4	# nb_inst_commit 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/src/test.cpp	(revision 82)
@@ -7,40 +7,11 @@
  */
 
+#define NB_ITERATION  1024
+#define CYCLE_MAX     (128*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/SelfTest/include/test.h"
 #include "Common/include/Test.h"
 #include "Common/include/BitManipulation.h"
 #include "Behavioural/include/Allocation.h"
-
-#define NB_ITERATION  1024
-#define CYCLE_MAX     (128*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)                                                       \
-  do									             \
-    {									             \
-      /*cout << "SC_START (begin)" << endl;*/				             \
-									             \
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
-      if (cycle_offset != 0)						             \
-	{								             \
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
-	}								             \
-									             \
-      if (cycle_current > CYCLE_MAX)					             \
-	{								             \
-	  TEST_KO("Maximal cycles Reached");				             \
-	}								             \
-									             \
-      sc_start(cycle_offset);						             \
-									             \
-      /*cout << "SC_START (end  )" << endl;*/				             \
-    } while(0)
-
 
   class entry_t
@@ -120,9 +91,11 @@
 #endif
 
-  Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register (name.c_str(),
+  Branch_Target_Buffer_Register * _Branch_Target_Buffer_Register = new Branch_Target_Buffer_Register 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
+     _parameters_statistics,
 #endif
-					     _param);
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
@@ -156,4 +129,5 @@
   ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE       ," in_DECOD_LAST_TAKE       ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t         ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE     ," in_DECOD_IS_ACCURATE     ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_UPDATE_VAL            ," in_UPDATE_VAL            ",Tcontrol_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL(out_UPDATE_ACK            ,"out_UPDATE_ACK            ",Tcontrol_t         ,_param->_nb_inst_update);
@@ -191,9 +165,10 @@
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VAL             ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_ACK             ,_param->_nb_inst_decod);
+  if (_param->_have_port_victim)
+    {
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT             ,_param->_nb_inst_decod);
-  if (_param->_have_port_victim)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_DECOD_HIT_INDEX       ,_param->_nb_inst_decod);
-  if (_param->_have_port_victim)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_VICTIM          ,_param->_nb_inst_decod);
+    }
   if (_param->_have_port_context_id)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_CONTEXT_ID      ,_param->_nb_inst_decod);
@@ -203,12 +178,14 @@
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod);
 
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VAL            ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_ACK            ,_param->_nb_inst_update);
+  if (_param->_have_port_victim)
+    {
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT            ,_param->_nb_inst_update);
-  if (_param->_have_port_victim)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register,out_UPDATE_HIT_INDEX      ,_param->_nb_inst_update);
-  if (_param->_have_port_victim)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_VICTIM         ,_param->_nb_inst_update);
+    }
   if (_param->_have_port_context_id)
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer_Register, in_UPDATE_CONTEXT_ID     ,_param->_nb_inst_update);
@@ -297,4 +274,5 @@
 	  in_DECOD_LAST_TAKE       [i]->write(rand()%2);
 	  in_DECOD_MISS_PREDICTION [i]->write(rand()%2);
+	  in_DECOD_IS_ACCURATE     [i]->write(rand()%2);
 	}
 
@@ -478,4 +456,5 @@
   delete []  in_DECOD_LAST_TAKE       ;
   delete []  in_DECOD_MISS_PREDICTION ;
+  delete []  in_DECOD_IS_ACCURATE     ;
   delete []  in_UPDATE_VAL            ;
   delete [] out_UPDATE_ACK            ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h	(revision 82)
@@ -87,4 +87,5 @@
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_LAST_TAKE       ; //[nb_inst_decod]
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION ; //[nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IS_ACCURATE     ; //[nb_inst_decod]
 
     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -134,5 +135,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Branch_Target_Buffer_Register             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register.cpp	(revision 82)
@@ -139,4 +139,6 @@
 # endif
 
+	if (_param->_have_port_victim)
+	  {
 	log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_decod");
 
@@ -161,14 +163,14 @@
 	    (*(out_DECOD_HIT [i])) (*(in_DECOD_CONTEXT_ID  [i]));
 
-	    if (_param->_have_port_victim)
-	      {
 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_VAL         [i]));
 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_ADDRESS_SRC [i]));
 	    if (_param->_have_port_context_id)
 	    (*(out_DECOD_HIT_INDEX [i])) (*(in_DECOD_CONTEXT_ID  [i]));
-	      }
-	  }
-#endif
-
+	  }
+	  }
+#endif
+
+	if (_param->_have_port_victim)
+	  {
 	log_printf(INFO,Branch_Target_Buffer_Register,FUNCTION,"Method - genMealy_update");
 
@@ -193,11 +195,9 @@
 	    (*(out_UPDATE_HIT [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
 
-	    if (_param->_have_port_victim)
-	      {
 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_VAL         [i]));
 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_ADDRESS_SRC [i]));
 	    if (_param->_have_port_context_id)
 	    (*(out_UPDATE_HIT_INDEX [i])) (*(in_UPDATE_CONTEXT_ID  [i]));
-	      }
+	  }
 	  }
 # endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_allocation.cpp	(revision 82)
@@ -84,7 +84,10 @@
       ALLOC1_VALACK_IN ( in_DECOD_VAL            ,VAL);
       ALLOC1_VALACK_OUT(out_DECOD_ACK            ,ACK);
+      if (_param->_have_port_victim)
+	{
       ALLOC1_SIGNAL_OUT(out_DECOD_HIT            ,"hit"            ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_OUT(out_DECOD_HIT_INDEX      ,"hit_index"      ,Tptr_t             ,_param->_size_victim);
       ALLOC1_SIGNAL_IN ( in_DECOD_VICTIM         ,"victim"         ,Tptr_t             ,_param->_size_victim);
+	}
       ALLOC1_SIGNAL_IN ( in_DECOD_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
       ALLOC1_SIGNAL_IN ( in_DECOD_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
@@ -93,4 +96,5 @@
       ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
+      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
     }
 
@@ -101,7 +105,10 @@
       ALLOC1_VALACK_IN ( in_UPDATE_VAL            ,VAL);
       ALLOC1_VALACK_OUT(out_UPDATE_ACK            ,ACK);
+      if (_param->_have_port_victim)
+	{
       ALLOC1_SIGNAL_OUT(out_UPDATE_HIT            ,"hit"            ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_OUT(out_UPDATE_HIT_INDEX      ,"hit_index"      ,Tptr_t             ,_param->_size_victim);
       ALLOC1_SIGNAL_IN ( in_UPDATE_VICTIM         ,"victim"         ,Tptr_t             ,_param->_size_victim);
+	}
       ALLOC1_SIGNAL_IN ( in_UPDATE_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
       ALLOC1_SIGNAL_IN ( in_UPDATE_ADDRESS_SRC    ,"address_src"    ,Tgeneral_data_t    ,_param->_size_address);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_deallocation.cpp	(revision 82)
@@ -54,4 +54,5 @@
 	delete []  in_DECOD_LAST_TAKE       ;
 	delete []  in_DECOD_MISS_PREDICTION ;
+	delete []  in_DECOD_IS_ACCURATE     ;
 	delete []  in_UPDATE_VAL            ;
 	delete [] out_UPDATE_ACK            ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_decod.cpp	(revision 82)
@@ -48,7 +48,9 @@
 	internal_DECOD_NUM_ENTRY [i] = num_entry;
 
+	if (_param->_have_port_victim)
+	  {
 	PORT_WRITE(out_DECOD_HIT       [i], hit);
-	if (_param->_have_port_victim)
 	PORT_WRITE(out_DECOD_HIT_INDEX [i], num_entry);
+	  }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_genMealy_update.cpp	(revision 82)
@@ -48,7 +48,9 @@
 	internal_UPDATE_NUM_ENTRY [i] = num_entry;
 
+	if (_param->_have_port_victim)
+	  {
 	PORT_WRITE(out_UPDATE_HIT [i], hit);
-	if (_param->_have_port_victim)
 	PORT_WRITE(out_UPDATE_HIT_INDEX [i], num_entry);
+	  }
       }
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/src/Branch_Target_Buffer_Register_transition.cpp	(revision 82)
@@ -32,4 +32,10 @@
     else
       {
+	if (not _param->_have_port_victim)
+	  {
+	    genMealy_decod  ();
+	    genMealy_update ();
+	  }
+
 	// =======================================================
 	// =====[ PREDICT ]=======================================
@@ -66,5 +72,5 @@
 		  reg_BTB[num_bank][num_entry]._condition        = cond;
 		  reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_DECOD_LAST_TAKE    [i]);
-		  reg_BTB[num_bank][num_entry]._accurate         = _param->_first_accurate_if_hit;
+		  reg_BTB[num_bank][num_entry]._accurate         = (PORT_READ(in_DECOD_IS_ACCURATE [i]))?_param->_first_accurate_if_hit:_param->_first_accurate_if_miss;
 		}
 	      // else (hit) : no update -> it's not the last result of the branch
@@ -116,15 +122,18 @@
 
 		  accurate_new =  (miss_pred)?_param->_first_accurate_if_miss:_param->_first_accurate_if_hit;
+
+		  reg_BTB[num_bank][num_entry]._val              = 1;
+		  reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
+		  reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
+		  reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
+		  reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
 		}
 
 	      // =====[ All Case ]
-	      reg_BTB[num_bank][num_entry]._val              = 1;
-	      reg_BTB[num_bank][num_entry]._context          = (_param->_have_port_context_id)?PORT_READ(in_UPDATE_CONTEXT_ID [i]):0;
-	      reg_BTB[num_bank][num_entry]._address_src      = PORT_READ(in_UPDATE_ADDRESS_SRC  [i]);
-	      reg_BTB[num_bank][num_entry]._condition        = PORT_READ(in_UPDATE_CONDITION    [i]);
-
-	      reg_BTB[num_bank][num_entry]._address_dest_val = 1;
-	      reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
-	      reg_BTB[num_bank][num_entry]._last_take        = PORT_READ(in_UPDATE_LAST_TAKE    [i]);
+	      if (reg_BTB[num_bank][num_entry]._address_dest_val == 0)
+		{
+		  reg_BTB[num_bank][num_entry]._address_dest_val = 1;
+		  reg_BTB[num_bank][num_entry]._address_dest     = PORT_READ(in_UPDATE_ADDRESS_DEST [i]);
+		}
 	      reg_BTB[num_bank][num_entry]._accurate         = accurate_new;
 	    }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_min.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/config_min.cfg	(revision 82)
@@ -0,0 +1,11 @@
+Branch_Target_Buffer
+1	1	+1	# nb_context     
+1 	1   	*2	# nb_instruction [0] [nb_context]
+1 	1 	*4	# size_buffer    
+1 	1 	*4	# associativity  
+32	32	*2	# size_address   
+2	2	+1	# size_counter   
+1	1	*4	# nb_inst_predict
+1	1	*4	# nb_inst_decod  
+1	1  	*4	# nb_inst_commit 
+3	3	+1	# victim_scheme
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/src/test.cpp	(revision 82)
@@ -7,38 +7,10 @@
  */
 
+#define NB_ITERATION  1024
+#define CYCLE_MAX     (128*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/SelfTest/include/test.h"
 #include "Common/include/Test.h"
 #include "Behavioural/include/Allocation.h"
-
-#define NB_ITERATION  1024
-#define CYCLE_MAX     (128*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)                                                       \
-  do									             \
-    {									             \
-      /*cout << "SC_START (begin)" << endl;*/				             \
-									             \
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
-      if (cycle_offset != 0)						             \
-	{								             \
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
-	}								             \
-									             \
-      if (cycle_current > CYCLE_MAX)					             \
-	{								             \
-	  TEST_KO("Maximal cycles Reached");				             \
-	}								             \
-									             \
-      sc_start(cycle_offset);						             \
-									             \
-      /*cout << "SC_START (end  )" << endl;*/				             \
-    } while(0)
 
 void test (string name,
@@ -51,9 +23,11 @@
 #endif
 
-  Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer (name.c_str(),
+  Branch_Target_Buffer * _Branch_Target_Buffer = new Branch_Target_Buffer 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
+     _parameters_statistics,
 #endif
-					     _param);
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
@@ -84,4 +58,5 @@
   ALLOC1_SC_SIGNAL( in_DECOD_LAST_TAKE       ," in_DECOD_LAST_TAKE       ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION ," in_DECOD_MISS_PREDICTION ",Tcontrol_t         ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_IS_ACCURATE     ," in_DECOD_IS_ACCURATE     ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_UPDATE_VAL            ," in_UPDATE_VAL            ",Tcontrol_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL(out_UPDATE_ACK            ,"out_UPDATE_ACK            ",Tcontrol_t         ,_param->_nb_inst_update);
@@ -122,4 +97,5 @@
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_LAST_TAKE       ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_DECOD_IS_ACCURATE     ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer, in_UPDATE_VAL            ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Branch_Target_Buffer,out_UPDATE_ACK            ,_param->_nb_inst_update);
@@ -195,4 +171,5 @@
   delete []  in_DECOD_LAST_TAKE       ;
   delete []  in_DECOD_MISS_PREDICTION ;
+  delete []  in_DECOD_IS_ACCURATE     ;
   
   delete []  in_UPDATE_VAL            ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h	(revision 82)
@@ -90,4 +90,5 @@
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_LAST_TAKE       ; //[nb_inst_decod]
   public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION ; //[nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_IS_ACCURATE     ; //[nb_inst_decod]
 
     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -130,5 +131,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Branch_Target_Buffer             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_allocation.cpp	(revision 82)
@@ -85,4 +85,5 @@
       ALLOC1_SIGNAL_IN ( in_DECOD_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
+      ALLOC1_SIGNAL_IN ( in_DECOD_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
     }
 
@@ -111,5 +112,5 @@
 	  {
 	    name = _name+"_sort_"+toString(i);
-	    std::cout << "Create   : " << name << std::endl;
+	    log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
 	    
 	    _component_sort [i] = new morpheo::behavioural::generic::sort::Sort
@@ -118,5 +119,6 @@
 	       ,param_statistics
 #endif
-	       ,_param->_param_sort);
+	       ,_param->_param_sort
+	       ,_usage);
 	    
 	    _component->set_component (_component_sort [i] ->_component
@@ -129,5 +131,5 @@
 	{
 	  name = _name+"_victim";
-	  std::cout << "Create   : " << name << std::endl;
+	  log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
 	  
 	  _component_victim = new morpheo::behavioural::generic::victim::Victim
@@ -136,5 +138,6 @@
 	     ,param_statistics
 #endif
-	     ,_param->_param_victim);
+	     ,_param->_param_victim
+	     ,_usage);
 	  
 	  _component->set_component (_component_victim->_component
@@ -148,5 +151,5 @@
     {
       name = _name+"_glue";
-      std::cout << "Create   : " << name << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
       
       _component_branch_target_buffer_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_glue::Branch_Target_Buffer_Glue
@@ -155,5 +158,6 @@
 	 ,param_statistics
 #endif
-	 ,_param->_param_branch_target_buffer_glue);
+	 ,_param->_param_branch_target_buffer_glue
+	 ,_usage);
       
       _component->set_component (_component_branch_target_buffer_glue->_component
@@ -166,5 +170,5 @@
     {
       name = _name+"_register";
-      std::cout << "Create   : " << name << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
       
       _component_branch_target_buffer_register = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::branch_target_buffer_register::Branch_Target_Buffer_Register
@@ -173,5 +177,6 @@
 	 ,param_statistics
 #endif
-	 ,_param->_param_branch_target_buffer_register);
+	 ,_param->_param_branch_target_buffer_register
+	 ,_usage);
       
       _component->set_component (_component_branch_target_buffer_register->_component
@@ -194,5 +199,5 @@
 	{
 	  src = _name+"_sort_"+toString(i);
-	  std::cout << "Instance : " << src << std::endl;
+	  log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
 	  
 	  {
@@ -230,5 +235,5 @@
 	{
 	  src = _name+"_victim";
-	  std::cout << "Instance : " << src << std::endl;
+	  log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
 	  
 	  {
@@ -256,5 +261,5 @@
     {
       src = _name+"_glue";
-      std::cout << "Instance : " << src << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
       
       {
@@ -312,15 +317,15 @@
 
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_HIT"         ,
-			  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_HIT"         );
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_HIT"         );
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_SRC" ,
-			  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC" );
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_ADDRESS_SRC" );
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_ADDRESS_DEST",
-			  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST");
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_ADDRESS_DEST");
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_CONDITION"   ,
-			  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_CONDITION"   );
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_CONDITION"   );
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_LAST_TAKE"   ,
-			  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_LAST_TAKE"   );
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_LAST_TAKE"   );
 	    COMPONENT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_"+toString(j)+"_REGISTER_IS_ACCURATE" ,
-		 dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_IS_ACCURATE" );
+			             dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+         "_IS_ACCURATE" );
 	  }
 
@@ -460,5 +465,5 @@
     {
       src = _name+"_register";
-      std::cout << "Instance : " << src << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
       
       {
@@ -519,4 +524,6 @@
 	PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_MISS_PREDICTION",
 		            dest, "in_DECOD_"+toString(i)+"_MISS_PREDICTION");
+	PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_IS_ACCURATE",
+		            dest, "in_DECOD_"+toString(i)+"_IS_ACCURATE");
 
 	if (_param->_have_component_victim)
@@ -583,5 +590,5 @@
     }
     // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
-     _component->test_map();
+//      _component->test_map();
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/src/Branch_Target_Buffer_deallocation.cpp	(revision 82)
@@ -49,4 +49,5 @@
 	delete []  in_DECOD_LAST_TAKE       ;
 	delete []  in_DECOD_MISS_PREDICTION ;
+	delete []  in_DECOD_IS_ACCURATE     ;
 
 	delete []  in_UPDATE_VAL            ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/src/test.cpp	(revision 82)
@@ -7,4 +7,7 @@
  */
 
+#define NB_ITERATION  1024
+#define CYCLE_MAX     (128*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/SelfTest/include/test.h"
 #include "Common/include/Test.h"
@@ -12,35 +15,4 @@
 #include "Behavioural/include/Allocation.h"
 
-#define NB_ITERATION  1024
-#define CYCLE_MAX     (128*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)                                                       \
-  do									             \
-    {									             \
-      /*cout << "SC_START (begin)" << endl;*/				             \
-									             \
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
-      if (cycle_offset != 0)						             \
-	{								             \
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
-	}								             \
-									             \
-      if (cycle_current > CYCLE_MAX)					             \
-	{								             \
-	  TEST_KO("Maximal cycles Reached");				             \
-	}								             \
-									             \
-      sc_start(cycle_offset);						             \
-									             \
-      /*cout << "SC_START (end  )" << endl;*/				             \
-    } while(0)
-
 void test (string name,
 	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Parameters * _param)
@@ -52,9 +24,11 @@
 #endif
 
-  Direction_Glue * _Direction_Glue = new Direction_Glue (name.c_str(),
+  Direction_Glue * _Direction_Glue = new Direction_Glue 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
-#endif
-					     _param);
+     _parameters_statistics,
+#endif
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Direction_Glue/include/Direction_Glue.h	(revision 82)
@@ -114,5 +114,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Direction_Glue             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/src/test.cpp	(revision 82)
@@ -7,4 +7,7 @@
  */
 
+#define NB_ITERATION  1024
+#define CYCLE_MAX     (128*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/SelfTest/include/test.h"
 #include "Common/include/Test.h"
@@ -12,35 +15,4 @@
 #include "Behavioural/include/Allocation.h"
 
-#define NB_ITERATION  1024
-#define CYCLE_MAX     (128*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)                                                       \
-  do									             \
-    {									             \
-      /*cout << "SC_START (begin)" << endl;*/				             \
-									             \
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time());          \
-      if (cycle_offset != 0)						             \
-	{								             \
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]" << endl; \
-	}								             \
-									             \
-      if (cycle_current > CYCLE_MAX)					             \
-	{								             \
-	  TEST_KO("Maximal cycles Reached");				             \
-	}								             \
-									             \
-      sc_start(cycle_offset);						             \
-									             \
-      /*cout << "SC_START (end  )" << endl;*/				             \
-    } while(0)
-
 void test (string name,
 	   morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Parameters * _param)
@@ -52,9 +24,11 @@
 #endif
 
-  Direction * _Direction = new Direction (name.c_str(),
+  Direction * _Direction = new Direction 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
-#endif
-					     _param);
+     _parameters_statistics,
+#endif
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h	(revision 82)
@@ -102,5 +102,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Direction             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/src/Direction_allocation.cpp	(revision 82)
@@ -21,11 +21,12 @@
 #undef  FUNCTION
 #define FUNCTION "Direction::allocation"
-  void Direction::allocation (
+  void Direction::allocation 
+  (
 #ifdef STATISTICS
-			       morpheo::behavioural::Parameters_Statistics * param_statistics
+   morpheo::behavioural::Parameters_Statistics * param_statistics
 #else
-			       void
+   void
 #endif
-			       )
+   )
   {
     log_printf(FUNC,Direction,FUNCTION,"Begin");
@@ -85,5 +86,5 @@
     {
       name = _name+"_glue";
-      std::cout << "Create   : " << name << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
       
       _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::direction_glue::Direction_Glue
@@ -92,5 +93,6 @@
 	 ,param_statistics
 #endif
-	 ,_param->_param_glue);
+	 ,_param->_param_glue
+	 ,_usage);
       
       _component->set_component (_component_glue->_component
@@ -106,5 +108,5 @@
     {
       src = _name+"_glue";
-      std::cout << "Instance : " << src << std::endl;
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
       
       {
@@ -177,5 +179,5 @@
     }
     // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
-     _component->test_map();
+//      _component->test_map();
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.deps
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.deps	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Makefile.deps	(revision 82)
@@ -25,4 +25,7 @@
 include 			$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/Makefile.deps
 endif
+ifndef Prediction_unit_Glue
+include 			$(DIR_MORPHEO)/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/Makefile.deps
+endif
 
 #-----[ Directory ]----------------------------------------
@@ -37,6 +40,6 @@
 						$(Direction_LIBRARY)			\
 						$(Return_Address_Stack_LIBRARY)		\
-						$(Update_Prediction_Table_LIBRARY)	
-
+						$(Update_Prediction_Table_LIBRARY)	\
+						$(Prediction_unit_Glue_LIBRARY)
 
 Prediction_unit_DIR_LIBRARY		=	-L$(Prediction_unit_DIR)/lib		\
@@ -45,5 +48,6 @@
 						$(Direction_DIR_LIBRARY)		\
 						$(Return_Address_Stack_DIR_LIBRARY)	\
-						$(Update_Prediction_Table_DIR_LIBRARY)	
+						$(Update_Prediction_Table_DIR_LIBRARY)	\
+						$(Prediction_unit_Glue_DIR_LIBRARY)
 
 
@@ -57,4 +61,5 @@
 				$(MAKE) Return_Address_Stack_library;		\
 				$(MAKE) Update_Prediction_Table_library;	\
+				$(MAKE) Prediction_unit_Glue_library;		\
 				$(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile;
 
@@ -66,3 +71,4 @@
 				$(MAKE) Return_Address_Stack_library_clean;	\
 				$(MAKE) Update_Prediction_Table_library_clean;	\
+				$(MAKE) Prediction_unit_Glue_library_clean;	\
 				$(MAKE) --directory=$(Prediction_unit_DIR) --makefile=Makefile clean;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_mono_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_mono_context.cfg	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_mono_context.cfg	(revision 82)
@@ -1,8 +1,10 @@
 Prediction_unit_Glue
-1	1	+1	# nb_context     
-30	30	+32	# size_address   
-1	4	*4	# nb_instruction  [0] [nb_context]
-1	4	*4	# size_depth      [0] [nb_context]
-1	1	*4	# nb_inst_predict
-4	4	*4	# nb_inst_decod  
-4	4	*4	# nb_inst_update 
+1	1	*4	# nb_context         
+1	1	*4	# nb_decod_unit      
+30	30	+32	# size_address       
+1	1	*4	# nb_instruction  [0] [nb_context]
+1	1	*4	# size_depth      [0] [nb_context]
+4	4	*4	# nb_inst_decod   [0] [nb_decod_unit]
+1	1	*4	# nb_inst_branch_predict     
+4	4	*4	# nb_inst_branch_decod 
+4	4	*4	# nb_inst_branch_update
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_multi_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_multi_context.cfg	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/config_multi_context.cfg	(revision 82)
@@ -1,5 +1,6 @@
 Prediction_unit_Glue
-4	4	+1	# nb_context     
-30	30	+32	# size_address   
+4	4	*4	# nb_context         
+1	1	*4	# nb_decod_unit      
+30	30	+32	# size_address       
 1	1	*4	# nb_instruction  [0] [nb_context]
 2	2	*4	# nb_instruction  [1] [nb_context]
@@ -8,7 +9,8 @@
 2	2	*4	# size_depth      [0] [nb_context]
 1	1	*4	# size_depth      [1] [nb_context]
-8	8	*4	# size_depth      [2] [nb_context]
+7	7	*4	# size_depth      [2] [nb_context]
 4	4	*4	# size_depth      [3] [nb_context]
-1	4	*4	# nb_inst_predict
-4	4	*4	# nb_inst_decod  
-4	4	*4	# nb_inst_update 
+4	4	*4	# nb_inst_decod   [0] [nb_decod_unit]
+1	4	*4	# nb_inst_branch_predict     
+4	4	*4	# nb_inst_branch_decod 
+4	4	*4	# nb_inst_branch_update
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/main.cpp	(revision 82)
@@ -8,5 +8,5 @@
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/include/test.h"
 
-#define NB_PARAMS 5
+#define NB_PARAMS 6
 
 void usage (int argc, char * argv[])
@@ -14,11 +14,15 @@
   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
   err (_("list_params is :\n"));
-  err (_(" * nb_context                   (uint32_t)\n"));
-  err (_(" * size_address                 (uint32_t)\n"));
-  err (_(" * nb_instruction  [nb_context] (uint32_t)\n"));
-  err (_(" * size_depth      [nb_context] (uint32_t)\n"));
-  err (_(" * nb_inst_predict              (uint32_t)\n"));
-  err (_(" * nb_inst_decod                (uint32_t)\n"));
-  err (_(" * nb_inst_update               (uint32_t)\n"));
+  err (_(" * nb_context                             (uint32_t)\n"));
+  err (_(" * nb_decod_unit                          (uint32_t)\n"));
+//   err (_(" * nb_ooo_engine                          (uint32_t)\n"));
+  err (_(" * size_address                           (uint32_t)\n"));
+  err (_(" * nb_instruction         [nb_context]    (uint32_t)\n"));
+  err (_(" * size_depth             [nb_context]    (uint32_t)\n"));
+  err (_(" * nb_inst_decod          [nb_decod_unit] (uint32_t)\n"));
+//   err (_(" * nb_inst_update         [nb_ooo_engine] (uint32_t)\n"));
+  err (_(" * nb_inst_branch_predict                 (uint32_t)\n"));
+  err (_(" * nb_inst_branch_decod                   (uint32_t)\n"));
+  err (_(" * nb_inst_branch_update                  (uint32_t)\n"));
 
   exit (1);
@@ -39,7 +43,10 @@
 
   uint32_t   _nb_context      = fromString<uint32_t>(argv[x++]);
+  uint32_t   _nb_decod_unit   = fromString<uint32_t>(argv[x++]);
+//   uint32_t   _nb_ooo_engine   = fromString<uint32_t>(argv[x++]);
   uint32_t   _size_address    = fromString<uint32_t>(argv[x++]);
   
-  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context))
+  if (argc != static_cast<int>(2+NB_PARAMS+2*_nb_context+_nb_decod_unit// +_nb_ooo_engine
+			       ))
     usage (argc, argv);
 
@@ -50,7 +57,13 @@
   for (uint32_t i=0; i<_nb_context; i++)
     _size_depth     [i] = fromString<uint32_t>(argv[x++]);
-  uint32_t   _nb_inst_predict = fromString<uint32_t>(argv[x++]);
-  uint32_t   _nb_inst_decod   = fromString<uint32_t>(argv[x++]);
-  uint32_t   _nb_inst_update  = fromString<uint32_t>(argv[x++]);
+  uint32_t * _nb_inst_decod   = new uint32_t [_nb_decod_unit];
+  for (uint32_t i=0; i<_nb_decod_unit; i++)
+    _nb_inst_decod  [i] = fromString<uint32_t>(argv[x++]);
+//   uint32_t * _nb_inst_update  = new uint32_t [_nb_ooo_engine];
+//   for (uint32_t i=0; i<_nb_ooo_engine; i++)
+//     _nb_inst_update [i] = fromString<uint32_t>(argv[x++]);
+  uint32_t   _nb_inst_branch_predict = fromString<uint32_t>(argv[x++]);
+  uint32_t   _nb_inst_branch_update  = fromString<uint32_t>(argv[x++]);
+  uint32_t   _nb_inst_branch_decod   = fromString<uint32_t>(argv[x++]);
 
   int _return = EXIT_SUCCESS;
@@ -58,11 +71,15 @@
     {
       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Parameters
-	(_nb_context     ,
-	 _size_address   ,
-	 _nb_instruction ,
-	 _size_depth     ,
-	 _nb_inst_predict,
-	 _nb_inst_decod  ,
-	 _nb_inst_update );
+	(_nb_context            ,
+	 _nb_decod_unit         ,
+// 	 _nb_ooo_engine         ,
+	 _size_address          ,
+	 _nb_instruction        ,
+	 _size_depth            ,
+	 _nb_inst_decod         ,
+// 	 _nb_inst_update        ,
+	 _nb_inst_branch_predict,
+	 _nb_inst_branch_decod  ,
+	 _nb_inst_branch_update );
       
       msg(_("%s"),param->print(1).c_str());
@@ -83,4 +100,6 @@
   delete [] _nb_instruction;
   delete [] _size_depth    ;
+  delete [] _nb_inst_decod ;
+//   delete [] _nb_inst_update;
 
   return (_return);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/SelfTest/src/test.cpp	(revision 82)
@@ -63,43 +63,124 @@
   ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
   ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
-  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,"out_PREDICT_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ," in_PREDICT_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,"out_PREDICT_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,"out_PREDICT_BTB_ADDRESS                ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ," in_PREDICT_BTB_HIT                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ," in_PREDICT_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ," in_PREDICT_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ," in_PREDICT_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ," in_PREDICT_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ," in_PREDICT_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,"out_PREDICT_DIR_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ," in_PREDICT_DIR_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,"out_PREDICT_DIR_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,"out_PREDICT_DIR_STATIC                 ",Tcontrol_t         ,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,"out_PREDICT_DIR_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ," in_PREDICT_DIR_HISTORY                ",Thistory_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ," in_PREDICT_DIR_DIRECTION              ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,"out_PREDICT_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ," in_PREDICT_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,"out_PREDICT_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ," in_PREDICT_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,"out_PREDICT_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,"out_PREDICT_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ," in_PREDICT_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ," in_PREDICT_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,"out_PREDICT_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ," in_PREDICT_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,"out_PREDICT_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,"out_PREDICT_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,"out_PREDICT_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,"out_PREDICT_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,"out_PREDICT_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,"out_PREDICT_UPT_BTB_IS_ACCURATE        ",Tcontrol_t         ,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,"out_PREDICT_UPT_DIR_HISTORY            ",Thistory_t         ,_param->_nb_inst_predict);
-  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,"out_PREDICT_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_predict);
-//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,"out_PREDICT_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,"out_PREDICT_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ," in_PREDICT_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,"out_PREDICT_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,"out_PREDICT_BTB_ADDRESS                ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ," in_PREDICT_BTB_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ," in_PREDICT_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ," in_PREDICT_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ," in_PREDICT_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ," in_PREDICT_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ," in_PREDICT_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,"out_PREDICT_DIR_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ," in_PREDICT_DIR_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,"out_PREDICT_DIR_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,"out_PREDICT_DIR_STATIC                 ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,"out_PREDICT_DIR_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ," in_PREDICT_DIR_HISTORY                ",Thistory_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ," in_PREDICT_DIR_DIRECTION              ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,"out_PREDICT_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ," in_PREDICT_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,"out_PREDICT_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ," in_PREDICT_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,"out_PREDICT_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,"out_PREDICT_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ," in_PREDICT_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ," in_PREDICT_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,"out_PREDICT_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ," in_PREDICT_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,"out_PREDICT_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,"out_PREDICT_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,"out_PREDICT_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,"out_PREDICT_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,"out_PREDICT_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,"out_PREDICT_UPT_BTB_IS_ACCURATE        ",Tcontrol_t         ,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,"out_PREDICT_UPT_DIR_HISTORY            ",Thistory_t         ,_param->_nb_inst_branch_predict);
+  ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,"out_PREDICT_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_predict);
+//ALLOC1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,"out_PREDICT_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_branch_predict);
   ALLOC1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ," in_DEPTH_UPT_NB_BRANCH                ",Tdepth_t           ,_param->_nb_context);
   ALLOC1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ," in_DEPTH_UPT_TAIL                     ",Tdepth_t           ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                          ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
+
+  ALLOC2_SC_SIGNAL( in_DECOD_VAL                        ," in_DECOD_VAL                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL(out_DECOD_ACK                        ,"out_DECOD_ACK                        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ," in_DECOD_CONTEXT_ID                 ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ," in_DECOD_MATCH_INST_IFETCH_PTR      ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ," in_DECOD_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID," in_DECOD_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ," in_DECOD_BRANCH_CONDITION           ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ," in_DECOD_BRANCH_DIRECTION           ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ," in_DECOD_ADDRESS_SRC                ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ," in_DECOD_ADDRESS_DEST               ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,"out_DECOD_BTB_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_BTB_ACK                    ," in_DECOD_BTB_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID             ,"out_DECOD_BTB_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC            ,"out_DECOD_BTB_ADDRESS_SRC            ",Taddress_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST           ,"out_DECOD_BTB_ADDRESS_DEST           ",Taddress_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_CONDITION              ,"out_DECOD_BTB_CONDITION              ",Tbranch_condition_t,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE              ,"out_DECOD_BTB_LAST_TAKE              ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION        ,"out_DECOD_BTB_MISS_PREDICTION        ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE            ,"out_DECOD_BTB_IS_ACCURATE            ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_RAS_VAL                    ,"out_DECOD_RAS_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_RAS_ACK                    ," in_DECOD_RAS_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID             ,"out_DECOD_RAS_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod); 
+  ALLOC1_SC_SIGNAL( in_DECOD_RAS_HIT                    ," in_DECOD_RAS_HIT                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod); 
+  ALLOC1_SC_SIGNAL(out_DECOD_RAS_PUSH                   ,"out_DECOD_RAS_PUSH                   ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH           ,"out_DECOD_RAS_ADDRESS_PUSH           ",Taddress_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP            ," in_DECOD_RAS_ADDRESS_POP            ",Taddress_t         ,_param->_nb_inst_branch_decod);
+//ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX                  ," in_DECOD_RAS_INDEX                  ",Tptr_t             ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION        ,"out_DECOD_RAS_MISS_PREDICTION        ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_VAL                    ,"out_DECOD_UPT_VAL                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_UPT_ACK                    ," in_DECOD_UPT_ACK                    ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID             ,"out_DECOD_UPT_CONTEXT_ID             ",Tcontext_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC        ,"out_DECOD_UPT_BTB_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST       ,"out_DECOD_UPT_BTB_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION          ,"out_DECOD_UPT_BTB_CONDITION          ",Tbranch_condition_t,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE          ,"out_DECOD_UPT_BTB_LAST_TAKE          ",Tcontrol_t         ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS            ,"out_DECOD_UPT_RAS_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_decod);
+//ALLOC1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX              ,"out_DECOD_UPT_RAS_INDEX              ",Tptr_t             ,_param->_nb_inst_branch_decod);
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH            ,"out_DECOD_UPT_MISS_IFETCH            ",Tcontrol_t         ,_param->_nb_inst_branch_decod); 
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,"out_DECOD_UPT_MISS_DECOD             ",Tcontrol_t         ,_param->_nb_inst_branch_decod); 
+  ALLOC1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,"out_DECOD_UPT_UPDATE_PREDICTION_ID   ",Tprediction_ptr_t  ,_param->_nb_inst_branch_decod);
   
+  ALLOC1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,"out_UPDATE_BTB_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_BTB_ACK                  ," in_UPDATE_BTB_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,"out_UPDATE_BTB_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,"out_UPDATE_BTB_ADDRESS_SRC          ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,"out_UPDATE_BTB_ADDRESS_DEST         ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_CONDITION            ,"out_UPDATE_BTB_CONDITION            ",Tbranch_condition_t,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,"out_UPDATE_BTB_LAST_TAKE            ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,"out_UPDATE_BTB_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_DIR_VAL                  ,"out_UPDATE_DIR_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_DIR_ACK                  ," in_UPDATE_DIR_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS              ,"out_UPDATE_DIR_ADDRESS              ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY              ,"out_UPDATE_DIR_HISTORY              ",Thistory_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION            ,"out_UPDATE_DIR_DIRECTION            ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL                  ,"out_UPDATE_RAS_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_RAS_ACK                  ," in_UPDATE_RAS_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,"out_UPDATE_RAS_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH                 ,"out_UPDATE_RAS_PUSH                 ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS              ,"out_UPDATE_RAS_ADDRESS              ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX                ,"out_UPDATE_RAS_INDEX                ",Tptr_t             ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,"out_UPDATE_RAS_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,"out_UPDATE_RAS_PREDICTION_IFETCH    ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_VAL                  ," in_UPDATE_UPT_VAL                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_UPT_ACK                  ,"out_UPDATE_UPT_ACK                  ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ," in_UPDATE_UPT_CONTEXT_ID           ",Tcontext_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ," in_UPDATE_UPT_MISS_PREDICTION      ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ," in_UPDATE_UPT_DIRECTION_GOOD       ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL              ," in_UPDATE_UPT_BTB_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ," in_UPDATE_UPT_BTB_ADDRESS_SRC      ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ," in_UPDATE_UPT_BTB_ADDRESS_DEST     ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ," in_UPDATE_UPT_BTB_CONDITION        ",Tbranch_condition_t,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL              ," in_UPDATE_UPT_DIR_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ," in_UPDATE_UPT_DIR_HISTORY          ",Thistory_t         ,_param->_nb_inst_branch_update);
+  ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL              ," in_UPDATE_UPT_RAS_VAL              ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ," in_UPDATE_UPT_RAS_PUSH             ",Tcontrol_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ," in_UPDATE_UPT_RAS_ADDRESS          ",Taddress_t         ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ," in_UPDATE_UPT_RAS_INDEX            ",Tptr_t             ,_param->_nb_inst_branch_update);
+//ALLOC1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH," in_UPDATE_UPT_RAS_PREDICTION_IFETCH",Tcontrol_t         ,_param->_nb_inst_branch_update);
+
   /********************************************************
    * Instanciation
@@ -119,4 +200,5 @@
   INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_PC_NEXT_IS_DS_TAKE          ,_param->_nb_context);
   INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_INSTRUCTION_ENABLE          ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
   for (uint32_t i=0; i<_param->_nb_context; i++)
     {
@@ -126,51 +208,142 @@
 	INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
     }
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK                     ,_param->_nb_inst_predict);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_VAL                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ACK                     ,_param->_nb_inst_branch_predict);
   if (_param->_have_port_context_id)
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK                     ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_HIT                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_branch_predict);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_VAL                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_ACK                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_branch_predict);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_VAL                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ACK                     ,_param->_nb_inst_branch_predict);
+
   if (_param->_have_port_context_id)
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL                     ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK                     ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_HIT                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_VAL                     ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_PREDICT_UPT_ACK                     ,_param->_nb_inst_branch_predict);
   if (_param->_have_port_context_id)
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_predict);
-  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_predict);
-//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_branch_predict);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_branch_predict);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
+
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  if (_param->_have_port_context_id)
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  if (_param->_have_port_max_depth)
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
+  if (_param->_have_port_context_id)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_CONDITION              ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_LAST_TAKE              ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_VAL                    ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ACK                    ,_param->_nb_inst_branch_decod);
+  if (_param->_have_port_context_id)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_decod); 
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_HIT                    ,_param->_nb_inst_branch_decod); 
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_PUSH                   ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_decod);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_RAS_INDEX                  ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_RAS_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_VAL                    ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_DECOD_UPT_ACK                    ,_param->_nb_inst_branch_decod);
+  if (_param->_have_port_context_id)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_decod);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_RAS_INDEX              ,_param->_nb_inst_branch_decod);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_IFETCH            ,_param->_nb_inst_branch_decod); 
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod); 
+  if (_param->_have_port_max_depth)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue,out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit_Glue, in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update);
+
   for (uint32_t i=0; i<_param->_nb_context; i++)
     {
       if (_param->_have_port_depth [i])
 	{
+	  INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
+	  INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_TAIL          [i]);
+	}
 	  INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_NB_BRANCH [i]);
-	  INSTANCE_SC_SIGNAL(_Prediction_unit_Glue, in_DEPTH_UPT_TAIL      [i]);
-	}
+	  INSTANCE_SC_SIGNAL(_Prediction_unit_Glue,out_DEPTH_NB_BRANCH     [i]);
     }
 
@@ -191,4 +364,5 @@
 
   int32_t percent_transaction_predict =  75;
+  int32_t percent_transaction_decod   =  75;
 
   SC_START(0);
@@ -199,5 +373,5 @@
   for (uint32_t i=0; i<_param->_nb_context; i++)
     in_PREDICT_VAL [i]->write(0);
-  for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+  for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
     {
       in_PREDICT_BTB_ACK         [i]->write(0);
@@ -208,4 +382,7 @@
       in_PREDICT_BTB_IS_ACCURATE [i]->write(1);
     }
+  for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+    for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+      in_DECOD_VAL [i][j]->write(0);
 
   in_NRESET->write(0);
@@ -237,5 +414,5 @@
 	    do
 	      {
-		for (uint32_t j=0; j<_param->_nb_inst_predict; j++)
+		for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++)
 		  in_PREDICT_BTB_ACK [j]->write(0);
 
@@ -245,5 +422,5 @@
 
 		uint32_t port;
-		for (port=0; port<_param->_nb_inst_predict; port++)
+		for (port=0; port<_param->_nb_inst_branch_predict; port++)
 		  {
 		    if (_param->_have_port_context_id)
@@ -289,5 +466,5 @@
 	    for (uint32_t i=0; i<_param->_nb_context; i++)
 	      in_PREDICT_VAL [i]->write(0);
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		in_PREDICT_BTB_ACK [i]->write(0);
@@ -319,5 +496,5 @@
 	    do
 	      {
-		for (uint32_t j=0; j<_param->_nb_inst_predict; j++)
+		for (uint32_t j=0; j<_param->_nb_inst_branch_predict; j++)
 		  in_PREDICT_BTB_ACK [j]->write(0);
 
@@ -327,5 +504,5 @@
 
 		uint32_t port;
-		for (port=0; port<_param->_nb_inst_predict; port++)
+		for (port=0; port<_param->_nb_inst_branch_predict; port++)
 		  {
 		    if (_param->_have_port_context_id)
@@ -355,19 +532,23 @@
 
 		    TEST(Taddress_t        ,out_PREDICT_PC_NEXT                     [context]->read(),addr_dest);
-// 		    TEST(Tcontrol_t        ,out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]->read(),0);
+		    TEST(Tcontrol_t        ,out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]->read(),i==(_param->_nb_instruction [context]-1));
 		    TEST(Tinst_ifetch_ptr_t,out_PREDICT_INST_IFETCH_PTR             [context]->read(),i);
 		    TEST(Tbranch_state_t   ,out_PREDICT_BRANCH_STATE                [context]->read(),BRANCH_STATE_NSPEC_TAKE);
 // 		    TEST(Tprediction_ptr_t ,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [context]->read(),0);
-		    
-// 		    for (uint32_t j=0; j<i; j++)
-// 		      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0);
-// 		    for (uint32_t j=i; j<_param->_nb_instruction[context]; j++)
-// 		      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1);
-		    
+
+		    uint32_t k=((addr_src%_param->_nb_instruction[context])==_param->_nb_instruction[context]-1)?_param->_nb_instruction[context]:((addr_src%_param->_nb_instruction[context])+2);
+		    LABEL("instruction enable : ");
+		    LABEL("  [0:%d[ = 1",k);
+		    LABEL("  [%d:%d[ = 1",k,_param->_nb_instruction[context]);
+		    for (uint32_t j=0; j<k; j++)
+		      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),1);
+		    for (uint32_t j=k; j<_param->_nb_instruction[context]; j++)
+		      TEST(Tcontrol_t        ,out_PREDICT_INSTRUCTION_ENABLE [context][j]->read(),0);
+
 		    TEST(Tcontrol_t        ,out_PREDICT_BTB_VAL        [port]->read(),1); 
 		    TEST(Tcontext_t        ,out_PREDICT_BTB_CONTEXT_ID [port]->read(),context);
 		    TEST(Taddress_t        ,out_PREDICT_BTB_ADDRESS    [port]->read(),addr);
 		  }
-
+		
 		SC_START(1);
 
@@ -376,5 +557,5 @@
 	    for (uint32_t i=0; i<_param->_nb_context; i++)
 	      in_PREDICT_VAL [i]->write(0);
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		in_PREDICT_BTB_ACK [i]->write(0);
@@ -386,4 +567,126 @@
       }
 
+      {
+	LABEL("Decod - Ok");
+	uint32_t decod_unit = rand()%_param->_nb_decod_unit;
+	LABEL("decod_unit : %d",decod_unit);
+
+	for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++)
+	  {
+	    Tcontext_t context = i%_param->_nb_context;
+	    in_DECOD_CONTEXT_ID                  [decod_unit][i]->write(context);
+	    in_DECOD_MATCH_INST_IFETCH_PTR       [decod_unit][i]->write(1);
+	    in_DECOD_BRANCH_STATE                [decod_unit][i]->write(BRANCH_STATE_NSPEC_TAKE);
+
+	    bool find = false;
+	    do
+	      {
+		in_DECOD_VAL                         [decod_unit][i]->write((rand()%100)<percent_transaction_decod);
+		in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(rand()%_param->_size_depth[context]);
+		
+		in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod);
+		in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod);
+		in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod);
+		
+		SC_START(0);
+	    
+		LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read());
+		if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read())
+		  {
+		    LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i);
+		    TEST(Tcontrol_t, in_DECOD_UPT_ACK[0]->read(),1);
+		    TEST(Tcontrol_t,out_DECOD_BTB_VAL[0]->read(),0);
+		    TEST(Tcontrol_t,out_DECOD_RAS_VAL[0]->read(),0);
+		    TEST(Tcontrol_t,out_DECOD_UPT_VAL[0]->read(),1);
+		    find = true;
+		  }
+
+		SC_START(1);
+
+	      } while (not find);
+
+	    in_DECOD_VAL    [decod_unit][i]->write(0);
+	    in_DECOD_BTB_ACK[0]->write(0);
+	    in_DECOD_RAS_ACK[0]->write(0);
+	    in_DECOD_UPT_ACK[0]->write(0);
+	  }
+      }
+
+      {
+	LABEL("Decod - Ko");
+	uint32_t decod_unit = rand()%_param->_nb_decod_unit;
+	LABEL("decod_unit : %d",decod_unit);
+
+	for (uint32_t i=0; i<_param->_nb_inst_decod[i];i++)
+	  {
+	    Tcontext_t context = i%_param->_nb_context;
+	    in_DECOD_CONTEXT_ID                  [decod_unit][i]->write(context);
+	    in_DECOD_MATCH_INST_IFETCH_PTR       [decod_unit][i]->write(0);
+	    in_DECOD_BRANCH_STATE                [decod_unit][i]->write(BRANCH_STATE_SPEC_TAKE);
+	    in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]->write(i%_param->_max_size_depth);
+	    in_DECOD_BRANCH_CONDITION            [decod_unit][i]->write(BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
+	    in_DECOD_BRANCH_DIRECTION            [decod_unit][i]->write(1);
+	    in_DECOD_ADDRESS_SRC                 [decod_unit][i]->write(0xdeadbeef+i);
+	    in_DECOD_ADDRESS_DEST                [decod_unit][i]->write(0x11061979+i);
+
+                                                                                      
+	    bool find = false;
+	    do
+	      {
+		in_DECOD_VAL                         [decod_unit][i]->write((rand()%100)<percent_transaction_decod);
+		
+		in_DECOD_BTB_ACK[0]->write((rand()%100)<percent_transaction_decod);
+		in_DECOD_RAS_ACK[0]->write((rand()%100)<percent_transaction_decod);
+		in_DECOD_UPT_ACK[0]->write((rand()%100)<percent_transaction_decod);
+
+		in_DECOD_RAS_HIT[0]->write(1);
+		in_DECOD_RAS_ADDRESS_POP[0]->write(0xdadedead+i);
+
+		
+		SC_START(0);
+	    
+		LABEL("DECOD[%d][%d] - %d %d",decod_unit,i,in_DECOD_VAL[decod_unit][i]->read(),out_DECOD_ACK[decod_unit][i]->read());
+		if (in_DECOD_VAL[decod_unit][i]->read() and out_DECOD_ACK[decod_unit][i]->read())
+		  {
+		    LABEL("DECOD[%d][%d] - Transaction Accepted",decod_unit,i);
+		    TEST(Tcontrol_t         , in_DECOD_UPT_ACK                  [0]->read(),1);
+		    TEST(Tcontrol_t         ,out_DECOD_BTB_VAL                  [0]->read(),1);
+		    TEST(Tcontrol_t         ,out_DECOD_RAS_VAL                  [0]->read(),1);
+		    TEST(Tcontrol_t         ,out_DECOD_UPT_VAL                  [0]->read(),1);
+
+		    TEST(Tcontext_t         ,out_DECOD_BTB_CONTEXT_ID           [0]->read(),context);
+		    TEST(Taddress_t         ,out_DECOD_BTB_ADDRESS_SRC          [0]->read(),0xdeadbeef+i);
+		    TEST(Taddress_t         ,out_DECOD_BTB_ADDRESS_DEST         [0]->read(),0x11061979+i);
+		    TEST(Tbranch_condition_t,out_DECOD_BTB_CONDITION            [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
+		    TEST(Tcontrol_t         ,out_DECOD_BTB_LAST_TAKE            [0]->read(),1);
+		    TEST(Tcontrol_t         ,out_DECOD_BTB_MISS_PREDICTION      [0]->read(),1);
+		    TEST(Tcontrol_t         ,out_DECOD_BTB_IS_ACCURATE          [0]->read(),0);
+		    TEST(Tcontext_t         ,out_DECOD_RAS_CONTEXT_ID           [0]->read(),context); 
+		    TEST(Tcontrol_t         ,out_DECOD_RAS_PUSH                 [0]->read(),1);
+		    TEST(Taddress_t         ,out_DECOD_RAS_ADDRESS_PUSH         [0]->read(),0x11061979+i);
+		    TEST(Tcontrol_t         ,out_DECOD_RAS_MISS_PREDICTION      [0]->read(),1);
+		    TEST(Tcontext_t         ,out_DECOD_UPT_CONTEXT_ID           [0]->read(),context);
+		    TEST(Taddress_t         ,out_DECOD_UPT_BTB_ADDRESS_SRC      [0]->read(),0xdeadbeef+i);
+		    TEST(Taddress_t         ,out_DECOD_UPT_BTB_ADDRESS_DEST     [0]->read(),0x11061979+i);
+		    TEST(Tbranch_condition_t,out_DECOD_UPT_BTB_CONDITION        [0]->read(),BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK);
+		    TEST(Tcontrol_t         ,out_DECOD_UPT_BTB_LAST_TAKE        [0]->read(),1);
+		    TEST(Taddress_t         ,out_DECOD_UPT_RAS_ADDRESS          [0]->read(),0xdadedead+i);
+		    TEST(Tcontrol_t         ,out_DECOD_UPT_MISS_IFETCH          [0]->read(),1); 
+		    TEST(Tcontrol_t         ,out_DECOD_UPT_MISS_DECOD           [0]->read(),0); 
+		    TEST(Tprediction_ptr_t  ,out_DECOD_UPT_UPDATE_PREDICTION_ID [0]->read(),i%_param->_max_size_depth);
+
+		    find = true;
+		  }
+
+		SC_START(1);
+
+	      } while (not find);
+
+	    in_DECOD_VAL    [decod_unit][i]->write(0);
+	    in_DECOD_BTB_ACK[0]->write(0);
+	    in_DECOD_RAS_ACK[0]->write(0);
+	    in_DECOD_UPT_ACK[0]->write(0);
+	  }
+      }
 
       SC_START(1);
@@ -413,46 +716,129 @@
   DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE                ,_param->_nb_context);
   DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ,_param->_nb_context);
-  DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_predict);
-  DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_predict);
-//DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_BTB_VAL                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ACK                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_BTB_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_BTB_ADDRESS                 ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_HIT                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST            ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_CONDITION               ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL( in_PREDICT_BTB_LAST_TAKE               ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_BTB_IS_ACCURATE             ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_DIR_VAL                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_DIR_ACK                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC             ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_DIR_STATIC                  ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL(out_PREDICT_DIR_LAST_TAKE               ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL( in_PREDICT_DIR_HISTORY                 ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_DIR_DIRECTION               ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_RAS_VAL                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ACK                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_RAS_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_RAS_HIT                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_RAS_PUSH                    ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH            ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_RAS_ADDRESS_POP             ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL( in_PREDICT_RAS_INDEX                   ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_VAL                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL( in_PREDICT_UPT_ACK                     ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_CONTEXT_ID              ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC         ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST        ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_CONDITION           ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE           ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE         ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL(out_PREDICT_UPT_DIR_HISTORY             ,_param->_nb_inst_branch_predict);
+  DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS             ,_param->_nb_inst_branch_predict);
+//DELETE1_SC_SIGNAL(out_PREDICT_UPT_RAS_INDEX               ,_param->_nb_inst_branch_predict);
   DELETE1_SC_SIGNAL( in_DEPTH_UPT_NB_BRANCH                 ,_param->_nb_context);
   DELETE1_SC_SIGNAL( in_DEPTH_UPT_TAIL                      ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH                     ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_DEPTH_TAIL                          ,_param->_nb_context);
+
+  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_VAL                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_BTB_ACK                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_CONDITION              ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_LAST_TAKE              ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_RAS_VAL                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_RAS_ACK                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_decod); 
+  DELETE1_SC_SIGNAL( in_DECOD_RAS_HIT                    ,_param->_nb_inst_branch_decod); 
+  DELETE1_SC_SIGNAL(out_DECOD_RAS_PUSH                   ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_decod);
+//DELETE1_SC_SIGNAL( in_DECOD_RAS_INDEX                  ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_RAS_MISS_PREDICTION        ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_VAL                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL( in_DECOD_UPT_ACK                    ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_decod);
+//DELETE1_SC_SIGNAL(out_DECOD_UPT_RAS_INDEX              ,_param->_nb_inst_branch_decod);
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_IFETCH            ,_param->_nb_inst_branch_decod); 
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_MISS_DECOD             ,_param->_nb_inst_branch_decod); 
+  DELETE1_SC_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID   ,_param->_nb_inst_branch_decod);
+
+  DELETE1_SC_SIGNAL(out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL(out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL(out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL(out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update);
+  DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update);
+//DELETE1_SC_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update);
+
     }
 #endif
 
   delete _Prediction_unit_Glue;
+
 #ifdef STATISTICS
   delete _parameters_statistics;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h	(revision 82)
@@ -24,28 +24,38 @@
   {
     //-----[ fields ]------------------------------------------------------------
-  public : uint32_t   _nb_context               ;
+  public : uint32_t   _nb_context               ;// == nb_ifetch_unit
+  public : uint32_t   _nb_decod_unit            ;
+//public : uint32_t   _nb_ooo_engine            ;
   public : uint32_t   _size_address             ;
-  public : uint32_t * _nb_instruction           ;
-  public : uint32_t * _size_depth               ;
-  public : uint32_t   _nb_inst_predict          ;
-  public : uint32_t   _nb_inst_decod            ;
-  public : uint32_t   _nb_inst_update           ;
+  public : uint32_t * _nb_instruction           ;//[nb_context]
+  public : uint32_t * _size_depth               ;//[nb_context]
+  public : uint32_t * _nb_inst_decod            ;//[nb_decod_unit]
+//public : uint32_t * _nb_inst_update           ;//[nb_ooo_engine]
+  public : uint32_t   _nb_inst_branch_predict   ;
+  public : uint32_t   _nb_inst_branch_decod     ;
+  public : uint32_t   _nb_inst_branch_update    ;
 //public : uint32_t   _nb_inst_branch_complete  ;
 
   public : uint32_t   _size_context_id          ;
-  public : uint32_t * _size_inst_ifetch_ptr     ;
+  public : uint32_t * _size_inst_ifetch_ptr     ;//[nb_context]
+  public : uint32_t   _max_size_depth           ;
 
   public : bool       _have_port_context_id     ;
-  public : bool     * _have_port_depth          ;    
-  public : bool     * _have_port_inst_ifetch_ptr;
+  public : bool       _have_port_max_depth      ;
+  public : bool     * _have_port_depth          ;//[nb_context]
+  public : bool     * _have_port_inst_ifetch_ptr;//[nb_context]
 
     //-----[ methods ]-----------------------------------------------------------
-  public : Parameters  (uint32_t   nb_context     ,
-			uint32_t   size_address   ,
-			uint32_t * nb_instruction ,
-			uint32_t * size_depth     ,
-			uint32_t   nb_inst_predict,
-			uint32_t   nb_inst_decod  ,
-			uint32_t   nb_inst_update );
+  public : Parameters  (uint32_t   nb_context            ,
+			uint32_t   nb_decod_unit         ,
+// 			uint32_t   nb_ooo_engine         ,
+			uint32_t   size_address          ,
+			uint32_t * nb_instruction        ,
+			uint32_t * size_depth            ,
+			uint32_t * nb_inst_decod         ,
+// 			uint32_t * nb_inst_update        ,
+			uint32_t   nb_inst_branch_predict,
+			uint32_t   nb_inst_branch_decod  ,
+			uint32_t   nb_inst_branch_update );
 //   public : Parameters  (Parameters & param) ;
   public : ~Parameters () ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h	(revision 82)
@@ -75,120 +75,136 @@
   public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context]
 
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_BTB_VAL                     ; //[nb_inst_predict] 
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_ACK                     ; //[nb_inst_predict] 
-  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_BTB_CONTEXT_ID              ; //[nb_inst_predict]
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_BTB_ADDRESS                 ; //[nb_inst_predict]
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_HIT                     ; //[nb_inst_predict] 
-  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC             ; //[nb_inst_predict] 
-  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST            ; //[nb_inst_predict] 
-  public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION               ; //[nb_inst_predict] 
-//public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE               ; //[nb_inst_predict]  DIR.LAST_TAKE
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE             ; //[nb_inst_predict]
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_BTB_VAL                     ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_ACK                     ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_BTB_CONTEXT_ID              ; //[nb_inst_branch_predict]
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_BTB_ADDRESS                 ; //[nb_inst_branch_predict]
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_HIT                     ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_SRC             ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Taddress_t         )  **  in_PREDICT_BTB_ADDRESS_DEST            ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Tbranch_condition_t)  **  in_PREDICT_BTB_CONDITION               ; //[nb_inst_branch_predict] 
+//public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_LAST_TAKE               ; //[nb_inst_branch_predict]  DIR.LAST_TAKE
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_BTB_IS_ACCURATE             ; //[nb_inst_branch_predict]
 										      		        
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_VAL                     ; //[nb_inst_predict] 
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_ACK                     ; //[nb_inst_predict] 
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_DIR_ADDRESS_SRC             ; //[nb_inst_predict] 
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_STATIC                  ; //[nb_inst_predict] 
-//public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_LAST_TAKE               ; //[nb_inst_predict]  BTB.LAST_TAKE
-//public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY                 ; //[nb_inst_predict]  UPT.DIR_HISTORY
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_DIRECTION               ; //[nb_inst_predict] 
-
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_VAL                     ; //[nb_inst_predict] 
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_ACK                     ; //[nb_inst_predict] 
-  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_RAS_CONTEXT_ID              ; //[nb_inst_predict]
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_HIT                     ; //[nb_inst_predict]  
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_PUSH                    ; //[nb_inst_predict] 
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_RAS_ADDRESS_PUSH            ; //[nb_inst_predict] 
-  public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS_POP             ; //[nb_inst_predict] 
-//public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX                   ; //[nb_inst_predict]  UPT.RAS_INDEX
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_VAL                     ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_ACK                     ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_DIR_ADDRESS_SRC             ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_STATIC                  ; //[nb_inst_branch_predict] 
+//public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_DIR_LAST_TAKE               ; //[nb_inst_branch_predict]  BTB.LAST_TAKE
+//public    : SC_IN (Thistory_t         )  **  in_PREDICT_DIR_HISTORY                 ; //[nb_inst_branch_predict]  UPT.DIR_HISTORY
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_DIR_DIRECTION               ; //[nb_inst_branch_predict] 
+
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_VAL                     ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_ACK                     ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_RAS_CONTEXT_ID              ; //[nb_inst_branch_predict]
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_RAS_HIT                     ; //[nb_inst_branch_predict]  
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_RAS_PUSH                    ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_RAS_ADDRESS_PUSH            ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Taddress_t         )  **  in_PREDICT_RAS_ADDRESS_POP             ; //[nb_inst_branch_predict] 
+//public    : SC_IN (Tptr_t             )  **  in_PREDICT_RAS_INDEX                   ; //[nb_inst_branch_predict]  UPT.RAS_INDEX
 										      		        
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_VAL                     ; //[nb_inst_predict] 
-  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_UPT_ACK                     ; //[nb_inst_predict] 
-  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_UPT_CONTEXT_ID              ; //[nb_inst_predict]
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_SRC         ; //[nb_inst_predict]* BTB.ADDRESS_SRC
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_DEST        ; //[nb_inst_predict] 
-  public    : SC_OUT(Tbranch_condition_t)  ** out_PREDICT_UPT_BTB_CONDITION           ; //[nb_inst_predict]* BTB.CONDITION
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_LAST_TAKE           ; //[nb_inst_predict] 
-  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_IS_ACCURATE         ; //[nb_inst_predict]
-//public    : SC_OUT(Thistory_t         )  ** out_PREDICT_UPT_DIR_HISTORY             ; //[nb_inst_predict]  DIR.HISTORY
-  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_RAS_ADDRESS             ; //[nb_inst_predict]* RAS.ADDRESS_POP
-//public    : SC_OUT(Tptr_t             )  ** out_PREDICT_UPT_RAS_INDEX               ; //[nb_inst_predict]  RAS.INDEX
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_VAL                     ; //[nb_inst_branch_predict] 
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_UPT_ACK                     ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tcontext_t         )  ** out_PREDICT_UPT_CONTEXT_ID              ; //[nb_inst_branch_predict]
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_SRC         ; //[nb_inst_branch_predict]* BTB.ADDRESS_SRC
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_BTB_ADDRESS_DEST        ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tbranch_condition_t)  ** out_PREDICT_UPT_BTB_CONDITION           ; //[nb_inst_branch_predict]* BTB.CONDITION
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_LAST_TAKE           ; //[nb_inst_branch_predict] 
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_UPT_BTB_IS_ACCURATE         ; //[nb_inst_branch_predict]
+//public    : SC_OUT(Thistory_t         )  ** out_PREDICT_UPT_DIR_HISTORY             ; //[nb_inst_branch_predict]  DIR.HISTORY
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_UPT_RAS_ADDRESS             ; //[nb_inst_branch_predict]* RAS.ADDRESS_POP
+//public    : SC_OUT(Tptr_t             )  ** out_PREDICT_UPT_RAS_INDEX               ; //[nb_inst_branch_predict]  RAS.INDEX
 										      
     // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_VAL                       ; //[nb_inst_decod]
-  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_ACK                       ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_BTB_CONTEXT_ID                ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_SRC               ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_DEST              ; //[nb_inst_decod]
-  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_BTB_CONDITION                 ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_LAST_TAKE                 ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_MISS_PREDICTION           ; //[nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_VAL                           ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_OUT(Tcontrol_t         ) *** out_DECOD_ACK                           ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontext_t         ) ***  in_DECOD_CONTEXT_ID                    ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_MATCH_INST_IFETCH_PTR         ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tbranch_state_t    ) ***  in_DECOD_BRANCH_STATE                  ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tprediction_ptr_t  ) ***  in_DECOD_BRANCH_UPDATE_PREDICTION_ID   ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tbranch_condition_t) ***  in_DECOD_BRANCH_CONDITION              ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_BRANCH_DIRECTION              ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_SRC                   ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_DEST                  ; //[nb_decod_unit][nb_inst_decod]
+
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_VAL                       ; //[nb_inst_branch_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_BTB_ACK                       ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_BTB_CONTEXT_ID                ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_SRC               ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_BTB_ADDRESS_DEST              ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_BTB_CONDITION                 ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_LAST_TAKE                 ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_MISS_PREDICTION           ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_BTB_IS_ACCURATE               ; //[nb_inst_branch_decod]
 									              
-  public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_VAL                       ; //[nb_inst_decod]
-  public    : SC_IN (Tcontrol_t)           **  in_DECOD_RAS_ACK                       ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontext_t)           ** out_DECOD_RAS_CONTEXT_ID                ; //[nb_inst_decod] 
-  public    : SC_IN (Tcontrol_t)           **  in_DECOD_RAS_HIT                       ; //[nb_inst_decod] 
-  public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_PUSH                      ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t)           ** out_DECOD_RAS_ADDRESS_PUSH              ; //[nb_inst_decod]
-  public    : SC_IN (Taddress_t)           **  in_DECOD_RAS_ADDRESS_POP               ; //[nb_inst_decod]
-  public    : SC_IN (Tptr_t    )           **  in_DECOD_RAS_INDEX                     ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontrol_t)           ** out_DECOD_RAS_MISS_PREDICTION           ; //[nb_inst_decod]
-										      
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_VAL                       ; //[nb_inst_decod]
-  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_UPT_ACK                       ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_UPT_CONTEXT_ID                ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_SRC           ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_DEST          ; //[nb_inst_decod]
-  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_UPT_BTB_CONDITION             ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_BTB_LAST_TAKE             ; //[nb_inst_decod]
-  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_RAS_ADDRESS               ; //[nb_inst_decod]
-  public    : SC_OUT(Tptr_t             )  ** out_DECOD_UPT_RAS_INDEX                 ; //[nb_inst_decod]
-  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_PREDICTION           ; //[nb_inst_decod] 
-  public    : SC_OUT(Tprediction_ptr_t  )  ** out_DECOD_UPT_UPDATE_PREDICTION_ID      ; //[nb_inst_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_VAL                       ; //[nb_inst_branch_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_RAS_ACK                       ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_RAS_CONTEXT_ID                ; //[nb_inst_branch_decod] 
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_RAS_HIT                       ; //[nb_inst_branch_decod] 
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_PUSH                      ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_RAS_ADDRESS_PUSH              ; //[nb_inst_branch_decod]
+  public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS_POP               ; //[nb_inst_branch_decod]
+//public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX                     ; //[nb_inst_branch_decod] UPT.RAS_INDEX
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_RAS_MISS_PREDICTION           ; //[nb_inst_branch_decod]
+										      
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_VAL                       ; //[nb_inst_branch_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_UPT_ACK                       ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontext_t         )  ** out_DECOD_UPT_CONTEXT_ID                ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_SRC           ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_BTB_ADDRESS_DEST          ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tbranch_condition_t)  ** out_DECOD_UPT_BTB_CONDITION             ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_BTB_LAST_TAKE             ; //[nb_inst_branch_decod]
+  public    : SC_OUT(Taddress_t         )  ** out_DECOD_UPT_RAS_ADDRESS               ; //[nb_inst_branch_decod]
+//public    : SC_OUT(Tptr_t             )  ** out_DECOD_UPT_RAS_INDEX                 ; //[nb_inst_branch_decod] RAS.INDEX
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_IFETCH               ; //[nb_inst_branch_decod] 
+  public    : SC_OUT(Tcontrol_t         )  ** out_DECOD_UPT_MISS_DECOD                ; //[nb_inst_branch_decod] 
+  public    : SC_OUT(Tprediction_ptr_t  )  ** out_DECOD_UPT_UPDATE_PREDICTION_ID      ; //[nb_inst_branch_decod]
 										      
     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
-  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL                      ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_BTB_ACK                      ; //[nb_inst_update]
-  public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_BTB_CONTEXT_ID               ; //[nb_inst_update]
-  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC              ; //[nb_inst_update]
-  public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST             ; //[nb_inst_update]
-  public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION                ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_LAST_TAKE                ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_MISS_PREDICTION          ; //[nb_inst_update]
-										      
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_DIR_VAL                      ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_DIR_ACK                      ; //[nb_inst_update]
-  public    : SC_OUT(Taddress_t)           ** out_UPDATE_DIR_ADDRESS                  ; //[nb_inst_update]
-  public    : SC_OUT(Thistory_t)           ** out_UPDATE_DIR_HISTORY                  ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_DIR_DIRECTION                ; //[nb_inst_update]
-										      
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_VAL                      ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t)           **  in_UPDATE_RAS_ACK                      ; //[nb_inst_update]
-  public    : SC_OUT(Tcontext_t)           ** out_UPDATE_RAS_CONTEXT_ID               ; //[nb_inst_update] 
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_PUSH                     ; //[nb_inst_update]
-  public    : SC_OUT(Taddress_t)           ** out_UPDATE_RAS_ADDRESS                  ; //[nb_inst_update]
-  public    : SC_OUT(Tptr_t    )           ** out_UPDATE_RAS_INDEX                    ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_MISS_PREDICTION          ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t)           ** out_UPDATE_RAS_PREDICTION_IFETCH        ; //[nb_inst_update]
-										      
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_VAL                      ; //[nb_inst_update]
-  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_UPT_ACK                      ; //[nb_inst_update]
-  public    : SC_IN (Tcontext_t         )  **  in_UPDATE_UPT_CONTEXT_ID               ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_MISS_PREDICTION          ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIRECTION_GOOD           ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_BTB_VAL                  ; //[nb_inst_update]
-  public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_SRC          ; //[nb_inst_update]
-  public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_DEST         ; //[nb_inst_update]
-  public    : SC_IN (Tbranch_condition_t)  **  in_UPDATE_UPT_BTB_CONDITION            ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIR_VAL                  ; //[nb_inst_update]
-  public    : SC_IN (Thistory_t         )  **  in_UPDATE_UPT_DIR_HISTORY              ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_VAL                  ; //[nb_inst_update]
-  public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_RAS_ADDRESS              ; //[nb_inst_update]
-  public    : SC_IN (Tptr_t             )  **  in_UPDATE_UPT_RAS_INDEX                ; //[nb_inst_update]
-  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PREDICTION_IFETCH    ; //[nb_inst_update]
+  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_VAL                      ; //[nb_inst_branch_update]
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_BTB_ACK                      ; //[nb_inst_branch_update]
+//public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_BTB_CONTEXT_ID               ; //[nb_inst_branch_update] UPT.CONTEXT_ID
+//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_SRC              ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC
+//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_BTB_ADDRESS_DEST             ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_DEST
+//public    : SC_OUT(Tbranch_condition_t)  ** out_UPDATE_BTB_CONDITION                ; //[nb_inst_branch_update]*UPT.BTB_CONDITION
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_LAST_TAKE                ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_BTB_MISS_PREDICTION          ; //[nb_inst_branch_update] UPT.MISS_PREDICTION
+										      
+  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_VAL                      ; //[nb_inst_branch_update]
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_DIR_ACK                      ; //[nb_inst_branch_update]
+//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_DIR_ADDRESS                  ; //[nb_inst_branch_update] UPT.BTB_ADDRESS_SRC
+//public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY                  ; //[nb_inst_branch_update] UPT.DIR_HISTORY
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_DIR_DIRECTION                ; //[nb_inst_branch_update] UPT.DIRECTION_GOOD
+										      
+  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_VAL                      ; //[nb_inst_branch_update]
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_RAS_ACK                      ; //[nb_inst_branch_update]
+//public    : SC_OUT(Tcontext_t         )  ** out_UPDATE_RAS_CONTEXT_ID               ; //[nb_inst_branch_update] UPT.CONTEXT_ID
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PUSH                     ; //[nb_inst_branch_update] UPT.RAS_PUSH
+//public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS                  ; //[nb_inst_branch_update] UPT.RAS_ADDRESS
+//public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX                    ; //[nb_inst_branch_update] UPT.RAS_INDEX
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_MISS_PREDICTION          ; //[nb_inst_branch_update] UPT.MISS_PREDICTION
+//public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PREDICTION_IFETCH        ; //[nb_inst_branch_update] UPT.RAS_PREDICTION_IFETCH
+										      
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_VAL                      ; //[nb_inst_branch_update]
+  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_UPT_ACK                      ; //[nb_inst_branch_update]
+//public    : SC_IN (Tcontext_t         )  **  in_UPDATE_UPT_CONTEXT_ID               ; //[nb_inst_branch_update] BTB.CONTEXT_ID, RAS.CONTEXT_ID
+//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_MISS_PREDICTION          ; //[nb_inst_branch_update] BTB.MISS_PREDICTION, RAS.MISS_PREDICTION
+//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIRECTION_GOOD           ; //[nb_inst_branch_update] BTB.LAST_TAKE, DIR.DIRECTION
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_BTB_VAL                  ; //[nb_inst_branch_update]
+//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_SRC          ; //[nb_inst_branch_update] DIR.ADDRESS, BTB.ADDRESS_SRC
+//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_BTB_ADDRESS_DEST         ; //[nb_inst_branch_update] BTB.ADDRESS_DEST
+//public    : SC_IN (Tbranch_condition_t)  **  in_UPDATE_UPT_BTB_CONDITION            ; //[nb_inst_branch_update]*BTB.CONDITION
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_DIR_VAL                  ; //[nb_inst_branch_update]
+//public    : SC_IN (Thistory_t         )  **  in_UPDATE_UPT_DIR_HISTORY              ; //[nb_inst_branch_update] DIR.HISTORY
+  public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_VAL                  ; //[nb_inst_branch_update]
+//public    : SC_IN (Taddress_t         )  **  in_UPDATE_UPT_RAS_ADDRESS              ; //[nb_inst_branch_update] RAS.ADDRESS
+//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PUSH                 ; //[nb_inst_branch_update] RAS.PUSH
+//public    : SC_IN (Tptr_t             )  **  in_UPDATE_UPT_RAS_INDEX                ; //[nb_inst_branch_update] RAS.INDEX
+//public    : SC_IN (Tcontrol_t         )  **  in_UPDATE_UPT_RAS_PREDICTION_IFETCH    ; //[nb_inst_branch_update] RAS.PREDICTION_IFETCH
 										      
     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_NB_BRANCH                 ; //[nb_context]
   public    : SC_IN (Tdepth_t           )  **  in_DEPTH_UPT_TAIL                      ; //[nb_context]
+  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH                     ; //[nb_context]
+  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL                          ; //[nb_context]
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -196,4 +212,5 @@
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
   private   : uint32_t                         reg_PREDICT_PRIORITY;
+  private   : uint32_t                         reg_DECOD_PRIORITY;
 
     // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -233,6 +250,6 @@
 //public  : void        genMoore                  (void);
   public  : void        genMealy_predict          (void);
-//   public  : void        genMealy_decod            (void);
-//   public  : void        genMealy_update           (void);
+  public  : void        genMealy_decod            (void);
+  public  : void        genMealy_update           (void);
 #endif					       
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters.cpp	(revision 82)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h"
+#include "Common/include/Max.h"
 
 namespace morpheo {
@@ -19,26 +20,36 @@
 #undef  FUNCTION
 #define FUNCTION "Prediction_unit_Glue::Parameters"
-  Parameters::Parameters (uint32_t   nb_context     ,
-			  uint32_t   size_address   ,
-			  uint32_t * nb_instruction ,
-			  uint32_t * size_depth     ,
-			  uint32_t   nb_inst_predict,
-			  uint32_t   nb_inst_decod  ,
-			  uint32_t   nb_inst_update )
+  Parameters::Parameters (uint32_t   nb_context            ,
+			  uint32_t   nb_decod_unit         ,
+// 			  uint32_t   nb_ooo_engine         ,
+			  uint32_t   size_address          ,
+			  uint32_t * nb_instruction        ,
+			  uint32_t * size_depth            ,
+			  uint32_t * nb_inst_decod         ,
+// 			  uint32_t * nb_inst_update        ,
+			  uint32_t   nb_inst_branch_predict,
+			  uint32_t   nb_inst_branch_decod  ,
+			  uint32_t   nb_inst_branch_update )
   {
     log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
 
-    _nb_context                = nb_context             ;
-    _size_address              = size_address           ;
-    _nb_instruction            = nb_instruction         ;
-    _size_depth                = size_depth             ;
-    _nb_inst_predict           = nb_inst_predict        ;
-    _nb_inst_decod             = nb_inst_decod          ;
-    _nb_inst_update            = nb_inst_update         ;
-
+    _nb_context                = nb_context     ;
+    _size_address              = size_address   ;
+    _nb_instruction            = nb_instruction ;
+    _size_depth                = size_depth     ;
+    _nb_decod_unit             = nb_decod_unit  ;
+    _nb_inst_decod             = nb_inst_decod  ;
+//     _nb_ooo_engine             = nb_ooo_engine  ;
+//     _nb_inst_update            = nb_inst_update ;
+    _nb_inst_branch_predict    = nb_inst_branch_predict;
+    _nb_inst_branch_decod      = nb_inst_branch_decod  ;
+    _nb_inst_branch_update     = nb_inst_branch_update ;
+      
     _size_context_id           = log2(_nb_context);
     _size_inst_ifetch_ptr      = new uint32_t [_nb_context];
+    _max_size_depth            = max<uint32_t>(_size_depth,_nb_context);
 
     _have_port_context_id      = (_size_context_id>0);
+    _have_port_max_depth       = (_max_size_depth>0);
     _have_port_depth           = new bool [_nb_context];
     _have_port_inst_ifetch_ptr = new bool [_nb_context];
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_msg_error.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_msg_error.cpp	(revision 82)
@@ -27,5 +27,5 @@
     Parameters_test test ("Prediction_unit_Glue");
 
-    if (_nb_inst_predict > _nb_context)
+    if (_nb_inst_branch_predict > _nb_context)
       test.error("nb_inst_predict must be <= nb_context\n");
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Parameters_print.cpp	(revision 82)
@@ -27,9 +27,14 @@
 
     xml.balise_open("prediction_unit_glue");
-    xml.singleton_begin("nb_context     "); xml.attribut("value",toString(_nb_context     )); xml.singleton_end();
-    xml.singleton_begin("size_address   "); xml.attribut("value",toString(_size_address   )); xml.singleton_end();
-    xml.singleton_begin("nb_inst_predict"); xml.attribut("value",toString(_nb_inst_predict)); xml.singleton_end();
-    xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
-    xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end();
+    xml.singleton_begin("nb_context            "); xml.attribut("value",toString(_nb_context            )); xml.singleton_end();
+    xml.singleton_begin("nb_decod_unit         "); xml.attribut("value",toString(_nb_decod_unit         )); xml.singleton_end();
+//     xml.singleton_begin("nb_ooo_engine         "); xml.attribut("value",toString(_nb_ooo_engine         )); xml.singleton_end();
+    xml.singleton_begin("size_address          "); xml.attribut("value",toString(_size_address          )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_predict"); xml.attribut("value",toString(_nb_inst_branch_predict)); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_decod  "); xml.attribut("value",toString(_nb_inst_branch_decod  )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_update "); xml.attribut("value",toString(_nb_inst_branch_update )); xml.singleton_end();
+
+//     xml.singleton_begin("nb_inst_decod  "); xml.attribut("value",toString(_nb_inst_decod  )); xml.singleton_end();
+//     xml.singleton_begin("nb_inst_update "); xml.attribut("value",toString(_nb_inst_update )); xml.singleton_end();
     for (uint32_t i=0;i<_nb_context; i++)
       {
@@ -38,8 +43,27 @@
         xml.  attribut("id"  ,toString(i));
         xml. balise_open_end();
-	xml.  singleton_begin("nb_instruction "); xml.attribut("value",toString(_nb_instruction [i])); xml.singleton_end();
-	xml.  singleton_begin("size_depth     "); xml.attribut("value",toString(_size_depth     [i])); xml.singleton_end();
+	xml.  singleton_begin("nb_instruction        "); xml.attribut("value",toString(_nb_instruction        [i])); xml.singleton_end();
+	xml.  singleton_begin("size_depth            "); xml.attribut("value",toString(_size_depth            [i])); xml.singleton_end();
         xml. balise_close();
       }
+    for (uint32_t i=0;i<_nb_decod_unit; i++)
+      {
+        xml. balise_open_begin("component");
+        xml.  attribut("type","decod_unit");
+        xml.  attribut("id"  ,toString(i));
+        xml. balise_open_end();
+	xml.  singleton_begin("nb_inst_decod         "); xml.attribut("value",toString(_nb_inst_decod         [i])); xml.singleton_end();
+        xml. balise_close();
+      }
+//     for (uint32_t i=0;i<_nb_ooo_engine; i++)
+//       {
+//         xml. balise_open_begin("component");
+//         xml.  attribut("type","ooo_engine");
+//         xml.  attribut("id"  ,toString(i));
+//         xml. balise_open_end();
+// 	xml.  singleton_begin("nb_inst_update        "); xml.attribut("value",toString(_nb_inst_update        [i])); xml.singleton_end();
+//         xml. balise_close();
+//       }
+
     xml.balise_close();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue.cpp	(revision 82)
@@ -92,5 +92,5 @@
 		      << (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
 	  }
-	for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+	for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	  {
 	    sensitive << (*( in_PREDICT_BTB_ACK              [i]))
@@ -110,4 +110,10 @@
 		      << (*( in_PREDICT_UPT_ACK              [i]));
 	  }
+	for (uint32_t i=0; i<_param->_nb_context; i++)
+	  {
+	    sensitive << (*(in_DEPTH_UPT_NB_BRANCH [i]));
+	    if (_param->_have_port_depth[i])
+	      sensitive << (*(in_DEPTH_UPT_TAIL      [i]));
+	  }
 
 # ifdef SYSTEMCASS_SPECIFIC
@@ -115,4 +121,10 @@
 	for (uint32_t x=0; x<_param->_nb_context; x++)
 	  {
+	    if (_param->_have_port_depth[x])
+	      {
+		(*(out_DEPTH_TAIL                          [x])) (*( in_DEPTH_UPT_TAIL                      [x]));
+	      }
+		(*(out_DEPTH_NB_BRANCH                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [x]));
+
 	    for (uint32_t i=0; i<_param->_nb_context; i++)
 	      {
@@ -121,6 +133,11 @@
 		(*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_ACK                         [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_ACK                         [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -147,6 +164,11 @@
 		(*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_PC_NEXT                     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_PC_NEXT                     [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -173,6 +195,11 @@
 		(*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_PC_NEXT_IS_DS_TAKE          [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -201,6 +228,11 @@
 		(*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_INST_IFETCH_PTR             [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -228,6 +260,11 @@
 		(*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_BRANCH_STATE                [x]))(*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_BRANCH_STATE                [x]))(*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_BRANCH_STATE                [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -256,6 +293,11 @@
 		(*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth [i])
+		  {
+		(*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -285,6 +327,11 @@
 		    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-		  }
-		for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		    if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		      {
+		    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		      }
+		    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+		  }
+		for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 		  {
 		    (*(out_PREDICT_INSTRUCTION_ENABLE          [x][y])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -307,5 +354,5 @@
 	  }
 
-	for (uint32_t x=0; x<_param->_nb_inst_predict; x++)
+	for (uint32_t x=0; x<_param->_nb_inst_branch_predict; x++)
 	  {
 	    for (uint32_t i=0; i<_param->_nb_context; i++)
@@ -315,6 +362,11 @@
 		(*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_BTB_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_BTB_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -343,6 +395,11 @@
 		(*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_BTB_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -370,6 +427,11 @@
 		(*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_BTB_ADDRESS          [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -396,6 +458,11 @@
 		(*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_DIR_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_DIR_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -422,6 +489,11 @@
 		(*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_DIR_ADDRESS_SRC      [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -448,6 +520,11 @@
 		(*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_DIR_STATIC           [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_DIR_STATIC           [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -474,6 +551,11 @@
 // 		(*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 // 		(*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
+// 		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+// 		  {
+// 		(*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+// 		  }
+// 		(*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
 // 	      }
-// 	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+// 	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 // 	      {
 // 		(*(out_PREDICT_DIR_LAST_TAKE        [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -500,6 +582,11 @@
 		(*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_RAS_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_RAS_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -528,6 +615,11 @@
 		(*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_RAS_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -555,6 +647,11 @@
 		(*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_RAS_PUSH             [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_RAS_PUSH             [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -581,6 +678,11 @@
 		(*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_RAS_ADDRESS_PUSH     [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -607,6 +709,11 @@
 		(*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_VAL              [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_VAL              [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -635,6 +742,11 @@
 		(*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_CONTEXT_ID       [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -662,6 +774,11 @@
 		(*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_BTB_ADDRESS_SRC  [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -688,6 +805,11 @@
 		(*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_BTB_ADDRESS_DEST [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -714,6 +836,11 @@
 		(*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_BTB_CONDITION    [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -740,6 +867,11 @@
 		(*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_BTB_LAST_TAKE    [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -766,6 +898,11 @@
 		(*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_BTB_IS_ACCURATE  [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -792,6 +929,11 @@
 // 		(*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 // 		(*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
+// 		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+// 		  {
+// 		(*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+// 		  }
+// 		(*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
 // 	      }
-// 	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+// 	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 // 	      {
 // 		(*(out_PREDICT_UPT_DIR_HISTORY      [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -818,6 +960,11 @@
 		(*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 		(*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
-	      }
-	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+		  {
+		(*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+		  }
+		(*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
+	      }
+	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 	      {
 		(*(out_PREDICT_UPT_RAS_ADDRESS      [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -844,6 +991,11 @@
 // 		(*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT                  [i]));
 // 		(*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_PC_CURRENT_IS_DS_TAKE       [i]));
+// 		if (_param->_have_port_depth[x] and _param->_have_port_depth[i])
+// 		  {
+// 		(*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_TAIL                      [i]));
+// 		  }
+// 		(*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_DEPTH_UPT_NB_BRANCH                 [i]));
 // 	      }
-// 	    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+// 	    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
 // 	      {
 // 		(*(out_PREDICT_UPT_RAS_INDEX        [x])) (*( in_PREDICT_BTB_ACK              [i]));
@@ -865,5 +1017,734 @@
 	  }
 # endif    
+
+	log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_decod");
+
+	SC_METHOD (genMealy_decod);
+	dont_initialize ();
+	sensitive << (*(in_CLOCK)).neg(); // use internal register
+	for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+	  for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+	    {
+	      sensitive << (*(in_DECOD_VAL                         [i][j])) 
+			<< (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j])) 
+			<< (*(in_DECOD_BRANCH_STATE                [i][j])) 
+			<< (*(in_DECOD_BRANCH_CONDITION            [i][j])) 
+			<< (*(in_DECOD_BRANCH_DIRECTION            [i][j])) 
+			<< (*(in_DECOD_ADDRESS_SRC                 [i][j])) 
+			<< (*(in_DECOD_ADDRESS_DEST                [i][j]));
+
+	      if (_param->_have_port_context_id)
+		sensitive << (*(in_DECOD_CONTEXT_ID                  [i][j]));
+	      if (_param->_have_port_max_depth)
+		sensitive << (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+	    }
+	for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+	  {
+	    sensitive << (*(in_DECOD_BTB_ACK                     [i]   )) 
+		      << (*(in_DECOD_RAS_ACK                     [i]   )) 
+		      << (*(in_DECOD_RAS_HIT                     [i]   ))  
+		      << (*(in_DECOD_RAS_ADDRESS_POP             [i]   )) 
+// 		      << (*(in_DECOD_RAS_INDEX                   [i]   )) 
+		      << (*(in_DECOD_UPT_ACK                     [i]   )) ;
+	  }
+
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
 	
+	for (uint32_t x=0; x<_param->_nb_decod_unit; x++)
+	  for (uint32_t y=0; y<_param->_nb_inst_decod[x]; y++)
+	    {
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+  		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_ACK                      [x][y])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		}
+	    }
+
+	for (uint32_t x=0; x<_param->_nb_inst_branch_decod; x++)
+	  {
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      if (_param->_have_port_context_id)
+		{
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		}
+		}
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_SRC          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_ADDRESS_DEST         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_CONDITION            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_LAST_TAKE            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_BTB_IS_ACCURATE          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_RAS_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      if (_param->_have_port_context_id)
+		{   
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j])); 
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j])); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j])); 
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   )); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   )); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   )); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   )); 
+// 		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   )); 
+		    (*(out_DECOD_RAS_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   )); 
+		  }
+		}
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_RAS_PUSH                 [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_RAS_ADDRESS_PUSH         [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_RAS_MISS_PREDICTION      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_VAL                  [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      if (_param->_have_port_context_id)
+		{
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_VAL                         [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_CONTEXT_ID           [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+		}
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_SRC      [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_BTB_ADDRESS_DEST     [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_BTB_CONDITION        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_BTB_LAST_TAKE        [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_RAS_ADDRESS          [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		  }
+
+// 	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+// 		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+// 		  {
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_VAL                         [i][j]));
+//                  if (_param->_have_port_context_id)
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+// 		    if (_param->_have_port_max_depth)
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+// 		  }
+// 	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+// 		{
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+// 		    (*(out_DECOD_UPT_RAS_INDEX            [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+// 		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_VAL                         [i][j])); 
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_CONTEXT_ID                  [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_STATE                [i][j])); 
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j])); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_ADDRESS_DEST                [i][j])); 
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_BTB_ACK                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ACK                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_HIT                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   )); 
+// 		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_RAS_INDEX                   [i]   )); 
+		    (*(out_DECOD_UPT_MISS_IFETCH          [x])) (*(in_DECOD_UPT_ACK                     [i]   )); 
+		  }
+
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_VAL                         [i][j])); 
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_CONTEXT_ID                  [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_STATE                [i][j])); 
+		    if (_param->_have_port_max_depth)
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j])); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_ADDRESS_DEST                [i][j])); 
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_BTB_ACK                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ACK                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_HIT                     [i]   )); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   )); 
+// 		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_RAS_INDEX                   [i]   )); 
+		    (*(out_DECOD_UPT_MISS_DECOD           [x])) (*(in_DECOD_UPT_ACK                     [i]   )); 
+		  }
+
+	      if (_param->_have_port_max_depth)
+		{
+	      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+		for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+		  {
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_VAL                         [i][j]));
+		    if (_param->_have_port_context_id)
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_CONTEXT_ID                  [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_MATCH_INST_IFETCH_PTR       [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_STATE                [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_CONDITION            [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BRANCH_DIRECTION            [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_SRC                 [i][j]));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_ADDRESS_DEST                [i][j]));
+		  }
+	      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+		{
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_BTB_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ACK                     [i]   ));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_HIT                     [i]   ));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_ADDRESS_POP             [i]   ));
+// 		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_RAS_INDEX                   [i]   ));
+		    (*(out_DECOD_UPT_UPDATE_PREDICTION_ID [x])) (*(in_DECOD_UPT_ACK                     [i]   ));
+		}
+		}
+	  }
+# endif
+
+	log_printf(INFO,Prediction_unit_Glue,FUNCTION,"Method - genMealy_update");
+
+	SC_METHOD (genMealy_update);
+	dont_initialize ();
+// 	sensitive << (*(in_CLOCK)).neg(); // don't use internal register
+	for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	  sensitive << (*(in_UPDATE_BTB_ACK           [i]))
+		    << (*(in_UPDATE_DIR_ACK           [i]))
+		    << (*(in_UPDATE_RAS_ACK           [i]))
+		    << (*(in_UPDATE_UPT_VAL           [i]))
+		    << (*(in_UPDATE_UPT_BTB_VAL       [i]))
+		    << (*(in_UPDATE_UPT_DIR_VAL       [i]))
+		    << (*(in_UPDATE_UPT_RAS_VAL       [i]));
+
+# ifdef SYSTEMCASS_SPECIFIC
+	// List dependency information
+	for (uint32_t x=0; x<_param->_nb_inst_branch_update; x++)
+// 	  for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	    {
+	      uint32_t i=x;
+
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
+	      (*(out_UPDATE_BTB_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
+
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
+	      (*(out_UPDATE_DIR_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
+
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_BTB_ACK           [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_DIR_ACK           [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_RAS_ACK           [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_VAL           [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
+	      (*(out_UPDATE_RAS_VAL           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
+
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_BTB_ACK           [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_DIR_ACK           [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_RAS_ACK           [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_VAL           [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_BTB_VAL       [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_DIR_VAL       [i]));
+	      (*(out_UPDATE_UPT_ACK           [x])) (*(in_UPDATE_UPT_RAS_VAL       [i]));
+	    }
+# endif
 #endif
       }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_allocation.cpp	(revision 82)
@@ -16,6 +16,4 @@
 namespace prediction_unit {
 namespace prediction_unit_glue {
-
-
 
 #undef  FUNCTION
@@ -79,5 +77,5 @@
       
       {
-	ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
+	ALLOC1_INTERFACE("predict_btb",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
 	
 	ALLOC1_VALACK_OUT(out_PREDICT_BTB_VAL         ,VAL);
@@ -94,5 +92,5 @@
       
       {
-	ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
+	ALLOC1_INTERFACE("predict_dir",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
 	
 	ALLOC1_VALACK_OUT(out_PREDICT_DIR_VAL        ,VAL);
@@ -106,5 +104,5 @@
       
       {
-	ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
+	ALLOC1_INTERFACE("predict_ras",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
 	
 	ALLOC1_VALACK_OUT(out_PREDICT_RAS_VAL         ,VAL);
@@ -119,5 +117,5 @@
       
       {
-	ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_predict);
+	ALLOC1_INTERFACE("predict_upt",OUT,NORTH,"Interface with ifetch unit",_param->_nb_inst_branch_predict);
 	
 	ALLOC1_VALACK_OUT(out_PREDICT_UPT_VAL             ,VAL);
@@ -135,11 +133,143 @@
     }
     
+    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+    {
+      {
+	ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]);
+	
+	_ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth       ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+      }
+
+      {
+	ALLOC1_INTERFACE("decod_btb",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
+
+	ALLOC1_VALACK_OUT(out_DECOD_BTB_VAL            ,VAL);
+	ALLOC1_VALACK_IN ( in_DECOD_BTB_ACK            ,ACK);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONTEXT_ID     ,"context_id"     ,Tcontext_t         ,_param->_size_context_id);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_SRC    ,"address_src"    ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_ADDRESS_DEST   ,"address_dest"   ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_CONDITION      ,"condition"      ,Tbranch_condition_t,_param->_size_branch_condition);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_LAST_TAKE      ,"last_take"      ,Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_MISS_PREDICTION,"miss_prediction",Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_OUT(out_DECOD_BTB_IS_ACCURATE    ,"is_accurate"    ,Tcontrol_t         ,1);
+      }
+
+      {
+	ALLOC1_INTERFACE("decod_ras",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
+									              
+	ALLOC1_VALACK_OUT(out_DECOD_RAS_VAL            ,VAL);
+	ALLOC1_VALACK_IN ( in_DECOD_RAS_ACK            ,ACK);
+	ALLOC1_SIGNAL_OUT(out_DECOD_RAS_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id); 
+	ALLOC1_SIGNAL_IN ( in_DECOD_RAS_HIT            ,"hit"            ,Tcontrol_t,1); 
+	ALLOC1_SIGNAL_OUT(out_DECOD_RAS_PUSH           ,"push"           ,Tcontrol_t,1);
+	ALLOC1_SIGNAL_OUT(out_DECOD_RAS_ADDRESS_PUSH   ,"address_push"   ,Taddress_t,_param->_size_address);
+	ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS_POP    ,"address_pop"    ,Taddress_t,_param->_size_address);
+// 	ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX          ,"index"          ,Tptr_t    ,_param->_size_ras_index);
+	ALLOC1_SIGNAL_OUT(out_DECOD_RAS_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
+      }
+
+      {
+	ALLOC1_INTERFACE("decod_upt",OUT,NORTH,"Interface with decod unit",_param->_nb_inst_branch_decod);
+										      
+	ALLOC1_VALACK_OUT(out_DECOD_UPT_VAL                 ,VAL);
+	ALLOC1_VALACK_IN ( in_DECOD_UPT_ACK                 ,ACK);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_CONTEXT_ID          ,"context_id"          ,Tcontext_t         ,_param->_size_context_id);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_SRC     ,"btb_address_src"     ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_ADDRESS_DEST    ,"btb_address_dest"    ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_CONDITION       ,"btb_condition"       ,Tbranch_condition_t,_param->_size_branch_condition);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_BTB_LAST_TAKE       ,"btb_last_take"       ,Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
+// 	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_size_ras_index);
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1); 
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_MISS_DECOD          ,"miss_decod"          ,Tcontrol_t         ,1); 
+	ALLOC1_SIGNAL_OUT(out_DECOD_UPT_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth);
+      }
+    }
+
+    // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+    {
+      {
+	ALLOC1_INTERFACE("update_btb",OUT,SOUTH,"Interface with update unit",_param->_nb_inst_branch_update);
+
+        ALLOC1_VALACK_OUT(out_UPDATE_BTB_VAL                  ,VAL);
+        ALLOC1_VALACK_IN ( in_UPDATE_BTB_ACK                  ,ACK);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_SRC          ,"address_src"          ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_ADDRESS_DEST         ,"address_dest"         ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_CONDITION            ,"condition"            ,Tbranch_condition_t,_param->_size_branch_condition);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_LAST_TAKE            ,"last_take"            ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_BTB_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
+      }
+
+      {
+	ALLOC1_INTERFACE("update_dir",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
+
+        ALLOC1_VALACK_OUT(out_UPDATE_DIR_VAL                  ,VAL);
+        ALLOC1_VALACK_IN ( in_UPDATE_DIR_ACK                  ,ACK);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY              ,"history"              ,Thistory_t         ,_param->_size_history);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_DIRECTION            ,"direction"            ,Tcontrol_t         ,1);
+      }
+
+      {
+	ALLOC1_INTERFACE("update_ras",OUT,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
+
+        ALLOC1_VALACK_OUT(out_UPDATE_RAS_VAL                  ,VAL);
+        ALLOC1_VALACK_IN ( in_UPDATE_RAS_ACK                  ,ACK);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH                 ,"push"                 ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS              ,"address"              ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX                ,"index"                ,Tptr_t             ,_param->_size_ras_index);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PREDICTION_IFETCH    ,"prediction_ifetch"    ,Tcontrol_t         ,1);
+      }
+
+      {
+	ALLOC1_INTERFACE("update_upt",IN ,NORTH,"Interface with update unit",_param->_nb_inst_branch_update);
+
+        ALLOC1_VALACK_IN ( in_UPDATE_UPT_VAL                  ,VAL);
+        ALLOC1_VALACK_OUT(out_UPDATE_UPT_ACK                  ,ACK);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_CONTEXT_ID           ,"context_id"           ,Tcontext_t         ,_param->_size_context_id);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_MISS_PREDICTION      ,"miss_prediction"      ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIRECTION_GOOD       ,"direction_good"       ,Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_VAL              ,"btb_val"              ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,"btb_address_src"      ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,"btb_address_dest"     ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_BTB_CONDITION        ,"btb_condition"        ,Tbranch_condition_t,_param->_size_branch_condition);
+        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_VAL              ,"dir_val"              ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_DIR_HISTORY          ,"dir_history"          ,Thistory_t         ,_param->_size_history);
+        ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PUSH             ,"ras_push"             ,Tcontrol_t         ,1);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_address);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_size_ras_index);
+//      ALLOC1_SIGNAL_IN ( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,"ras_prediction_ifetch",Tcontrol_t         ,1);
+      }
+    }
+
     // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
     {
       ALLOC1_INTERFACE("depth",IN,NORTH,"Interface with depth",_param->_nb_context);
-      
-      ALLOC1_SIGNAL_IN (in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]);
-      ALLOC1_SIGNAL_IN (in_DEPTH_UPT_TAIL     ,"upt_tail"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
-    }
+
+      ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_NB_BRANCH,"upt_nb_branch",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
+      ALLOC1_SIGNAL_IN ( in_DEPTH_UPT_TAIL     ,"upt_tail"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
+      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH    ,"nb_branch"    ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
+      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL         ,"tail"         ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
+    }
+
+    // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+
+#ifndef NO_INIT
+    reg_PREDICT_PRIORITY = 0;
+    reg_DECOD_PRIORITY   = 0;
+#endif
 
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_deallocation.cpp	(revision 82)
@@ -29,4 +29,5 @@
 	delete    in_NRESET;
 
+
 	// ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context     ,1);
@@ -41,44 +42,132 @@
         DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context     ,_param->_size_depth [alloc_signal_it1]);
         DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context     ,_param->_nb_instruction[alloc_signal_it1],1);
-        DELETE1_SIGNAL(out_PREDICT_BTB_VAL                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL( in_PREDICT_BTB_ACK                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
-        DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS                ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL( in_PREDICT_BTB_HIT                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC            ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST           ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION              ,_param->_nb_inst_predict,_param->_size_branch_condition);
-//      DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE              ,_param->_nb_inst_predict,1);
-	DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE            ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_DIR_VAL                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL( in_PREDICT_DIR_ACK                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC            ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL(out_PREDICT_DIR_STATIC                 ,_param->_nb_inst_predict,1);
-//      DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE              ,_param->_nb_inst_predict,1);
-//      DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY                ,_param->_nb_inst_predict,_param->_size_history);
-        DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION              ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_RAS_VAL                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL( in_PREDICT_RAS_ACK                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
-        DELETE1_SIGNAL( in_PREDICT_RAS_HIT                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_RAS_PUSH                   ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH           ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP            ,_param->_nb_inst_predict,_param->_size_address);
-//      DELETE1_SIGNAL( in_PREDICT_RAS_INDEX                  ,_param->_nb_inst_predict,_param->_size_ras_index);
-        DELETE1_SIGNAL(out_PREDICT_UPT_VAL                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL( in_PREDICT_UPT_ACK                    ,_param->_nb_inst_predict,1);
-        DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID             ,_param->_nb_inst_predict,_param->_size_context_id);
-        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_predict,_param->_size_address);
-        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION          ,_param->_nb_inst_predict,_param->_size_branch_condition);
-        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_predict,1);
-	DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE        ,_param->_nb_inst_predict,1);
-//      DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY            ,_param->_nb_inst_predict,_param->_size_history);
-        DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS            ,_param->_nb_inst_predict,_param->_size_address);
-//      DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX              ,_param->_nb_inst_predict,_param->_size_ras_index);
+        DELETE1_SIGNAL(out_PREDICT_BTB_VAL                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_BTB_ACK                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
+        DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS                ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL( in_PREDICT_BTB_HIT                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST           ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION              ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
+//      DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
+	DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE            ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_DIR_VAL                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_DIR_ACK                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC            ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL(out_PREDICT_DIR_STATIC                 ,_param->_nb_inst_branch_predict,1);
+//      DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE              ,_param->_nb_inst_branch_predict,1);
+//      DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY                ,_param->_nb_inst_branch_predict,_param->_size_history);
+        DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION              ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_RAS_VAL                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_RAS_ACK                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
+        DELETE1_SIGNAL( in_PREDICT_RAS_HIT                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_RAS_PUSH                   ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH           ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP            ,_param->_nb_inst_branch_predict,_param->_size_address);
+//      DELETE1_SIGNAL( in_PREDICT_RAS_INDEX                  ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
+        DELETE1_SIGNAL(out_PREDICT_UPT_VAL                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_UPT_ACK                    ,_param->_nb_inst_branch_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID             ,_param->_nb_inst_branch_predict,_param->_size_context_id);
+        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC        ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST       ,_param->_nb_inst_branch_predict,_param->_size_address);
+        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION          ,_param->_nb_inst_branch_predict,_param->_size_branch_condition);
+        DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE          ,_param->_nb_inst_branch_predict,1);
+	DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE        ,_param->_nb_inst_branch_predict,1);
+//      DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY            ,_param->_nb_inst_branch_predict,_param->_size_history);
+        DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS            ,_param->_nb_inst_branch_predict,_param->_size_address);
+//      DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX              ,_param->_nb_inst_branch_predict,_param->_size_ras_index);
+
+	// ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
+	DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
+	DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id      );
+	DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state    );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth       );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition);
+	DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
+	DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
+	DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
+	DELETE1_SIGNAL(out_DECOD_BTB_VAL            ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL( in_DECOD_BTB_ACK            ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_BTB_CONTEXT_ID     ,_param->_nb_inst_branch_decod,_param->_size_context_id);
+	DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC    ,_param->_nb_inst_branch_decod,_param->_size_address);
+	DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST   ,_param->_nb_inst_branch_decod,_param->_size_address);
+	DELETE1_SIGNAL(out_DECOD_BTB_CONDITION      ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
+	DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE      ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_BTB_MISS_PREDICTION,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_BTB_IS_ACCURATE    ,_param->_nb_inst_branch_decod,1);
+
+	DELETE1_SIGNAL(out_DECOD_RAS_VAL            ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL( in_DECOD_RAS_ACK            ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_RAS_CONTEXT_ID     ,_param->_nb_inst_branch_decod,_param->_size_context_id); 
+	DELETE1_SIGNAL( in_DECOD_RAS_HIT            ,_param->_nb_inst_branch_decod,1); 
+	DELETE1_SIGNAL(out_DECOD_RAS_PUSH           ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH   ,_param->_nb_inst_branch_decod,_param->_size_address);
+	DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP    ,_param->_nb_inst_branch_decod,_param->_size_address);
+// 	DELETE1_SIGNAL( in_DECOD_RAS_INDEX          ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
+	DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1);
+
+	DELETE1_SIGNAL(out_DECOD_UPT_VAL                 ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL( in_DECOD_UPT_ACK                 ,_param->_nb_inst_branch_decod,1);
+ 	DELETE1_SIGNAL(out_DECOD_UPT_CONTEXT_ID          ,_param->_nb_inst_branch_decod,_param->_size_context_id);
+	DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC     ,_param->_nb_inst_branch_decod,_param->_size_address);
+	DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST    ,_param->_nb_inst_branch_decod,_param->_size_address);
+	DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION       ,_param->_nb_inst_branch_decod,_param->_size_branch_condition);
+	DELETE1_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE       ,_param->_nb_inst_branch_decod,1);
+	DELETE1_SIGNAL(out_DECOD_UPT_RAS_ADDRESS         ,_param->_nb_inst_branch_decod,_param->_size_address);
+// 	DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX           ,_param->_nb_inst_branch_decod,_param->_size_ras_index);
+	DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH         ,_param->_nb_inst_branch_decod,1); 
+	DELETE1_SIGNAL(out_DECOD_UPT_MISS_DECOD          ,_param->_nb_inst_branch_decod,1); 
+	DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_max_size_depth);
+
+	// ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+        DELETE1_SIGNAL(out_UPDATE_BTB_VAL                  ,_param->_nb_inst_branch_update,1);
+        DELETE1_SIGNAL( in_UPDATE_BTB_ACK                  ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC          ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST         ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION            ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE            ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
+
+        DELETE1_SIGNAL(out_UPDATE_DIR_VAL                  ,_param->_nb_inst_branch_update,1);
+        DELETE1_SIGNAL( in_UPDATE_DIR_ACK                  ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY              ,_param->_nb_inst_branch_update,_param->_size_history);
+//      DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION            ,_param->_nb_inst_branch_update,1);
+
+        DELETE1_SIGNAL(out_UPDATE_RAS_VAL                  ,_param->_nb_inst_branch_update,1);
+        DELETE1_SIGNAL( in_UPDATE_RAS_ACK                  ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_PUSH                 ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS              ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_INDEX                ,_param->_nb_inst_branch_update,_param->_size_ras_index);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH    ,_param->_nb_inst_branch_update,1);
+
+        DELETE1_SIGNAL( in_UPDATE_UPT_VAL                  ,_param->_nb_inst_branch_update,1);
+        DELETE1_SIGNAL(out_UPDATE_UPT_ACK                  ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_CONTEXT_ID           ,_param->_nb_inst_branch_update,_param->_size_context_id);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION      ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD       ,_param->_nb_inst_branch_update,1);
+        DELETE1_SIGNAL( in_UPDATE_UPT_BTB_VAL              ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC      ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST     ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION        ,_param->_nb_inst_branch_update,_param->_size_branch_condition);
+        DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL              ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_DIR_HISTORY          ,_param->_nb_inst_branch_update,_param->_size_history);
+        DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL              ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PUSH             ,_param->_nb_inst_branch_update,1);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS          ,_param->_nb_inst_branch_update,_param->_size_address);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX            ,_param->_nb_inst_branch_update,_param->_size_ras_index);
+//      DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1);
 
 	// ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
-	DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
+	DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
 	DELETE1_SIGNAL( in_DEPTH_UPT_TAIL     ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
+	DELETE1_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
+	DELETE1_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
       }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp	(revision 82)
@@ -0,0 +1,264 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace prediction_unit_glue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Prediction_unit_Glue::genMealy_decod"
+  void Prediction_unit_Glue::genMealy_decod (void)
+  {
+    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
+
+    uint32_t   decod_unit = reg_DECOD_PRIORITY;
+
+    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * decod_unit : %d",decod_unit);
+
+    Tcontrol_t ack [_param->_nb_inst_decod[decod_unit]];
+    
+    for (uint32_t i=0;i<_param->_nb_inst_decod[decod_unit]; i++)
+      ack [i] = true;
+
+    Tcontrol_t btb_val [_param->_nb_inst_branch_decod];
+    Tcontrol_t ras_val [_param->_nb_inst_branch_decod];
+    Tcontrol_t upt_val [_param->_nb_inst_branch_decod];
+
+    for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+      {
+	btb_val [i] = false;
+	ras_val [i] = false;
+	upt_val [i] = false;
+      }
+
+    uint32_t port = 0;
+    for (uint32_t i=0; i<_param->_nb_inst_decod[decod_unit]; i++)
+      // Test if decod_unit have detected a branch
+      if ((port>=_param->_nb_inst_branch_decod) or
+	  (PORT_READ(in_DECOD_VAL [decod_unit][i]) == 0))
+	{
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * DECOD[%d][%d] : not valid",decod_unit,i);
+	  ack [i] = false;
+	}
+      else
+	{
+	  Tcontext_t          context               = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [decod_unit][i]):0;
+	  Tbranch_state_t     branch_state          = PORT_READ(in_DECOD_BRANCH_STATE          [decod_unit][i]);
+	  Tcontrol_t          match_inst_ifetch_ptr = PORT_READ(in_DECOD_MATCH_INST_IFETCH_PTR [decod_unit][i]);
+	  Tprediction_ptr_t   depth   = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_BRANCH_UPDATE_PREDICTION_ID [decod_unit][i]):0;
+	  Tcontrol_t          use_btb = false;
+	  Tcontrol_t          use_ras = false;
+	  Tcontrol_t          use_upt = true ;
+	  Tcontrol_t          miss_ifetch    = ( (branch_state == BRANCH_STATE_NONE) or // branch not detected
+						 ((branch_state != BRANCH_STATE_NONE) and (match_inst_ifetch_ptr == 0))); // branch detected, but it's not the good
+	  Tcontrol_t          miss_decod;
+
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * DECOD[%d][%d] :     valid",decod_unit,i);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * depth   [%d] : %d",i   ,depth);
+
+	  // Test if ifetch have detecte a branch is the packet
+	  if (miss_ifetch)
+	    {
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * miss_ifetch");
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * state : %d",branch_state);
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"      * match : %d",match_inst_ifetch_ptr);
+	      Tbranch_condition_t condition             = PORT_READ(in_DECOD_BRANCH_CONDITION            [decod_unit][i]);
+	      Tcontrol_t          direction             = PORT_READ(in_DECOD_BRANCH_DIRECTION            [decod_unit][i]);
+	      Taddress_t          address_src           = PORT_READ(in_DECOD_ADDRESS_SRC                 [decod_unit][i]);
+	      Taddress_t          address_dest          = PORT_READ(in_DECOD_ADDRESS_DEST                [decod_unit][i]);
+	      Tcontrol_t          is_accurate;
+
+	      // Miss speculation
+	      use_btb = true;
+	      
+	      switch (condition)
+		{
+		case BRANCH_CONDITION_NONE_WITH_WRITE_STACK             :
+		  {
+		    // Write stack
+		    is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
+		    miss_decod  = false;
+		    use_ras     = true;
+
+		    PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
+		    PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
+		    
+		    break;
+		  }
+
+		case BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK    :
+		  {
+		    // Write stack
+		    is_accurate = false;
+		    miss_decod  = false;
+		    use_ras     = true;
+
+		    PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
+		    PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
+		    
+		    break;
+		  }
+		case BRANCH_CONDITION_READ_STACK                        :
+		  {
+		    // Read stack
+		    is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
+		    miss_decod  = false;
+		    use_ras     = true;
+
+		    PORT_WRITE(out_DECOD_RAS_PUSH         [port],0);
+		    address_dest = PORT_READ(in_DECOD_RAS_ADDRESS_POP [port]);
+		    
+		    break;
+		  }
+		case BRANCH_CONDITION_READ_REGISTER_WITHOUT_WRITE_STACK :
+		  {
+		    //   * READ_REGISTER_WITHOUT_WRITE_STACK : Take but destination is unknow - don't continue
+		    is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
+		    miss_decod  = true;
+
+		    break;
+		  }
+
+		case BRANCH_CONDITION_FLAG_UNSET                        :
+		case BRANCH_CONDITION_FLAG_SET                          :
+		  {
+		    // No access at the flag
+		    //   * FLAG                              : static direction and destination is know
+		    is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]);
+		    miss_decod  = false;
+
+		    break;
+		  }
+
+		case BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK          :
+		  {
+		    // No access at the flag
+		    //   * NONE_WITHOUT_WRITE_STACK          : take and destination is know
+		    is_accurate = false;
+		    miss_decod  = false;
+		    use_ras     = true;
+
+		    PORT_WRITE(out_DECOD_RAS_PUSH         [port],1);
+		    PORT_WRITE(out_DECOD_RAS_ADDRESS_PUSH [port],address_dest);
+
+		    break;
+		  }
+
+		}
+
+	      if (use_btb)
+		{
+		  if (_param->_have_port_context_id)
+	          PORT_WRITE(out_DECOD_BTB_CONTEXT_ID      [port],context);
+		  PORT_WRITE(out_DECOD_BTB_ADDRESS_SRC     [port],address_src);
+		  PORT_WRITE(out_DECOD_BTB_ADDRESS_DEST    [port],address_dest);
+		  PORT_WRITE(out_DECOD_BTB_CONDITION       [port],condition);
+		  PORT_WRITE(out_DECOD_BTB_LAST_TAKE       [port],direction);
+		  PORT_WRITE(out_DECOD_BTB_MISS_PREDICTION [port],1);
+		  PORT_WRITE(out_DECOD_BTB_IS_ACCURATE     [port],is_accurate);
+		}
+	      if (use_ras)
+		{
+		  miss_decod |= not PORT_READ(in_DECOD_RAS_HIT [port]);
+
+		  if (_param->_have_port_context_id)
+		  PORT_WRITE(out_DECOD_RAS_CONTEXT_ID      [port],context);
+		  PORT_WRITE(out_DECOD_RAS_MISS_PREDICTION [port],1);
+		}
+	      if (use_upt)
+		{
+		  PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_SRC      [port],address_src);
+		  PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_DEST     [port],address_dest);
+		  PORT_WRITE(out_DECOD_UPT_BTB_CONDITION        [port],condition);
+		  PORT_WRITE(out_DECOD_UPT_BTB_LAST_TAKE        [port],direction);
+		  PORT_WRITE(out_DECOD_UPT_RAS_ADDRESS          [port],PORT_READ(in_DECOD_RAS_ADDRESS_POP [port]));
+		}
+	    }
+	  else
+	    {
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * hit");
+
+	      miss_decod = false;
+	      // Hit speculation
+	    }
+	  
+	  // in all case
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * use_btb : %d",use_btb);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * use_ras : %d",use_ras);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * use_upt : %d",use_upt);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * btb_ack [%d] : %d",port,PORT_READ(in_DECOD_BTB_ACK [port]));
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * ras_ack [%d] : %d",port,PORT_READ(in_DECOD_RAS_ACK [port]));
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * upt_ack [%d] : %d",port,PORT_READ(in_DECOD_UPT_ACK [port]));
+  
+	  btb_val [port] = (use_btb and
+			    (not use_ras or (use_ras and PORT_READ(in_DECOD_RAS_ACK [port]))) and 
+			    (not use_upt or (use_upt and PORT_READ(in_DECOD_UPT_ACK [port]))));
+	  
+	  ras_val [port] = (use_ras and
+			    (not use_btb or (use_btb and PORT_READ(in_DECOD_BTB_ACK [port]))) and 
+			    (not use_upt or (use_upt and PORT_READ(in_DECOD_UPT_ACK [port]))));
+	  
+	  upt_val [port] = (use_upt and
+			    (not use_btb or (use_btb and PORT_READ(in_DECOD_BTB_ACK [port]))) and 
+			    (not use_ras or (use_ras and PORT_READ(in_DECOD_RAS_ACK [port]))));
+
+	  if (use_btb)
+	    ack [i] &= btb_val [port] and PORT_READ(in_DECOD_BTB_ACK [port]);
+	  if (use_ras)
+	    ack [i] &= ras_val [port] and PORT_READ(in_DECOD_RAS_ACK [port]);
+	  if (use_upt)
+	    ack [i] &= upt_val [port] and PORT_READ(in_DECOD_UPT_ACK [port]);
+	  
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * btb_val [%d] : %d",port,btb_val [port]);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * ras_val [%d] : %d",port,ras_val [port]);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * upt_val [%d] : %d",port,upt_val [port]);
+	  log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * ack     [%d] : %d",i   ,ack     [i   ]);
+
+	  if (_param->_have_port_context_id)
+	  PORT_WRITE(out_DECOD_UPT_CONTEXT_ID           [port],context);
+	  PORT_WRITE(out_DECOD_UPT_MISS_IFETCH          [port],miss_ifetch); 
+	  PORT_WRITE(out_DECOD_UPT_MISS_DECOD           [port],miss_decod ); 
+	  if (_param->_have_port_max_depth)
+	  PORT_WRITE(out_DECOD_UPT_UPDATE_PREDICTION_ID [port],depth);
+	  
+	  port ++;
+	}
+    
+    for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+      {
+	PORT_WRITE(out_DECOD_BTB_VAL [i], btb_val [i]);
+	PORT_WRITE(out_DECOD_RAS_VAL [i], ras_val [i]);
+	PORT_WRITE(out_DECOD_UPT_VAL [i], upt_val [i]);
+      }
+
+    for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+      for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+	if (i!= decod_unit)
+	  PORT_WRITE(out_DECOD_ACK [i][j], 0);
+	else
+	  PORT_WRITE(out_DECOD_ACK [i][j], ack[j]);
+
+    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
+  };
+
+}; // end namespace prediction_unit_glue
+}; // end namespace prediction_unit
+}; // end namespace front_end
+}; // end namespace multi_front_end
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_predict.cpp	(revision 82)
@@ -26,7 +26,15 @@
     Tcontrol_t ack [_param->_nb_context];
     for (uint32_t i=0; i<_param->_nb_context; i++)
-      ack [i] = 0;
-    
-    for (uint32_t i=0; i<_param->_nb_inst_predict; i++)
+      {
+	ack [i] = 0;
+
+	if (_param->_have_port_depth[i])
+	  {
+	    PORT_WRITE(out_DEPTH_TAIL      [i],PORT_READ(in_DEPTH_UPT_TAIL      [i]));
+	  }
+	    PORT_WRITE(out_DEPTH_NB_BRANCH [i],PORT_READ(in_DEPTH_UPT_NB_BRANCH [i]));
+      }
+
+    for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
       {
 	log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"PREDICT [%d]",i);
@@ -136,5 +144,5 @@
 			{
 			  branch_state = BRANCH_STATE_SPEC_NTAKE;
-			  pc_next      = address_src+8; // +4 = delay slot
+			  pc_next      = address_src+2; // +1 = delay slot
 			}
 		      break;
@@ -191,5 +199,5 @@
 		    PORT_WRITE(out_PREDICT_RAS_CONTEXT_ID   [i], context);
 		    PORT_WRITE(out_PREDICT_RAS_PUSH         [i], push); 
-		    PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+8); 
+		    PORT_WRITE(out_PREDICT_RAS_ADDRESS_PUSH [i], address_src+2); 
 
 		    is_accurate &= PORT_READ(in_PREDICT_RAS_HIT [i]); // if miss - prediction is not accurate
@@ -221,15 +229,18 @@
 // 				 (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
 
-		dir_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 
-			   (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])) and 
-			   (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
-
-		ras_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 
-			   (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and 
-			   (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i])));
-
-		upt_val = (PORT_READ(in_PREDICT_BTB_ACK [i]) and 
-			   (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i])) and 
-			   (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i])));
+		dir_val = (use_dir and
+			   PORT_READ(in_PREDICT_BTB_ACK [i]) and 
+			   (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))) and 
+			   (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
+
+		ras_val = (use_ras and
+			   PORT_READ(in_PREDICT_BTB_ACK [i]) and 
+			   (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 
+			   (not use_upt or (use_upt and PORT_READ(in_PREDICT_UPT_ACK [i]))));
+
+		upt_val = (use_upt and
+			   PORT_READ(in_PREDICT_BTB_ACK [i]) and 
+			   (not use_dir or (use_dir and PORT_READ(in_PREDICT_DIR_ACK [i]))) and 
+			   (not use_ras or (use_ras and PORT_READ(in_PREDICT_RAS_ACK [i]))));
 
 // 		pc_next      - is previously computed
@@ -238,7 +249,11 @@
 		Taddress_t address_src_lsb  = address_src%_param->_nb_instruction [context];
 
+		log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_src     : 0x%x",address_src);
+		log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_src_lsb : %d",address_src_lsb);
 		if (address_src_lsb == (_param->_nb_instruction [context]-1))
 		  {
 		    // branch is in the last slot of the packet
+		    log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * branch is in the last slot of the packet");
+		
 		    address_msb        = _param->_nb_instruction [context]; // == (address_src_lsb+1)
 		    pc_next_is_ds_take = 1;
@@ -250,7 +265,8 @@
 		    pc_next_is_ds_take = 0;
 		  }
+		log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * address_msb     : %d",address_msb);
 
 		inst_ifetch_ptr             = address_src_lsb;
-		branch_update_prediction_id = (PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context];
+		branch_update_prediction_id = (_param->_have_port_depth[context])?((PORT_READ(in_DEPTH_UPT_TAIL[context])+PORT_READ(in_DEPTH_UPT_NB_BRANCH [context]))%_param->_size_depth[context]):0;
 	      }
 	    else
@@ -270,4 +286,11 @@
 	      PORT_WRITE(out_PREDICT_PC_NEXT                     [context]   , pc_next                    );
 	      PORT_WRITE(out_PREDICT_PC_NEXT_IS_DS_TAKE          [context]   , pc_next_is_ds_take         );
+
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"  * instruction enable :");
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * nb_inst : %d",_param->_nb_instruction [context]);
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [0:%d[ = 0",address_lsb);
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [%d:%d[ = 1",address_lsb,((pc_current_is_ds_take)?1:address_msb));
+	      log_printf(TRACE,Prediction_unit_Glue,FUNCTION,"    * [%d:%d[ = 0",((pc_current_is_ds_take)?1:address_msb),_param->_nb_instruction [context]);
+
 	      for (uint32_t j=0; j<address_lsb; j++)
 	      PORT_WRITE(out_PREDICT_INSTRUCTION_ENABLE          [context][j], 0); // Before the address : not valid
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_update.cpp	(revision 82)
@@ -0,0 +1,65 @@
+#ifdef SYSTEMC
+/*
+ * $Id$
+ *
+ * [ Description ]
+ * 
+ */
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h"
+
+namespace morpheo                    {
+namespace behavioural {
+namespace core {
+namespace multi_front_end {
+namespace front_end {
+namespace prediction_unit {
+namespace prediction_unit_glue {
+
+
+#undef  FUNCTION
+#define FUNCTION "Prediction_unit_Glue::genMealy_update"
+  void Prediction_unit_Glue::genMealy_update (void)
+  {
+    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin");
+
+//     for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+//       {
+// 	Tcontrol_t btb_ack     = PORT_READ(in_UPDATE_BTB_ACK [i]);
+// 	Tcontrol_t dir_ack     = PORT_READ(in_UPDATE_DIR_ACK [i]);
+// 	Tcontrol_t ras_ack     = PORT_READ(in_UPDATE_RAS_ACK [i]);
+// 	Tcontrol_t upt_val     = PORT_READ(in_UPDATE_UPT_VAL [i]);
+
+// 	Tcontrol_t need_btb = PORT_READ(in_UPDATE_UPT_BTB_VAL [i]);
+// 	Tcontrol_t need_dir = PORT_READ(in_UPDATE_UPT_DIR_VAL [i]);
+// 	Tcontrol_t need_ras = PORT_READ(in_UPDATE_UPT_RAS_VAL [i]);
+	
+// 	PORT_WRITE(out_UPDATE_BTB_VAL [i], (upt_val and need_btb and
+// 					    (not need_dir or (need_dir and dir_ack)) and
+// 					    (not need_ras or (need_ras and ras_ack))));
+
+// 	PORT_WRITE(out_UPDATE_DIR_VAL [i], (upt_val and need_dir and
+// 					    (not need_btb or (need_btb and btb_ack)) and
+// 					    (not need_ras or (need_ras and ras_ack))));
+
+// 	PORT_WRITE(out_UPDATE_RAS_VAL [i], (upt_val and need_ras and
+// 					    (not need_btb or (need_btb and btb_ack)) and
+// 					    (not need_dir or (need_dir and dir_ack))));
+
+// 	PORT_WRITE(out_UPDATE_UPT_ACK [i], ((not need_btb or (need_btb and btb_ack)) and
+// 					    (not need_dir or (need_dir and dir_ack)) and
+// 					    (not need_ras or (need_ras and ras_ack))));
+//       }
+
+    log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End");
+  };
+
+}; // end namespace prediction_unit_glue
+}; // end namespace prediction_unit
+}; // end namespace front_end
+}; // end namespace multi_front_end
+}; // end namespace core
+
+}; // end namespace behavioural
+}; // end namespace morpheo              
+#endif
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_transition.cpp	(revision 82)
@@ -27,9 +27,11 @@
       {
 	reg_PREDICT_PRIORITY = 0;
+	reg_DECOD_PRIORITY   = 0;
       }
     else
       {
 	// Round robin priority
-	reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_predict)%_param->_nb_context;
+	reg_PREDICT_PRIORITY = (reg_PREDICT_PRIORITY+_param->_nb_inst_branch_predict)%_param->_nb_context; 
+	reg_DECOD_PRIORITY   = (reg_DECOD_PRIORITY  +1)%_param->_nb_decod_unit;
       }
 #if defined(STATISTICS) or defined(VHDL_TESTBENCH)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/src/test.cpp	(revision 82)
@@ -7,36 +7,10 @@
  */
 
+#define NB_ITERATION  16
+#define CYCLE_MAX     (1024*NB_ITERATION)
+
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/SelfTest/include/test.h"
 #include "Common/include/Test.h"
 #include "Behavioural/include/Allocation.h"
-
-#define NB_ITERATION  16
-#define CYCLE_MAX     (1024*NB_ITERATION)
-
-#define LABEL(str...)							\
-  {									\
-    msg (_("{%d} "),static_cast<uint32_t>(sc_simulation_time()));	\
-    msg (str);								\
-    msg (_("\n"));							\
-  } while(0)
-
-#define SC_START(cycle_offset)						\
-  do									\
-    {									\
-      uint32_t cycle_current = static_cast<uint32_t>(sc_simulation_time()); \
-      if (cycle_offset != 0)						\
-	{								\
-	  cout << "##########[ cycle "<< cycle_current+cycle_offset << " ]"; \
-	  cout << " (" << __LINE__ << ")" << endl;			\
-	}								\
-      									\
-      if (cycle_current > CYCLE_MAX)					\
-	{								\
-	  TEST_KO("Maximal cycles Reached");				\
-	}								\
-      									\
-      sc_start(cycle_offset);						\
-      									\
-    } while(0)
 
 void test (string name,
@@ -49,9 +23,11 @@
 #endif
 
-  Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack (name.c_str(),
+  Return_Address_Stack * _Return_Address_Stack = new Return_Address_Stack 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
+     _parameters_statistics,
 #endif
-					     _param);
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h	(revision 82)
@@ -128,5 +128,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Return_Address_Stack             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_min.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_min.cfg	(revision 82)
@@ -0,0 +1,38 @@
+Prediction_unit
+1	1	+1 # nb_context                 
+1	1	+1 # nb_decod_unit              
+30	30	+1 # size_address               
+1	1	+1 # nb_instruction             [0] [nb_context]
+1	1	+1 # nb_inst_decod              [0] [nb_decod_unit]
+1	1	+1 # nb_inst_branch_predict     
+1	1	+1 # nb_inst_branch_decod       
+1	1	+1 # nb_inst_branch_update      
+1	1	+1 # nb_inst_branch_complete    
+1	1	+1 # btb_size_queue             
+1	1	+1 # btb_associativity          
+2	2	+1 # btb_size_counter           
+3	3	+1 # btb_victim_scheme          
+1	1	+1 # dir_predictor_scheme       
+1	1	+1 # dir_have_bht               [0] [3]
+1	1	+1 # dir_have_bht               [1] [3]
+1	1	+1 # dir_have_bht               [2] [3]
+1	1	+1 # dir_bht_size_shifter       [0] [3]
+1	1	+1 # dir_bht_size_shifter       [1] [3]
+1	1	+1 # dir_bht_size_shifter       [2] [3]
+1	1	+1 # dir_bht_nb_shifter         [0] [3]
+1	1	+1 # dir_bht_nb_shifter         [1] [3]
+1	1	+1 # dir_bht_nb_shifter         [2] [3]
+1	1	+1 # dir_have_pht               [0] [3]
+1	1	+1 # dir_have_pht               [1] [3]
+1	1	+1 # dir_have_pht               [2] [3]
+1	1	+1 # dir_pht_size_counter       [0] [3]
+1	1	+1 # dir_pht_size_counter       [1] [3]
+1	1	+1 # dir_pht_size_counter       [2] [3]
+1	1	+1 # dir_pht_nb_counter         [0] [3]
+1	1	+1 # dir_pht_nb_counter         [1] [3]
+1	1	+1 # dir_pht_nb_counter         [2] [3]
+1	1	+1 # dir_pht_size_address_share [0] [3]
+1	1	+1 # dir_pht_size_address_share [1] [3]
+1	1	+1 # dir_pht_size_address_share [2] [3]
+2	2	+1 # ras_size_queue             [0] [nb_context]
+1	1	+1 # upt_size_queue             [0] [nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context.cfg	(revision 82)
@@ -0,0 +1,38 @@
+Prediction_unit
+1	1	+1 # nb_context                 
+1	1	+1 # nb_decod_unit              
+30	30	+1 # size_address               
+1	4	*4 # nb_instruction             [0] [nb_context]
+1	1	+1 # nb_inst_decod              [0] [nb_decod_unit]
+1	1	+1 # nb_inst_branch_predict     
+1	1	+1 # nb_inst_branch_decod       
+1	1	+1 # nb_inst_branch_update      
+1	1	+1 # nb_inst_branch_complete    
+2	8	*4 # btb_size_queue             
+2	2	+1 # btb_associativity          
+2	2	+1 # btb_size_counter           
+3	3	+1 # btb_victim_scheme          
+1	1	+1 # dir_predictor_scheme       
+1	1	+1 # dir_have_bht               [0] [3]
+1	1	+1 # dir_have_bht               [1] [3]
+1	1	+1 # dir_have_bht               [2] [3]
+1	1	+1 # dir_bht_size_shifter       [0] [3]
+1	1	+1 # dir_bht_size_shifter       [1] [3]
+1	1	+1 # dir_bht_size_shifter       [2] [3]
+1	1	+1 # dir_bht_nb_shifter         [0] [3]
+1	1	+1 # dir_bht_nb_shifter         [1] [3]
+1	1	+1 # dir_bht_nb_shifter         [2] [3]
+1	1	+1 # dir_have_pht               [0] [3]
+1	1	+1 # dir_have_pht               [1] [3]
+1	1	+1 # dir_have_pht               [2] [3]
+1	1	+1 # dir_pht_size_counter       [0] [3]
+1	1	+1 # dir_pht_size_counter       [1] [3]
+1	1	+1 # dir_pht_size_counter       [2] [3]
+1	1	+1 # dir_pht_nb_counter         [0] [3]
+1	1	+1 # dir_pht_nb_counter         [1] [3]
+1	1	+1 # dir_pht_nb_counter         [2] [3]
+1	1	+1 # dir_pht_size_address_share [0] [3]
+1	1	+1 # dir_pht_size_address_share [1] [3]
+1	1	+1 # dir_pht_size_address_share [2] [3]
+2	4	*2 # ras_size_queue             [0] [nb_context]
+1	4	*4 # upt_size_queue             [0] [nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context_multi_decod.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context_multi_decod.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_mono_context_multi_decod.cfg	(revision 82)
@@ -0,0 +1,41 @@
+Prediction_unit
+1	1	+1 # nb_context                 
+4	4	+1 # nb_decod_unit              
+30	30	+1 # size_address               
+4	4	*4 # nb_instruction             [0] [nb_context]
+4	4	+1 # nb_inst_decod              [0] [nb_decod_unit]
+1	1	+1 # nb_inst_decod              [1] [nb_decod_unit]
+2	2	+1 # nb_inst_decod              [2] [nb_decod_unit]
+8	8	+1 # nb_inst_decod              [3] [nb_decod_unit]
+1	1	+1 # nb_inst_branch_predict     
+1	1	+1 # nb_inst_branch_decod       
+1	1	+1 # nb_inst_branch_update      
+1	1	+1 # nb_inst_branch_complete    
+8	8	*4 # btb_size_queue             
+2	2	+1 # btb_associativity          
+2	2	+1 # btb_size_counter           
+3	3	+1 # btb_victim_scheme          
+1	1	+1 # dir_predictor_scheme       
+1	1	+1 # dir_have_bht               [0] [3]
+1	1	+1 # dir_have_bht               [1] [3]
+1	1	+1 # dir_have_bht               [2] [3]
+1	1	+1 # dir_bht_size_shifter       [0] [3]
+1	1	+1 # dir_bht_size_shifter       [1] [3]
+1	1	+1 # dir_bht_size_shifter       [2] [3]
+1	1	+1 # dir_bht_nb_shifter         [0] [3]
+1	1	+1 # dir_bht_nb_shifter         [1] [3]
+1	1	+1 # dir_bht_nb_shifter         [2] [3]
+1	1	+1 # dir_have_pht               [0] [3]
+1	1	+1 # dir_have_pht               [1] [3]
+1	1	+1 # dir_have_pht               [2] [3]
+1	1	+1 # dir_pht_size_counter       [0] [3]
+1	1	+1 # dir_pht_size_counter       [1] [3]
+1	1	+1 # dir_pht_size_counter       [2] [3]
+1	1	+1 # dir_pht_nb_counter         [0] [3]
+1	1	+1 # dir_pht_nb_counter         [1] [3]
+1	1	+1 # dir_pht_nb_counter         [2] [3]
+1	1	+1 # dir_pht_size_address_share [0] [3]
+1	1	+1 # dir_pht_size_address_share [1] [3]
+1	1	+1 # dir_pht_size_address_share [2] [3]
+4	4	*2 # ras_size_queue             [0] [nb_context]
+4	4	*4 # upt_size_queue             [0] [nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_multi_context.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_multi_context.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/config_multi_context.cfg	(revision 82)
@@ -0,0 +1,47 @@
+Prediction_unit
+4	4	+1 # nb_context                 
+1	1	+1 # nb_decod_unit              
+30	30	+1 # size_address               
+1	1	*4 # nb_instruction             [0] [nb_context]
+2	2	*4 # nb_instruction             [1] [nb_context]
+4	4	*4 # nb_instruction             [2] [nb_context]
+8	8	*4 # nb_instruction             [3] [nb_context]
+1	1	+1 # nb_inst_decod              [0] [nb_decod_unit]
+1	1	+1 # nb_inst_branch_predict     
+1	1	+1 # nb_inst_branch_decod       
+1	1	+1 # nb_inst_branch_update      
+1	1	+1 # nb_inst_branch_complete    
+16	16	*4 # btb_size_queue             
+8	8	+1 # btb_associativity          
+2	2	+1 # btb_size_counter           
+3	3	+1 # btb_victim_scheme          
+1	1	+1 # dir_predictor_scheme       
+1	1	+1 # dir_have_bht               [0] [3]
+1	1	+1 # dir_have_bht               [1] [3]
+1	1	+1 # dir_have_bht               [2] [3]
+1	1	+1 # dir_bht_size_shifter       [0] [3]
+1	1	+1 # dir_bht_size_shifter       [1] [3]
+1	1	+1 # dir_bht_size_shifter       [2] [3]
+1	1	+1 # dir_bht_nb_shifter         [0] [3]
+1	1	+1 # dir_bht_nb_shifter         [1] [3]
+1	1	+1 # dir_bht_nb_shifter         [2] [3]
+1	1	+1 # dir_have_pht               [0] [3]
+1	1	+1 # dir_have_pht               [1] [3]
+1	1	+1 # dir_have_pht               [2] [3]
+1	1	+1 # dir_pht_size_counter       [0] [3]
+1	1	+1 # dir_pht_size_counter       [1] [3]
+1	1	+1 # dir_pht_size_counter       [2] [3]
+1	1	+1 # dir_pht_nb_counter         [0] [3]
+1	1	+1 # dir_pht_nb_counter         [1] [3]
+1	1	+1 # dir_pht_nb_counter         [2] [3]
+1	1	+1 # dir_pht_size_address_share [0] [3]
+1	1	+1 # dir_pht_size_address_share [1] [3]
+1	1	+1 # dir_pht_size_address_share [2] [3]
+2	2	*2 # ras_size_queue             [0] [nb_context]
+8	8	*2 # ras_size_queue             [1] [nb_context]
+4	4	*2 # ras_size_queue             [2] [nb_context]
+2	2	*2 # ras_size_queue             [3] [nb_context]
+2	2	*4 # upt_size_queue             [0] [nb_context]
+4	4	*4 # upt_size_queue             [1] [nb_context]
+4	4	*4 # upt_size_queue             [2] [nb_context]
+1	1	*4 # upt_size_queue             [3] [nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/configuration.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/configuration.cfg	(revision 81)
+++ 	(revision )
@@ -1,1 +1,0 @@
-Prediction_unit
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/main.cpp	(revision 82)
@@ -8,5 +8,5 @@
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/include/test.h"
 
-#define NB_PARAMS 0
+#define NB_PARAMS (12+3*7)
 
 void usage (int argc, char * argv[])
@@ -14,5 +14,27 @@
   err (_("<Usage> %s name_instance list_params.\n"),argv[0]);
   err (_("list_params is :\n"));
-  err (_(" * ()\n"));
+  err (_(" * nb_context                                (uint32_t    )\n"));
+  err (_(" * nb_decod_unit                             (uint32_t    )\n"));
+  err (_(" * size_address                              (uint32_t    )\n"));
+  err (_(" * nb_instruction             [nb_context]   (uint32_t    )\n"));
+  err (_(" * nb_inst_decod              [nb_decod_unit](uint32_t    )\n"));
+  err (_(" * nb_inst_branch_predict                    (uint32_t    )\n"));
+  err (_(" * nb_inst_branch_decod                      (uint32_t    )\n"));
+  err (_(" * nb_inst_branch_update                     (uint32_t    )\n"));
+  err (_(" * nb_inst_branch_complete                   (uint32_t    )\n"));
+  err (_(" * btb_size_queue                            (uint32_t    )\n"));
+  err (_(" * btb_associativity                         (uint32_t    )\n"));
+  err (_(" * btb_size_counter                          (uint32_t    )\n"));
+  err (_(" * btb_victim_scheme                         (Tvictim_t   )\n"));
+  err (_(" * dir_predictor_scheme                      (Tpredictor_t)\n"));
+  err (_(" * dir_have_bht               [3]            (bool        )\n"));
+  err (_(" * dir_bht_size_shifter       [3]            (uint32_t    )\n"));
+  err (_(" * dir_bht_nb_shifter         [3]            (uint32_t    )\n"));
+  err (_(" * dir_have_pht               [3]            (bool        )\n"));
+  err (_(" * dir_pht_size_counter       [3]            (uint32_t    )\n"));
+  err (_(" * dir_pht_nb_counter         [3]            (uint32_t    )\n"));
+  err (_(" * dir_pht_size_address_share [3]            (uint32_t    )\n"));
+  err (_(" * ras_size_queue             [nb_context]   (uint32_t    )\n"));
+  err (_(" * upt_size_queue             [nb_context]   (uint32_t    )\n"));
 
   exit (1);
@@ -25,5 +47,5 @@
 #endif
 {
-  if (argc != static_cast<int>(2+NB_PARAMS))
+  if (argc < static_cast<int>(2+NB_PARAMS))
     usage (argc, argv);
 
@@ -31,6 +53,53 @@
 
   string name = argv[x++];
-//const uint32_t size_data = atoi(argv[x++]);
-//const uint32_t nb_port   = atoi(argv[x++]);
+  uint32_t     _nb_context                     = fromString<uint32_t>(argv[x++]);
+  uint32_t     _nb_decod_unit                  = fromString<uint32_t>(argv[x++]);
+  uint32_t     _size_address                   = fromString<uint32_t>(argv[x++]);
+
+  if (argc != static_cast<int>(2+NB_PARAMS+3*_nb_context+_nb_decod_unit))
+    usage (argc, argv);
+
+  uint32_t *   _nb_instruction                 = new uint32_t [_nb_context];
+  for (uint32_t i=0; i<_nb_context; i++)
+    _nb_instruction [i]                        = fromString<uint32_t    >(argv[x++]);
+  uint32_t *   _nb_inst_decod                  = new uint32_t [_nb_decod_unit];
+  for (uint32_t i=0; i<_nb_decod_unit; i++)
+    _nb_inst_decod [i]                         = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _nb_inst_branch_predict         = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _nb_inst_branch_decod           = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _nb_inst_branch_update          = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _nb_inst_branch_complete        = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _btb_size_queue                 = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _btb_associativity              = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _btb_size_counter               = fromString<uint32_t    >(argv[x++]);
+  Tvictim_t    _btb_victim_scheme              = fromString<Tvictim_t   >(argv[x++]);
+  Tpredictor_t _dir_predictor_scheme           = fromString<Tpredictor_t>(argv[x++]);
+  bool         _dir_have_bht               [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_have_bht [i]                          = fromString<bool        >(argv[x++]);
+  uint32_t     _dir_bht_size_shifter       [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_bht_size_shifter [i]                  = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _dir_bht_nb_shifter         [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_bht_nb_shifter [i]                    = fromString<uint32_t    >(argv[x++]);
+  bool         _dir_have_pht               [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_have_pht [i]                          = fromString<bool        >(argv[x++]);
+  uint32_t     _dir_pht_size_counter       [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_pht_size_counter [i]                  = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _dir_pht_nb_counter         [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_pht_nb_counter [i]                    = fromString<uint32_t    >(argv[x++]);
+  uint32_t     _dir_pht_size_address_share [3];
+  for (uint32_t i=0; i<3; i++)
+    _dir_pht_size_address_share [i]            = fromString<uint32_t    >(argv[x++]);
+  uint32_t *   _ras_size_queue                 = new uint32_t    [_nb_context];
+  for (uint32_t i=0; i<_nb_context; i++)
+    _ras_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
+  uint32_t *   _upt_size_queue                 = new uint32_t    [_nb_context];
+  for (uint32_t i=0; i<_nb_context; i++)
+    _upt_size_queue [i]                        = fromString<uint32_t    >(argv[x++]);
 
   int _return = EXIT_SUCCESS;
@@ -38,7 +107,28 @@
     {
       morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters * param = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::Parameters
-	(//size_data,
-	 //nb_port  
-        );
+	(_nb_context                ,
+	 _nb_decod_unit             ,
+	 _size_address              ,
+	 _nb_instruction            ,
+	 _nb_inst_decod             ,
+	 _nb_inst_branch_predict    ,
+	 _nb_inst_branch_decod      ,
+	 _nb_inst_branch_update     ,
+	 _nb_inst_branch_complete   ,
+	 _btb_size_queue            ,
+	 _btb_associativity         ,
+	 _btb_size_counter          ,
+	 _btb_victim_scheme         ,
+	 _dir_predictor_scheme      ,
+	 _dir_have_bht              ,
+	 _dir_bht_size_shifter      ,
+	 _dir_bht_nb_shifter        ,
+	 _dir_have_pht              ,
+	 _dir_pht_size_counter      ,
+	 _dir_pht_nb_counter        ,
+	 _dir_pht_size_address_share,
+	 _ras_size_queue            ,
+	 _upt_size_queue            
+	 );
       
       msg(_("%s"),param->print(1).c_str());
@@ -57,4 +147,9 @@
     }
 
+  delete [] _nb_instruction            ;
+  delete [] _nb_inst_decod             ;
+  delete [] _ras_size_queue            ;
+  delete [] _upt_size_queue            ;
+
   return (_return);
 }
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/SelfTest/src/test.cpp	(revision 82)
@@ -23,9 +23,11 @@
 #endif
 
-  Prediction_unit * _Prediction_unit = new Prediction_unit (name.c_str(),
+  Prediction_unit * _Prediction_unit = new Prediction_unit 
+    (name.c_str(),
 #ifdef STATISTICS
-					     _parameters_statistics,
-#endif
-					     _param);
+     _parameters_statistics,
+#endif
+     _param,
+     USE_ALL);
   
 #ifdef SYSTEMC
@@ -37,4 +39,50 @@
   sc_clock              *  in_CLOCK  = new sc_clock ("clock", 1.0, 0.5);	 
   sc_signal<Tcontrol_t> *  in_NRESET = new sc_signal<Tcontrol_t> ("NRESET");
+
+
+  ALLOC1_SC_SIGNAL( in_PREDICT_VAL                        ," in_PREDICT_VAL                        ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_PREDICT_ACK                        ,"out_PREDICT_ACK                        ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ," in_PREDICT_PC_PREVIOUS                ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ," in_PREDICT_PC_CURRENT                 ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ," in_PREDICT_PC_CURRENT_IS_DS_TAKE      ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,"out_PREDICT_PC_NEXT                    ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"out_PREDICT_PC_NEXT_IS_DS_TAKE         ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE         ,"out_PREDICT_INSTRUCTION_ENABLE         ",Tcontrol_t         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
+  ALLOC1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,"out_PREDICT_INST_IFETCH_PTR            ",Tinst_ifetch_ptr_t ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,"out_PREDICT_BRANCH_STATE               ",Tbranch_state_t    ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"out_PREDICT_BRANCH_UPDATE_PREDICTION_ID",Tprediction_ptr_t  ,_param->_nb_context);
+												                         
+  ALLOC2_SC_SIGNAL( in_DECOD_VAL                          ," in_DECOD_VAL                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL(out_DECOD_ACK                          ,"out_DECOD_ACK                          ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_CONTEXT_ID                   ," in_DECOD_CONTEXT_ID                   ",Tcontext_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR        ," in_DECOD_MATCH_INST_IFETCH_PTR        ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_STATE                 ," in_DECOD_BRANCH_STATE                 ",Tbranch_state_t    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ," in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ",Tprediction_ptr_t  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION             ," in_DECOD_BRANCH_CONDITION             ",Tbranch_condition_t,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION             ," in_DECOD_BRANCH_DIRECTION             ",Tcontrol_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                  ," in_DECOD_ADDRESS_SRC                  ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  ALLOC2_SC_SIGNAL( in_DECOD_ADDRESS_DEST                 ," in_DECOD_ADDRESS_DEST                 ",Taddress_t         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+												                         
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL                ," in_BRANCH_COMPLETE_VAL                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK                ,"out_BRANCH_COMPLETE_ACK                ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID         ," in_BRANCH_COMPLETE_CONTEXT_ID         ",Tcontext_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH              ," in_BRANCH_COMPLETE_DEPTH              ",Tdepth_t           ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS            ," in_BRANCH_COMPLETE_ADDRESS            ",Taddress_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG               ," in_BRANCH_COMPLETE_FLAG               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION    ,"out_BRANCH_COMPLETE_MISS_PREDICTION    ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE               ,"out_BRANCH_COMPLETE_TAKE               ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC        ,"out_BRANCH_COMPLETE_ADDRESS_SRC        ",Taddress_t         ,_param->_nb_inst_branch_complete);
+  ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST       ,"out_BRANCH_COMPLETE_ADDRESS_DEST       ",Taddress_t         ,_param->_nb_inst_branch_complete);
+												                         
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL                   ,"out_BRANCH_EVENT_VAL                   ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK                   ," in_BRANCH_EVENT_ACK                   ",Tcontrol_t         ,_param->_nb_context);
+//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID            ,"out_BRANCH_EVENT_CONTEXT_ID            ",Tcontext_t         ,_param->_nb_context);
+//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH                 ,"out_BRANCH_EVENT_DEPTH                 ",Tdepth_t           ,_param->_nb_context);
+//ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION       ,"out_BRANCH_EVENT_MISS_PREDICTION       ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC           ,"out_BRANCH_EVENT_ADDRESS_SRC           ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST          ,"out_BRANCH_EVENT_ADDRESS_DEST          ",Taddress_t         ,_param->_nb_context);
+												                         
+  ALLOC1_SC_SIGNAL(out_DEPTH_NB_BRANCH                    ,"out_DEPTH_NB_BRANCH                    ",Tdepth_t           ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_DEPTH_TAIL                         ,"out_DEPTH_TAIL                         ",Tdepth_t           ,_param->_nb_context);
   
   /********************************************************
@@ -47,4 +95,61 @@
   (*(_Prediction_unit->in_NRESET))       (*(in_NRESET));
 
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_VAL                        ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_ACK                        ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT                    ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_PREDICT_INSTRUCTION_ENABLE         ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
+
+  for (uint32_t i=0; i<_param->_nb_context; i++)
+    {
+      if (_param->_have_port_inst_ifetch_ptr [i])
+	INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_INST_IFETCH_PTR [i]);
+      if (_param->_have_port_depth [i])
+	INSTANCE_SC_SIGNAL(_Prediction_unit,out_PREDICT_BRANCH_UPDATE_PREDICTION_ID [i]);
+    }
+
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_VAL                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit,out_DECOD_ACK                          ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  if (_param->_have_port_context_id)
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_CONTEXT_ID                   ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_MATCH_INST_IFETCH_PTR        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_STATE                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  if (_param->_have_port_max_depth)
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_UPDATE_PREDICTION_ID  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_CONDITION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_BRANCH_DIRECTION             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_SRC                  ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  INSTANCE2_SC_SIGNAL(_Prediction_unit, in_DECOD_ADDRESS_DEST                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_VAL                ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ACK                ,_param->_nb_inst_branch_complete);
+  if (_param->_have_port_context_id)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_CONTEXT_ID         ,_param->_nb_inst_branch_complete);
+  if (_param->_have_port_max_depth)
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_DEPTH              ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_ADDRESS            ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_COMPLETE_FLAG               ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_MISS_PREDICTION    ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_TAKE               ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_SRC        ,_param->_nb_inst_branch_complete);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_COMPLETE_ADDRESS_DEST       ,_param->_nb_inst_branch_complete);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_VAL                   ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit, in_BRANCH_EVENT_ACK                   ,_param->_nb_context);
+//if (_param->_have_port_context_id)
+//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_CONTEXT_ID            ,_param->_nb_context);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_DEPTH                 ,_param->_nb_context);
+//INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_MISS_PREDICTION       ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_SRC           ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_BRANCH_EVENT_ADDRESS_DEST          ,_param->_nb_context);
+
+  INSTANCE1_SC_SIGNAL(_Prediction_unit,out_DEPTH_NB_BRANCH                    ,_param->_nb_context);
+  for (uint32_t i=0; i<_param->_nb_context; i++)
+    if (_param->_have_port_depth[i])
+      INSTANCE_SC_SIGNAL(_Prediction_unit,out_DEPTH_TAIL [i]);
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -91,4 +196,49 @@
   delete in_CLOCK;
   delete in_NRESET;
+
+  DELETE1_SC_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context);
+  DELETE1_SC_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context);
+  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context);
+  DELETE1_SC_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context);
+
+  DELETE2_SC_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+  DELETE2_SC_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+
+  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
+  DELETE1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
+
+  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context);
+  DELETE1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context);
+//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
+//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
+//DELETE1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
+
+  DELETE1_SC_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context);
+  DELETE1_SC_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context);
 #endif
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_min.cfg
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_min.cfg	(revision 82)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/config_min.cfg	(revision 82)
@@ -0,0 +1,10 @@
+Update_Prediction_Table
+1	1	+1	# nb_context             
+1	4	*4	# size_queue             [0] [nb_context]
+32	32	*2	# size_address           
+1	1	*4	# nb_inst_predict        
+1	1	*4	# nb_inst_decod          
+1	1	*4	# nb_inst_branch_complete
+1	1	*4	# nb_inst_update         
+0	0	+1	# size_history           
+1	1	*2	# size_ras_index         [0] [nb_context]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/SelfTest/src/test.cpp	(revision 82)
@@ -71,7 +71,9 @@
   ALLOC1_SC_SIGNAL( in_DECOD_RAS_ADDRESS              ," in_DECOD_RAS_ADDRESS              ",Taddress_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_RAS_INDEX                ," in_DECOD_RAS_INDEX                ",Tptr_t             ,_param->_nb_inst_decod);
-  ALLOC1_SC_SIGNAL( in_DECOD_MISS_PREDICTION          ," in_DECOD_MISS_PREDICTION          ",Tcontrol_t         ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_MISS_IFETCH              ," in_DECOD_MISS_IFETCH              ",Tcontrol_t         ,_param->_nb_inst_decod);
+  ALLOC1_SC_SIGNAL( in_DECOD_MISS_DECOD               ," in_DECOD_MISS_DECOD               ",Tcontrol_t         ,_param->_nb_inst_decod);
   ALLOC1_SC_SIGNAL( in_DECOD_UPDATE_PREDICTION_ID     ," in_DECOD_UPDATE_PREDICTION_ID     ",Tprediction_ptr_t  ,_param->_nb_inst_decod);
 //ALLOC1_SC_SIGNAL(out_DECOD_DEPTH                    ,"out_DECOD_DEPTH                    ",Tdepth_t           ,_param->_nb_inst_decod);
+
   ALLOC1_SC_SIGNAL( in_BRANCH_COMPLETE_VAL            ," in_BRANCH_COMPLETE_VAL            ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
   ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ACK            ,"out_BRANCH_COMPLETE_ACK            ",Tcontrol_t         ,_param->_nb_inst_branch_complete);
@@ -84,4 +86,13 @@
   ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"out_BRANCH_COMPLETE_ADDRESS_SRC    ",Taddress_t         ,_param->_nb_inst_branch_complete);
   ALLOC1_SC_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"out_BRANCH_COMPLETE_ADDRESS_DEST   ",Taddress_t         ,_param->_nb_inst_branch_complete);
+
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_VAL            ,"out_BRANCH_EVENT_VAL            ",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_ACK            ," in_BRANCH_EVENT_ACK            ",Tcontrol_t         ,_param->_nb_context);
+//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_CONTEXT_ID     ," in_BRANCH_EVENT_CONTEXT_ID     ",Tcontext_t         ,_param->_nb_context);
+//   ALLOC1_SC_SIGNAL( in_BRANCH_EVENT_DEPTH          ," in_BRANCH_EVENT_DEPTH          ",Tdepth_t           ,_param->_nb_context);
+//   ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,"out_BRANCH_EVENT_MISS_PREDICTION",Tcontrol_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,"out_BRANCH_EVENT_ADDRESS_SRC    ",Taddress_t         ,_param->_nb_context);
+  ALLOC1_SC_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,"out_BRANCH_EVENT_ADDRESS_DEST   ",Taddress_t         ,_param->_nb_context);
+
   ALLOC1_SC_SIGNAL(out_UPDATE_VAL                     ,"out_UPDATE_VAL                     ",Tcontrol_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL( in_UPDATE_ACK                     ," in_UPDATE_ACK                     ",Tcontrol_t         ,_param->_nb_inst_update);
@@ -96,4 +107,5 @@
   ALLOC1_SC_SIGNAL(out_UPDATE_DIR_HISTORY             ,"out_UPDATE_DIR_HISTORY             ",Thistory_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL(out_UPDATE_RAS_VAL                 ,"out_UPDATE_RAS_VAL                 ",Tcontrol_t         ,_param->_nb_inst_update);
+  ALLOC1_SC_SIGNAL(out_UPDATE_RAS_PUSH                ,"out_UPDATE_RAS_PUSH                ",Tcontrol_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL(out_UPDATE_RAS_ADDRESS             ,"out_UPDATE_RAS_ADDRESS             ",Taddress_t         ,_param->_nb_inst_update);
   ALLOC1_SC_SIGNAL(out_UPDATE_RAS_INDEX               ,"out_UPDATE_RAS_INDEX               ",Tptr_t             ,_param->_nb_inst_update);
@@ -136,6 +148,7 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_ADDRESS              ,_param->_nb_inst_decod);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_RAS_INDEX                ,_param->_nb_inst_decod);
-  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_PREDICTION          ,_param->_nb_inst_decod);
-  if (_param->_have_port_depth)
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_IFETCH              ,_param->_nb_inst_decod);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_MISS_DECOD               ,_param->_nb_inst_decod);
+  if (_param->_have_port_max_depth)
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_DECOD_UPDATE_PREDICTION_ID     ,_param->_nb_inst_decod);
 //if (_param->_have_port_depth)
@@ -145,5 +158,5 @@
   if (_param->_have_port_context_id)
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete);
-  if (_param->_have_port_depth)
+  if (_param->_have_port_max_depth)
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete);
@@ -153,4 +166,16 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete);
+
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_VAL            ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ACK            ,_param->_nb_context);
+//   if (_param->_have_port_context_id)
+//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context);
+//   if (_param->_have_port_max_depth)
+//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_DEPTH          ,_param->_nb_context);
+//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_BRANCH_EVENT_ADDRESS        ,_param->_nb_context);
+//   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context);
+
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_VAL                     ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table, in_UPDATE_ACK                     ,_param->_nb_inst_update);
@@ -167,11 +192,16 @@
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_DIR_HISTORY             ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_VAL                 ,_param->_nb_inst_update);
+  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PUSH                ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_ADDRESS             ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_INDEX               ,_param->_nb_inst_update);
   INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_UPDATE_RAS_PREDICTION_IFETCH   ,_param->_nb_inst_update);
-  if (_param->_have_port_depth)
-  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH                ,_param->_nb_context);
-  if (_param->_have_port_depth)
-  INSTANCE1_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL                     ,_param->_nb_context);
+  for (uint32_t i=0; i<_param->_nb_context; i++)
+    {
+      if (_param->_have_port_depth[i])
+	{
+	  INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_TAIL      [i]);
+	}
+      INSTANCE_SC_SIGNAL(_Update_Prediction_Table,out_DEPTH_NB_BRANCH [i]);
+    }
 
   msg(_("<%s> : Start Simulation ............\n"),name.c_str());
@@ -202,4 +232,9 @@
   SC_START(5);
   in_NRESET->write(1);  
+
+  for (uint32_t i=0; i<_param->_nb_context; i++)
+    {
+      PORT_WRITE(in_BRANCH_EVENT_ACK [i],1);
+    }
 
   LABEL("Loop of Test");
@@ -236,9 +271,10 @@
 		  in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
-		    }
+		      
 		  SC_START(0);
 		  
@@ -256,9 +292,10 @@
 	      in_PREDICT_VAL              [port]->write(0);
 	      
-	      if (_param->_have_port_depth)
+	      if (_param->_have_port_depth[context])
 		{
 		  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		}
 		  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
-		}
+
 	    }
 	}
@@ -283,12 +320,13 @@
 		  in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
 		  in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
-		  in_DECOD_MISS_PREDICTION      [port]->write(false);
+		  in_DECOD_MISS_IFETCH          [port]->write(false);
+		  in_DECOD_MISS_DECOD           [port]->write(false);
 		  in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		    }
 		  
 		  SC_START(0);
@@ -307,9 +345,9 @@
 	      in_DECOD_VAL              [port]->write(0);
 	      
-	      if (_param->_have_port_depth)
+	      if (_param->_have_port_depth[context])
 		{
 		  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		}
 		  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		}
 	    }
 	}
@@ -331,9 +369,9 @@
 		  in_BRANCH_COMPLETE_FLAG                 [port]->write(1);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		    }
 		  
 		  SC_START(0);
@@ -357,9 +395,9 @@
 	      in_BRANCH_COMPLETE_VAL              [port]->write(0);
 	      
-	      if (_param->_have_port_depth)
+	      if (_param->_have_port_depth[context])
 		{
 		  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		}
 		  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		}
 	    }
 	}
@@ -396,4 +434,5 @@
 			TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
 		      TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
+		      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
 		      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
 		      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
@@ -411,11 +450,10 @@
   
 	  // wait the garbage collector
-	  if (_param->_have_port_depth)
-	    while ((out_DEPTH_TAIL     [context]->read() != 0) and
-		   (out_DEPTH_NB_BRANCH[context]->read() != 0))
-	      {
-		LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
-		SC_START(1);
-	      }
+	  while ((not (_param->_have_port_depth[context]) or (out_DEPTH_TAIL     [context]->read() != 0)) and
+		 (out_DEPTH_NB_BRANCH[context]->read() != 0))
+	    {
+	      LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
+	      SC_START(1);
+	    }
 	}
       }
@@ -448,9 +486,10 @@
 		  in_PREDICT_RAS_INDEX        [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i);
-		    }
+
 		  SC_START(0);
 		  
@@ -468,9 +507,9 @@
 	      in_PREDICT_VAL              [port]->write(0);
 	      
-	      if (_param->_have_port_depth)
+	      if (_param->_have_port_depth[context])
 		{
 		  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		}
 		  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), i+1);
-		}
 	    }
 	}
@@ -495,12 +534,13 @@
 		  in_DECOD_RAS_ADDRESS          [port]->write(0xdeaddead+i);
 		  in_DECOD_RAS_INDEX            [port]->write((0x12345678+i)%_param->_size_ras_index[context]);
-		  in_DECOD_MISS_PREDICTION      [port]->write(false);
+		  in_DECOD_MISS_IFETCH          [port]->write(false);
+		  in_DECOD_MISS_DECOD           [port]->write(false);
 		  in_DECOD_UPDATE_PREDICTION_ID [port]->write(i);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		    }
 		  
 		  SC_START(0);
@@ -519,9 +559,9 @@
 	      in_DECOD_VAL              [port]->write(0);
 	      
-	      if (_param->_have_port_depth)
+	      if (_param->_have_port_depth[context])
 		{
 		  TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		}
 		  TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		}
 	    }
 	}
@@ -543,9 +583,9 @@
 		  in_BRANCH_COMPLETE_FLAG                 [port]->write(0);
 		  
-		  if (_param->_have_port_depth)
+		  if (_param->_have_port_depth[context])
 		    {
 		      TEST(Tdepth_t,out_DEPTH_TAIL     [context]->read(), 0);
+		    }
 		      TEST(Tdepth_t,out_DEPTH_NB_BRANCH[context]->read(), _param->_size_queue[context]);
-		    }
 		  
 		  SC_START(0);
@@ -604,4 +644,5 @@
 			TEST(Thistory_t         ,out_UPDATE_DIR_HISTORY           [port]->read(), i);
 		      TEST(Tcontrol_t         ,out_UPDATE_RAS_VAL               [port]->read(), 0);
+		      TEST(Tcontrol_t         ,out_UPDATE_RAS_PUSH              [port]->read(), 0);
 		      TEST(Taddress_t         ,out_UPDATE_RAS_ADDRESS           [port]->read(), 0xdeaddead+i);
 		      TEST(Tptr_t             ,out_UPDATE_RAS_INDEX             [port]->read(), (0x12345678+i)%_param->_size_ras_index[context]);
@@ -619,7 +660,6 @@
 	    
 	    // wait the garbage collector
-	    if (_param->_have_port_depth)
-	      while ((out_DEPTH_TAIL     [context]->read() != 0) and
-		     (out_DEPTH_NB_BRANCH[context]->read() != 0))
+	    while (((not (_param->_have_port_depth[context])) or (out_DEPTH_TAIL     [context]->read() != 0)) and
+		   (out_DEPTH_NB_BRANCH[context]->read() != 0))
 		{
 		  LABEL("DEPTH [%d] nb_branch : %d - tail : %d",context,out_DEPTH_NB_BRANCH[context]->read(), out_DEPTH_TAIL [context]->read());
@@ -671,5 +711,6 @@
   delete []  in_DECOD_RAS_ADDRESS           ;
   delete []  in_DECOD_RAS_INDEX             ;
-  delete []  in_DECOD_MISS_PREDICTION       ;
+  delete []  in_DECOD_MISS_IFETCH           ;
+  delete []  in_DECOD_MISS_DECOD            ;
   delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
 //delete [] out_DECOD_DEPTH                 ;
@@ -686,4 +727,13 @@
   delete [] out_BRANCH_COMPLETE_ADDRESS_SRC    ;
   delete [] out_BRANCH_COMPLETE_ADDRESS_DEST   ;
+
+  // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  delete [] out_BRANCH_EVENT_VAL            ;
+  delete []  in_BRANCH_EVENT_ACK            ;
+//   delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
+//   delete []  in_BRANCH_EVENT_DEPTH          ;
+//   delete [] out_BRANCH_EVENT_MISS_PREDICTION;
+  delete [] out_BRANCH_EVENT_ADDRESS_SRC    ;
+  delete [] out_BRANCH_EVENT_ADDRESS_DEST   ;
   
   // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -700,4 +750,5 @@
   delete [] out_UPDATE_DIR_HISTORY          ;
   delete [] out_UPDATE_RAS_VAL              ;
+  delete [] out_UPDATE_RAS_PUSH             ;
   delete [] out_UPDATE_RAS_ADDRESS          ;
   delete [] out_UPDATE_RAS_INDEX            ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h	(revision 82)
@@ -35,9 +35,11 @@
 
   public : uint32_t   _size_context_id        ;
-  public : uint32_t   _size_depth             ;
+  public : uint32_t * _size_depth             ; // [nb_context]
+  public : uint32_t   _max_size_depth         ;
   public : uint32_t   _max_size_ras_index     ;
 		      
   public : bool       _have_port_context_id   ;
-  public : bool       _have_port_depth        ;
+  public : bool     * _have_port_depth        ; // [nb_context]
+  public : bool       _have_port_max_depth    ;
   public : bool       _have_port_history      ;
     
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Types.h	(revision 82)
@@ -24,4 +24,5 @@
       UPDATE_PREDICTION_STATE_WAIT_DECOD , // Fetch have access at the predictor
       UPDATE_PREDICTION_STATE_WAITEND    , // Have make a prediction, wait branch_complete
+      UPDATE_PREDICTION_STATE_EVENT      , // have a event - must signal at the context_unit
       UPDATE_PREDICTION_STATE_OK         , // branch is complete and can update predictor
       UPDATE_PREDICTION_STATE_KO         , // have a event - must update predictor unit
@@ -58,4 +59,5 @@
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAIT_DECOD : return "wait_decod"; break;
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_WAITEND    : return "waitend"   ; break;
+      case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_EVENT      : return "event"     ; break;
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_OK         : return "ok"        ; break;
       case morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::UPDATE_PREDICTION_STATE_KO         : return "ko"        ; break;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h	(revision 82)
@@ -88,5 +88,6 @@
   public    : SC_IN (Taddress_t         )  **  in_DECOD_RAS_ADDRESS           ; //[nb_inst_decod]
   public    : SC_IN (Tptr_t             )  **  in_DECOD_RAS_INDEX             ; //[nb_inst_decod]
-  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_PREDICTION       ; //[nb_inst_decod] // ifetch is a miss pred
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_IFETCH           ; //[nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         )  **  in_DECOD_MISS_DECOD            ; //[nb_inst_decod]
   public    : SC_IN (Tprediction_ptr_t  )  **  in_DECOD_UPDATE_PREDICTION_ID  ; //[nb_inst_decod]
 //public    : SC_OUT(Tdepth_t           )  ** out_DECOD_DEPTH                 ; //[nb_inst_decod]
@@ -103,4 +104,13 @@
   public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_SRC    ; //[nb_inst_branch_complete]
   public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_DEST   ; //[nb_inst_branch_complete]
+
+    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_VAL            ; //[nb_context]
+  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK            ; //[nb_context]
+//public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID     ; //[nb_context]
+//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH          ; //[nb_context]
+//public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION; //[nb_context] is always miss prediction
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC    ; //[nb_context]
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST   ; //[nb_context]
 
     // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -117,4 +127,5 @@
   public    : SC_OUT(Thistory_t         )  ** out_UPDATE_DIR_HISTORY          ; //[nb_inst_update]
   public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_VAL              ; //[nb_inst_update]
+  public    : SC_OUT(Tcontrol_t         )  ** out_UPDATE_RAS_PUSH             ; //[nb_inst_update]
   public    : SC_OUT(Taddress_t         )  ** out_UPDATE_RAS_ADDRESS          ; //[nb_inst_update]
   public    : SC_OUT(Tptr_t             )  ** out_UPDATE_RAS_INDEX            ; //[nb_inst_update]
@@ -131,4 +142,5 @@
   private   : uint32_t                      * reg_BOTTOM                 ; //[nb_context]
   private   : uint32_t                      * reg_NB_ELT                 ; //[nb_context]
+  private   : uint32_t                      * reg_NB_ELT_UPDATE          ; //[nb_context]
   private   : uint32_t                      * reg_NB_ELT_NEED_UPDATE     ; //[nb_context]
   private   : entry_t                      ** reg_UPDATE_PREDICTION_TABLE; //[nb_context][size_queue]
@@ -142,4 +154,6 @@
   private   : Tcontrol_t                    * internal_BRANCH_COMPLETE_TAKE           ; //[nb_inst_branch_complete]
   private   : Taddress_t                    * internal_BRANCH_COMPLETE_ADDRESS_DEST   ; //[nb_inst_branch_complete]
+  private   : Tcontrol_t                    * internal_BRANCH_EVENT_VAL               ; //[nb_context]
+  private   : Tdepth_t                      * internal_BRANCH_EVENT_DEPTH             ; //[nb_context]
   private   : Tcontrol_t                    * internal_UPDATE_VAL                     ; //[nb_inst_update]
   private   : Tcontext_t                    * internal_UPDATE_CONTEXT_ID              ; //[nb_inst_update]
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters.cpp	(revision 82)
@@ -43,9 +43,16 @@
     
     _size_context_id         = log2(nb_context);
-    _size_depth              = log2(max<uint32_t>(size_queue,nb_context));
+    _size_depth              = new uint32_t[_nb_context];
+    _have_port_depth         = new bool    [_nb_context];
+    for (uint32_t i=0; i<_nb_context; i++)
+      {
+	_size_depth      [i] = log2(_size_queue[i]);
+	_have_port_depth [i] = (_size_depth [i] > 0);
+      }
+    _max_size_depth          = max<uint32_t>(_size_depth,_nb_context);
     _max_size_ras_index      = max<uint32_t>(_size_ras_index,nb_context);
 
     _have_port_context_id    = _size_context_id> 0;
-    _have_port_depth         = _size_depth     > 0;
+    _have_port_max_depth     = _max_size_depth > 0;
     _have_port_history       = _size_history   > 0;
     
@@ -68,4 +75,6 @@
   {
     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"Begin");
+    delete [] _size_depth     ;
+    delete [] _have_port_depth;
     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Parameters_msg_error.cpp	(revision 82)
@@ -27,5 +27,5 @@
     Parameters_test test ("Update_Prediction_Table");
 
-    if (morpheo::behavioural::test<Tdepth_t>(_size_depth) == false)
+    if (morpheo::behavioural::test<Tdepth_t>(_max_size_depth) == false)
       test.error("type \"Tdepth_t\" is too small.");
 
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 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table.cpp	(revision 82)
@@ -128,5 +128,6 @@
 	    if (_param->_have_port_context_id)
 	      sensitive << (*(in_DECOD_CONTEXT_ID [i]));
-	    sensitive << (*(in_DECOD_MISS_PREDICTION [i]));
+	    sensitive << (*(in_DECOD_MISS_IFETCH [i]))
+		      << (*(in_DECOD_MISS_DECOD  [i]));
 	  }
 	
@@ -135,7 +136,8 @@
 	for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
 	  {
-	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_PREDICTION [i]));
-	    if (_param->_have_port_context_id)
-	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID      [i]));
+	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_IFETCH [i]));
+	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_MISS_DECOD  [i]));
+	    if (_param->_have_port_context_id)
+	    (*(out_DECOD_ACK                  [i])) (*(in_DECOD_CONTEXT_ID  [i]));
 	  }
 # endif    
@@ -150,5 +152,5 @@
 	    if (_param->_have_port_context_id)
 	    sensitive << (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
-	    if (_param->_have_port_depth)
+	    if (_param->_have_port_max_depth)
 	    sensitive << (*(in_BRANCH_COMPLETE_DEPTH [i]));
 	    sensitive << (*(in_BRANCH_COMPLETE_FLAG    [i]))
@@ -162,5 +164,5 @@
 	    if (_param->_have_port_context_id)
 	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
-	    if (_param->_have_port_depth)
+	    if (_param->_have_port_max_depth)
 	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
 	    (*(out_BRANCH_COMPLETE_MISS_PREDICTION [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
@@ -169,5 +171,5 @@
 	    if (_param->_have_port_context_id)
 	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
-	    if (_param->_have_port_depth)
+	    if (_param->_have_port_max_depth)
 	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
 	    (*(out_BRANCH_COMPLETE_TAKE            [i])) (*(in_BRANCH_COMPLETE_FLAG       [i]));
@@ -175,10 +177,10 @@
 	    if (_param->_have_port_context_id)
 	    (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
-	    if (_param->_have_port_depth)
+	    if (_param->_have_port_max_depth)
 	    (*(out_BRANCH_COMPLETE_ADDRESS_SRC     [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
 
 	    if (_param->_have_port_context_id)
 	    (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_CONTEXT_ID [i]));
-	    if (_param->_have_port_depth)
+	    if (_param->_have_port_max_depth)
 	    (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_DEPTH      [i]));
 	    (*(out_BRANCH_COMPLETE_ADDRESS_DEST    [i])) (*(in_BRANCH_COMPLETE_ADDRESS    [i]));
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 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_allocation.cpp	(revision 82)
@@ -76,5 +76,5 @@
     // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
-      ALLOC1_INTERFACE("predict", IN,SOUTH, "predict", _param->_nb_inst_predict);
+      ALLOC1_INTERFACE("decod", IN,SOUTH, "decod", _param->_nb_inst_predict);
 
       ALLOC1_VALACK_IN ( in_DECOD_VAL                 ,VAL);
@@ -87,6 +87,7 @@
       ALLOC1_SIGNAL_IN ( in_DECOD_RAS_ADDRESS         ,"ras_address"         ,Taddress_t         ,_param->_size_address);
       ALLOC1_SIGNAL_IN ( in_DECOD_RAS_INDEX           ,"ras_index"           ,Tptr_t             ,_param->_max_size_ras_index);
-      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_PREDICTION     ,"miss_prediction"     ,Tcontrol_t         ,1);
-      ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth);
+      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_IFETCH         ,"miss_ifetch"         ,Tcontrol_t         ,1);
+      ALLOC1_SIGNAL_IN ( in_DECOD_MISS_DECOD          ,"miss_decod"          ,Tcontrol_t         ,1);
+      ALLOC1_SIGNAL_IN ( in_DECOD_UPDATE_PREDICTION_ID,"update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth);
 //    ALLOC1_SIGNAL_OUT(out_DECOD_DEPTH               ,"depth"               ,Tdepth_t           ,_param->_size_depth);
     }
@@ -95,10 +96,9 @@
     {
       ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete);
-
       
       ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL            ,VAL);
       ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK            ,ACK);
       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
-      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_size_depth);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
       ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
@@ -107,4 +107,17 @@
       ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
       ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
+    }
+
+    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
+      
+      ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL            ,VAL);
+      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
     }
 
@@ -125,4 +138,5 @@
       ALLOC1_SIGNAL_OUT(out_UPDATE_DIR_HISTORY          ,"dir_history"          ,Thistory_t         ,_param->_size_history);
       ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_VAL              ,"ras_val"              ,Tcontrol_t         ,1);
+      ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_PUSH             ,"ras_push"             ,Tcontrol_t         ,1);
       ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_ADDRESS          ,"ras_address"          ,Taddress_t         ,_param->_size_address);
       ALLOC1_SIGNAL_OUT(out_UPDATE_RAS_INDEX            ,"ras_index"            ,Tptr_t             ,_param->_max_size_ras_index);
@@ -134,6 +148,6 @@
       ALLOC1_INTERFACE("depth",OUT,SOUTH, "depth", _param->_nb_context);
 
-      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth);
-      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL,"TAIL",Tdepth_t,_param->_size_depth);
+      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL     ,"TAIL"     ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
+      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH,"NB_BRANCH",Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
     }
 
@@ -145,4 +159,6 @@
     internal_BRANCH_COMPLETE_TAKE            = new Tcontrol_t [_param->_nb_inst_branch_complete];
     internal_BRANCH_COMPLETE_ADDRESS_DEST    = new Taddress_t [_param->_nb_inst_branch_complete];
+    internal_BRANCH_EVENT_VAL                = new Tcontrol_t [_param->_nb_context];
+    internal_BRANCH_EVENT_DEPTH              = new Tdepth_t   [_param->_nb_context];
     internal_UPDATE_VAL                      = new Tcontrol_t [_param->_nb_inst_update];
     internal_UPDATE_CONTEXT_ID               = new Tcontext_t [_param->_nb_inst_update];
@@ -153,4 +169,5 @@
     reg_BOTTOM                  = new uint32_t  [_param->_nb_context];
     reg_NB_ELT                  = new uint32_t  [_param->_nb_context];
+    reg_NB_ELT_UPDATE           = new uint32_t  [_param->_nb_context];
     reg_NB_ELT_NEED_UPDATE      = new uint32_t  [_param->_nb_context];
     reg_UPDATE_PREDICTION_TABLE = new entry_t * [_param->_nb_context];
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_deallocation.cpp	(revision 82)
@@ -56,6 +56,7 @@
 	delete []  in_DECOD_RAS_ADDRESS           ;
 	delete []  in_DECOD_RAS_INDEX             ;
-	delete []  in_DECOD_MISS_PREDICTION       ;
-	if (_param->_have_port_depth)
+	delete []  in_DECOD_MISS_IFETCH           ;
+	delete []  in_DECOD_MISS_DECOD            ;
+	if (_param->_have_port_max_depth)
 	delete []  in_DECOD_UPDATE_PREDICTION_ID  ;
 // 	if (_param->_have_port_depth)
@@ -67,5 +68,5 @@
 	if (_param->_have_port_context_id)
 	delete []  in_BRANCH_COMPLETE_CONTEXT_ID     ;
-	if (_param->_have_port_depth)
+	if (_param->_have_port_max_depth)
 	delete []  in_BRANCH_COMPLETE_DEPTH          ;
 	delete []  in_BRANCH_COMPLETE_ADDRESS        ;
@@ -75,4 +76,15 @@
 	delete [] out_BRANCH_COMPLETE_ADDRESS_SRC    ;
 	delete [] out_BRANCH_COMPLETE_ADDRESS_DEST   ;
+
+	// ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+	delete [] out_BRANCH_EVENT_VAL            ;
+	delete []  in_BRANCH_EVENT_ACK            ;
+// 	if (_param->_have_port_context_id)
+// 	delete []  in_BRANCH_EVENT_CONTEXT_ID     ;
+// 	if (_param->_have_port_max_depth)
+// 	delete []  in_BRANCH_EVENT_DEPTH          ;
+// 	delete [] out_BRANCH_EVENT_MISS_PREDICTION;
+	delete [] out_BRANCH_EVENT_ADDRESS_SRC    ;
+	delete [] out_BRANCH_EVENT_ADDRESS_DEST   ;
 	
 	// ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -91,4 +103,5 @@
 	delete [] out_UPDATE_DIR_HISTORY          ;
 	delete [] out_UPDATE_RAS_VAL              ;
+	delete [] out_UPDATE_RAS_PUSH             ;
 	delete [] out_UPDATE_RAS_ADDRESS          ;
 	delete [] out_UPDATE_RAS_INDEX            ;
@@ -96,5 +109,5 @@
 
 	// ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-	if (_param->_have_port_depth)
+	if (_param->_have_port_max_depth)
 	  {
 	delete [] out_DEPTH_NB_BRANCH;
@@ -110,4 +123,6 @@
     delete [] internal_BRANCH_COMPLETE_TAKE            ;
     delete [] internal_BRANCH_COMPLETE_ADDRESS_DEST    ;
+    delete [] internal_BRANCH_EVENT_VAL                ;
+    delete [] internal_BRANCH_EVENT_DEPTH              ;
     delete [] internal_UPDATE_VAL                      ;
     delete [] internal_UPDATE_CONTEXT_ID               ;
@@ -118,4 +133,5 @@
     delete [] reg_BOTTOM;
     delete [] reg_NB_ELT;
+    delete [] reg_NB_ELT_UPDATE;
     delete [] reg_NB_ELT_NEED_UPDATE;
     for (uint32_t i=0; i<_param->_nb_context; i++)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_branch_complete.cpp	(revision 82)
@@ -27,5 +27,5 @@
       {
 	Tcontext_t          context   = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
-	Tdepth_t            depth     = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
+	Tdepth_t            depth     = (_param->_have_port_max_depth )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
 	Tcontrol_t          miss      = false;
 	Tcontrol_t          take      = reg_UPDATE_PREDICTION_TABLE [context][depth]._last_take   ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMealy_decod.cpp	(revision 82)
@@ -26,5 +26,5 @@
     for (uint32_t i=0; i<_param->_nb_inst_decod; i++)
       {
-	Tcontrol_t miss = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
+	Tcontrol_t miss = PORT_READ(in_DECOD_MISS_DECOD [i]);
 
 	if (miss)
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_genMoore.cpp	(revision 82)
@@ -28,11 +28,12 @@
     // ===================================================================
 
-    if (_param->_have_port_depth)
-      for (uint32_t i=0; i<_param->_nb_context; i++)
-	{
-	  PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
-	  PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
-	}
-
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+	if (_param->_have_port_depth [i])
+	  {
+	    PORT_WRITE(out_DEPTH_TAIL      [i], reg_BOTTOM [i]);
+	  }
+	PORT_WRITE(out_DEPTH_NB_BRANCH [i], reg_NB_ELT [i]);
+      }
     // ===================================================================
     // =====[ UPDATE ]====================================================
@@ -72,5 +73,8 @@
 					   (cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK) or
 					   (cond == BRANCH_CONDITION_READ_STACK));
-	      
+	    
+	    Tcontrol_t          push = ((cond == BRANCH_CONDITION_NONE_WITH_WRITE_STACK) or
+					(cond == BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK));
+
 	    if (_param->_have_port_context_id)
 	    PORT_WRITE(out_UPDATE_CONTEXT_ID            [i],context);
@@ -85,4 +89,5 @@
 	    PORT_WRITE(out_UPDATE_DIR_HISTORY           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._history     );
 	    PORT_WRITE(out_UPDATE_RAS_VAL               [i],ras_val);
+	    PORT_WRITE(out_UPDATE_RAS_PUSH              [i],push);
 	    PORT_WRITE(out_UPDATE_RAS_ADDRESS           [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._address_ras );
 	    PORT_WRITE(out_UPDATE_RAS_INDEX             [i],reg_UPDATE_PREDICTION_TABLE [context][depth]._index_ras   );
@@ -99,4 +104,24 @@
       }
 
+    // ===================================================================
+    // =====[ BRANCH_EVENT ]==============================================
+    // ===================================================================
+    for (uint32_t i=0; i<_param->_nb_context; i++)
+      {
+	Tdepth_t   depth   = (reg_BOTTOM [i] + reg_NB_ELT_UPDATE [i])%_param->_size_queue [i];
+	state_t    state   = reg_UPDATE_PREDICTION_TABLE [i][depth]._state;
+	
+	Tcontrol_t val     = (state == UPDATE_PREDICTION_STATE_EVENT);
+
+	if (val)
+	  {
+	    PORT_WRITE(out_BRANCH_EVENT_ADDRESS_SRC  [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_src );
+	    PORT_WRITE(out_BRANCH_EVENT_ADDRESS_DEST [i], reg_UPDATE_PREDICTION_TABLE [i][depth]._address_dest);
+	    internal_BRANCH_EVENT_DEPTH [i] = depth;
+	  }
+
+	internal_BRANCH_EVENT_VAL   [i] = val;
+	PORT_WRITE(out_BRANCH_EVENT_VAL [i], internal_BRANCH_EVENT_VAL [i]);
+      }
     log_printf(FUNC,Update_Prediction_Table,FUNCTION,"End");
   };
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 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/src/Update_Prediction_Table_transition.cpp	(revision 82)
@@ -31,4 +31,5 @@
 	    reg_BOTTOM             [i] = 0;
 	    reg_NB_ELT             [i] = 0;
+	    reg_NB_ELT_UPDATE      [i] = 0;
 	    reg_NB_ELT_NEED_UPDATE [i] = 0;
 	    for (uint32_t j=0; j<_param->_size_queue[i]; j++)
@@ -74,17 +75,19 @@
 	  if (PORT_READ(in_DECOD_VAL[i]) and internal_DECOD_ACK [i])
 	    {
-	      Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
-	      Tcontrol_t miss    = PORT_READ(in_DECOD_MISS_PREDICTION [i]);
+	      Tcontext_t context     = (_param->_have_port_context_id)?PORT_READ(in_DECOD_CONTEXT_ID [i]):0;
+	      Tcontrol_t miss_ifetch = PORT_READ(in_DECOD_MISS_IFETCH [i]);
+	      Tcontrol_t miss_decod  = PORT_READ(in_DECOD_MISS_DECOD  [i]);
 
 	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"DECOD[%d] - Accepted",i);
-	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context : %d",context);
-	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss    : %d",miss);
-	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt  : %d",reg_NB_ELT[context]);
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * context     : %d",context);
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_ifetch : %d",miss_ifetch);
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * miss_decod  : %d",miss_decod);
+	      log_printf(TRACE,Update_Prediction_Table,FUNCTION," * nb_elt      : %d",reg_NB_ELT[context]);
 	      
 	      // Test if miss ifetch
 	      //   miss ifetch = decod a branch and the predict unit have not predict this branch ... gloup :P
-	      if (miss)
+	      if (miss_ifetch or miss_decod)
 		{
-		  Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
+		  Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
 		  Tdepth_t top   = reg_TOP [context];
 
@@ -127,4 +130,5 @@
 			}
 		    }
+		  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT; // rewrite
 
 		  reg_TOP                [context] = (depth+1)%_param->_size_queue [context];
@@ -135,5 +139,5 @@
 		{
 		  // Normal case : branch is previous predicated, change state of branch
-		  Tdepth_t depth = (_param->_have_port_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
+		  Tdepth_t depth = (_param->_have_port_max_depth)?PORT_READ(in_DECOD_UPDATE_PREDICTION_ID [i]):0;
 
 		  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_WAITEND;
@@ -148,5 +152,5 @@
 	    {
 	      Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_BRANCH_COMPLETE_CONTEXT_ID [i]):0;
-	      Tdepth_t   depth   = (_param->_have_port_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
+	      Tdepth_t   depth   = (_param->_have_port_max_depth     )?PORT_READ(in_BRANCH_COMPLETE_DEPTH      [i]):0;
 
 	      log_printf(TRACE,Update_Prediction_Table,FUNCTION,"BRANCH_COMPLETE[%d] - Accepted",i);
@@ -158,5 +162,5 @@
 		{
 		  // Miss case
-		  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_KO;
+		  reg_UPDATE_PREDICTION_TABLE [context][depth]._state = UPDATE_PREDICTION_STATE_EVENT;
 
 		  // Another prediction (prediction with depth higer)
@@ -231,4 +235,15 @@
 
 	// ===================================================================
+	// =====[ BRANCH_EVENT ]==============================================
+	// ===================================================================
+	for (uint32_t i=0; i<_param->_nb_context; i++)
+	  if (internal_BRANCH_EVENT_VAL [i] and PORT_READ(in_BRANCH_EVENT_ACK [i]))
+	  {
+	    Tdepth_t depth = internal_BRANCH_EVENT_DEPTH [i];
+	    
+	    reg_UPDATE_PREDICTION_TABLE [i][depth]._state = UPDATE_PREDICTION_STATE_KO;
+	  }
+
+	// ===================================================================
 	// =====[ GARBAGE COLLECTOR ]=========================================
 	// ===================================================================
@@ -253,10 +268,10 @@
       }
 
-// #if (DEBUG >= DEBUG_TRACE)
+#if (DEBUG >= DEBUG_TRACE)
     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"Dump Update_Prediction_Table");
     log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * reg_UPDATE_PRIORITY      : %d",reg_UPDATE_PRIORITY);
     for (uint32_t i=0; i<_param->_nb_context; i++)
       {
-	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Update_Prediction_Table [%d]",i);
+	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"  * Update_Prediction_Table   [%d]",i);
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_TOP                : %d",reg_TOP                [i]);
 	log_printf(TRACE,Update_Prediction_Table,FUNCTION,"    * reg_BOTTOM             : %d",reg_BOTTOM             [i]);
@@ -266,5 +281,5 @@
 	  log_printf(TRACE,Update_Prediction_Table,FUNCTION,"      [%d] %s %x",j,toString(reg_UPDATE_PREDICTION_TABLE [i][j]._state).c_str(),reg_UPDATE_PREDICTION_TABLE [i][j]._address_src);
       }
-// #endif
+#endif
 
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h	(revision 82)
@@ -11,4 +11,9 @@
 #include "Common/include/Debug.h"
 #include "Behavioural/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Parameters.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Parameters.h"
 
 namespace morpheo {
@@ -23,7 +28,73 @@
   {
     //-----[ fields ]------------------------------------------------------------
+  public : uint32_t     _nb_context                    ;
+  public : uint32_t     _nb_decod_unit                 ;
+  public : uint32_t     _size_address                  ;
+  public : uint32_t *   _nb_instruction                ;//[nb_context]
+  public : uint32_t *   _nb_inst_decod                 ;//[nb_decod_unit]
+  public : uint32_t     _nb_inst_branch_predict        ;
+  public : uint32_t     _nb_inst_branch_decod          ;
+  public : uint32_t     _nb_inst_branch_update         ;
+  public : uint32_t     _nb_inst_branch_complete       ;
+  public : uint32_t     _btb_size_queue                ;
+  public : uint32_t     _btb_associativity             ;
+  public : uint32_t     _btb_size_counter              ;
+  public : Tvictim_t    _btb_victim_scheme             ;
+  public : Tpredictor_t _dir_predictor_scheme          ;
+  public : bool         _dir_have_bht               [3];
+  public : uint32_t     _dir_bht_size_shifter       [3];
+  public : uint32_t     _dir_bht_nb_shifter         [3];
+  public : bool         _dir_have_pht               [3];
+  public : uint32_t     _dir_pht_size_counter       [3];
+  public : uint32_t     _dir_pht_nb_counter         [3];
+  public : uint32_t     _dir_pht_size_address_share [3];
+  public : uint32_t *   _ras_size_queue                ;//[nb_context]
+  public : uint32_t *   _upt_size_queue                ;//[nb_context]
+
+  public : uint32_t     _size_context_id               ;
+  public : uint32_t *   _size_depth                    ;//[nb_context]
+  public : uint32_t     _max_size_depth                ;
+  public : uint32_t *   _size_inst_ifetch_ptr          ;//[nb_context]
+  public : uint32_t     _size_history                  ;
+  public : uint32_t *   _size_ras_index                ;//[nb_context]
+						       
+  public : bool         _have_port_context_id          ;
+  public : bool         _have_port_max_depth           ;
+  public : bool     *   _have_port_depth               ;//[nb_context]
+  public : bool     *   _have_port_inst_ifetch_ptr     ;//[nb_context]
+  public : bool         _have_port_history             ;
+  public : bool     *   _have_port_ras_index           ;//[nb_context]
+
+  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Parameters * _param_btb;
+  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Parameters * _param_dir;
+  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Parameters * _param_ras;
+  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters * _param_upt;
+  public : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Parameters * _param_glue;
 
     //-----[ methods ]-----------------------------------------------------------
-  public : Parameters  ();
+  public : Parameters  (uint32_t     nb_context                    ,
+			uint32_t     nb_decod_unit                 ,
+			uint32_t     size_address                  ,
+			uint32_t *   nb_instruction                ,//[nb_context]
+			uint32_t *   nb_inst_decod                 ,//[nb_decod_unit]
+			uint32_t     nb_inst_branch_predict        ,
+			uint32_t     nb_inst_branch_decod          ,
+			uint32_t     nb_inst_branch_update         ,
+			uint32_t     nb_inst_branch_complete       ,
+			uint32_t     btb_size_queue                ,
+			uint32_t     btb_associativity             ,
+			uint32_t     btb_size_counter              ,
+			Tvictim_t    btb_victim_scheme             ,
+			Tpredictor_t dir_predictor_scheme          ,
+			bool         dir_have_bht               [3],
+			uint32_t     dir_bht_size_shifter       [3],
+			uint32_t     dir_bht_nb_shifter         [3],
+			bool         dir_have_pht               [3],
+			uint32_t     dir_pht_size_counter       [3],
+			uint32_t     dir_pht_nb_counter         [3],
+			uint32_t     dir_pht_size_address_share [3],
+			uint32_t *   ras_size_queue                ,//[nb_context]
+			uint32_t *   upt_size_queue                 //[nb_context]
+			);
 //   public : Parameters  (Parameters & param) ;
   public : ~Parameters () ;
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h	(revision 82)
@@ -27,4 +27,10 @@
 #endif
 #include "Behavioural/include/Usage.h"
+
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/include/Branch_Target_Buffer.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/include/Direction.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Return_Address_Stack/include/Return_Address_Stack.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Update_Prediction_Table/include/Update_Prediction_Table.h"
+#include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.h"
 
 namespace morpheo {
@@ -61,5 +67,60 @@
   public    : SC_IN (Tcontrol_t)            *  in_NRESET       ;
 
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_VAL                         ; //[nb_context]
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_ACK                         ; //[nb_context]
+  public    : SC_IN (Taddress_t         )  **  in_PREDICT_PC_PREVIOUS                 ; //[nb_context]
+  public    : SC_IN (Taddress_t         )  **  in_PREDICT_PC_CURRENT                  ; //[nb_context]
+  public    : SC_IN (Tcontrol_t         )  **  in_PREDICT_PC_CURRENT_IS_DS_TAKE       ; //[nb_context]
+  public    : SC_OUT(Taddress_t         )  ** out_PREDICT_PC_NEXT                     ; //[nb_context]
+  public    : SC_OUT(Tcontrol_t         )  ** out_PREDICT_PC_NEXT_IS_DS_TAKE          ; //[nb_context]
+  public    : SC_OUT(Tcontrol_t         ) *** out_PREDICT_INSTRUCTION_ENABLE          ; //[nb_context][nb_instruction]
+  public    : SC_OUT(Tinst_ifetch_ptr_t )  ** out_PREDICT_INST_IFETCH_PTR             ; //[nb_context]
+  public    : SC_OUT(Tbranch_state_t    )  ** out_PREDICT_BRANCH_STATE                ; //[nb_context]
+  public    : SC_OUT(Tprediction_ptr_t  )  ** out_PREDICT_BRANCH_UPDATE_PREDICTION_ID ; //[nb_context]
+
+    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_VAL                           ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_OUT(Tcontrol_t         ) *** out_DECOD_ACK                           ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontext_t         ) ***  in_DECOD_CONTEXT_ID                    ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_MATCH_INST_IFETCH_PTR         ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tbranch_state_t    ) ***  in_DECOD_BRANCH_STATE                  ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tprediction_ptr_t  ) ***  in_DECOD_BRANCH_UPDATE_PREDICTION_ID   ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tbranch_condition_t) ***  in_DECOD_BRANCH_CONDITION              ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Tcontrol_t         ) ***  in_DECOD_BRANCH_DIRECTION              ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_SRC                   ; //[nb_decod_unit][nb_inst_decod]
+  public    : SC_IN (Taddress_t         ) ***  in_DECOD_ADDRESS_DEST                  ; //[nb_decod_unit][nb_inst_decod]
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_VAL                 ; //[nb_inst_branch_complete]
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_ACK                 ; //[nb_inst_branch_complete]
+  public    : SC_IN (Tcontext_t         )  **  in_BRANCH_COMPLETE_CONTEXT_ID          ; //[nb_inst_branch_complete]
+  public    : SC_IN (Tdepth_t           )  **  in_BRANCH_COMPLETE_DEPTH               ; //[nb_inst_branch_complete]
+  public    : SC_IN (Taddress_t         )  **  in_BRANCH_COMPLETE_ADDRESS             ; //[nb_inst_branch_complete]
+  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_COMPLETE_FLAG                ; //[nb_inst_branch_complete]
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_MISS_PREDICTION     ; //[nb_inst_branch_complete]
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_COMPLETE_TAKE                ; //[nb_inst_branch_complete]
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_SRC         ; //[nb_inst_branch_complete]
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_COMPLETE_ADDRESS_DEST        ; //[nb_inst_branch_complete]
+
+    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+  public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_VAL                    ; //[nb_context]
+  public    : SC_IN (Tcontrol_t         )  **  in_BRANCH_EVENT_ACK                    ; //[nb_context]
+//public    : SC_OUT(Tcontext_t         )  ** out_BRANCH_EVENT_CONTEXT_ID             ; //[nb_context]
+//public    : SC_OUT(Tdepth_t           )  ** out_BRANCH_EVENT_DEPTH                  ; //[nb_context]
+//public    : SC_OUT(Tcontrol_t         )  ** out_BRANCH_EVENT_MISS_PREDICTION        ; //[nb_context]
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_SRC            ; //[nb_context]
+  public    : SC_OUT(Taddress_t         )  ** out_BRANCH_EVENT_ADDRESS_DEST           ; //[nb_context]
+
+    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_NB_BRANCH                     ; //[nb_context]
+  public    : SC_OUT(Tdepth_t           )  ** out_DEPTH_TAIL                          ; //[nb_context]
+
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Branch_Target_Buffer    * _component_btb;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Direction	        * _component_dir;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Return_Address_Stack    * _component_ras;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table * _component_upt;
+  public    : morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Prediction_unit_Glue    * _component_glue;
 
     // ~~~~~[ Register ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
@@ -84,5 +145,5 @@
 #endif
    Parameters                                  * param,
-   morpheo::behavioural::Tusage_t                usage=USE_ALL
+   morpheo::behavioural::Tusage_t                usage
    );
   public  :          ~Prediction_unit             (void);
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters.cpp	(revision 82)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Parameters.h"
+#include "Common/include/Max.h"
 
 namespace morpheo {
@@ -18,7 +19,136 @@
 #undef  FUNCTION
 #define FUNCTION "Prediction_unit::Parameters"
-  Parameters::Parameters ()
+  Parameters::Parameters (uint32_t     nb_context                    ,
+			  uint32_t     nb_decod_unit                 ,
+			  uint32_t     size_address                  ,
+			  uint32_t *   nb_instruction                ,//[nb_context]
+			  uint32_t *   nb_inst_decod                 ,//[nb_decod_unit]
+			  uint32_t     nb_inst_branch_predict        ,
+			  uint32_t     nb_inst_branch_decod          ,
+			  uint32_t     nb_inst_branch_update         ,
+			  uint32_t     nb_inst_branch_complete       ,
+			  uint32_t     btb_size_queue                ,
+			  uint32_t     btb_associativity             ,
+			  uint32_t     btb_size_counter              ,
+			  Tvictim_t    btb_victim_scheme             ,
+			  Tpredictor_t dir_predictor_scheme          ,
+			  bool         dir_have_bht               [3],
+			  uint32_t     dir_bht_size_shifter       [3],
+			  uint32_t     dir_bht_nb_shifter         [3],
+			  bool         dir_have_pht               [3],
+			  uint32_t     dir_pht_size_counter       [3],
+			  uint32_t     dir_pht_nb_counter         [3],
+			  uint32_t     dir_pht_size_address_share [3],
+			  uint32_t *   ras_size_queue                ,//[nb_context]
+			  uint32_t *   upt_size_queue                 //[nb_context]
+			  )
   {
     log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
+    
+    _nb_context                 = nb_context                ;
+    _nb_decod_unit              = nb_decod_unit             ;
+    _size_address               = size_address              ;
+    _nb_instruction             = nb_instruction            ;
+    _nb_inst_decod              = nb_inst_decod             ;
+    _nb_inst_branch_predict     = nb_inst_branch_predict    ;
+    _nb_inst_branch_decod       = nb_inst_branch_decod      ;
+    _nb_inst_branch_update      = nb_inst_branch_update     ;
+    _nb_inst_branch_complete    = nb_inst_branch_complete   ;
+    _btb_size_queue             = btb_size_queue            ;
+    _btb_associativity          = btb_associativity         ;
+    _btb_size_counter           = btb_size_counter          ;
+    _btb_victim_scheme          = btb_victim_scheme         ;
+    _dir_predictor_scheme       = dir_predictor_scheme      ;
+    for (uint32_t i=0; i<3; i++)
+      {
+	_dir_have_bht               [i] = dir_have_bht               [i];
+	_dir_bht_size_shifter       [i] = dir_bht_size_shifter       [i];
+	_dir_bht_nb_shifter         [i] = dir_bht_nb_shifter         [i];
+	_dir_have_pht               [i] = dir_have_pht               [i];
+	_dir_pht_size_counter       [i] = dir_pht_size_counter       [i];
+	_dir_pht_nb_counter         [i] = dir_pht_nb_counter         [i];
+	_dir_pht_size_address_share [i] = dir_pht_size_address_share [i];
+      }
+    _ras_size_queue             = ras_size_queue            ;
+    _upt_size_queue             = upt_size_queue            ;
+
+    _size_context_id            = log2(_nb_context);
+//   public : uint32_t *   _size_inst_ifetch_ptr          ;//[nb_context]
+
+    _size_depth                 = new uint32_t [_nb_context];
+    _size_ras_index             = new uint32_t [_nb_context];
+    for (uint32_t i=0; i<_nb_context; i++)
+      {
+	_size_depth     [i] = log2(_upt_size_queue [i]);
+	_size_ras_index [i] = log2(_ras_size_queue [i]);
+      }
+
+    _max_size_depth             = max<uint32_t>(_size_depth,_nb_context);
+    _have_port_context_id       = (_size_context_id > 0);
+    _have_port_max_depth        = (_max_size_depth  > 0);
+//   public : bool     *   _have_port_inst_ifetch_ptr     ;//[nb_context]
+
+    _param_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue   ::Parameters 
+      (_nb_context            ,
+       _nb_decod_unit         ,
+       _size_address          ,
+       _nb_instruction        ,
+       _size_depth            ,
+       _nb_inst_decod         ,
+       _nb_inst_branch_predict,
+       _nb_inst_branch_decod  ,
+       _nb_inst_branch_update );
+
+    _size_inst_ifetch_ptr      = _param_glue->_size_inst_ifetch_ptr     ;
+    _have_port_depth           = _param_glue->_have_port_depth;
+    _have_port_inst_ifetch_ptr = _param_glue->_have_port_inst_ifetch_ptr;
+    _have_port_history         = (_size_history > 0);
+    
+    _param_btb  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer   ::Parameters 
+      (_nb_context            ,
+       _nb_instruction        ,
+       _btb_size_queue        ,
+       _btb_associativity     ,
+       _size_address          ,
+       _btb_size_counter      ,
+       _nb_inst_branch_predict,
+       _nb_inst_branch_decod  ,
+       _nb_inst_branch_update ,
+       _btb_victim_scheme     );
+
+    _param_dir  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction              ::Parameters 
+      (_dir_predictor_scheme      ,
+       _nb_inst_branch_predict    ,
+       _nb_inst_branch_update     ,
+       _size_address              ,
+       _dir_have_bht              ,
+       _dir_bht_size_shifter      ,
+       _dir_bht_nb_shifter        ,
+       _dir_have_pht              ,
+       _dir_pht_size_counter      ,
+       _dir_pht_nb_counter        ,
+       _dir_pht_size_address_share);
+
+    _size_history = _param_dir->_size_history;
+
+    _param_ras  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack   ::Parameters 
+      (_nb_context            ,
+       _ras_size_queue        ,
+       _size_address          ,
+       _nb_inst_branch_predict,
+       _nb_inst_branch_decod  ,
+       _nb_inst_branch_update );
+
+    _param_upt  = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Parameters 
+      (_nb_context             ,
+       _upt_size_queue         ,
+       _size_address           ,
+       _nb_inst_branch_predict ,
+       _nb_inst_branch_decod   ,
+       _nb_inst_branch_complete,
+       _nb_inst_branch_update  ,
+       _size_history           ,
+       _size_ras_index         );
+
     test();
     log_printf(FUNC,Prediction_unit,FUNCTION,"End");
@@ -39,4 +169,14 @@
   {
     log_printf(FUNC,Prediction_unit,FUNCTION,"Begin");
+  
+    delete _param_btb;
+    delete _param_dir;
+    delete _param_ras;
+    delete _param_upt;
+    delete _param_glue;
+
+    delete [] _size_depth    ;
+    delete [] _size_ras_index;
+
     log_printf(FUNC,Prediction_unit,FUNCTION,"End");
   };
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Parameters_print.cpp	(revision 82)
@@ -26,5 +26,60 @@
 
     xml.balise_open("prediction_unit");
-//  xml.singleton_begin(""); xml.attribut("value",toString(_)); xml.singleton_end();
+    xml.singleton_begin("nb_context                            "); xml.attribut("value",toString(_nb_context                            )); xml.singleton_end();
+    xml.singleton_begin("nb_decod_unit                         "); xml.attribut("value",toString(_nb_decod_unit                         )); xml.singleton_end();
+    xml.singleton_begin("size_address                          "); xml.attribut("value",toString(_size_address                          )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_predict                "); xml.attribut("value",toString(_nb_inst_branch_predict                )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_decod                  "); xml.attribut("value",toString(_nb_inst_branch_decod                  )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_update                 "); xml.attribut("value",toString(_nb_inst_branch_update                 )); xml.singleton_end();
+    xml.singleton_begin("nb_inst_branch_complete               "); xml.attribut("value",toString(_nb_inst_branch_complete               )); xml.singleton_end();
+    xml.singleton_begin("btb_size_queue                        "); xml.attribut("value",toString(_btb_size_queue                        )); xml.singleton_end();
+    xml.singleton_begin("btb_associativity                     "); xml.attribut("value",toString(_btb_associativity                     )); xml.singleton_end();
+    xml.singleton_begin("btb_size_counter                      "); xml.attribut("value",toString(_btb_size_counter                      )); xml.singleton_end();
+    xml.singleton_begin("btb_victim_scheme                     "); xml.attribut("value",toString(_btb_victim_scheme                     )); xml.singleton_end();
+    xml.singleton_begin("dir_predictor_scheme                  "); xml.attribut("value",toString(_dir_predictor_scheme                  )); xml.singleton_end();
+    xml.comment("predictor_scheme : ");
+    xml.comment(" * predictor_never_take  : don't use \"predictor_{0,1,2}\" parameters.");
+    xml.comment(" * predictor_always_take : don't use \"predictor_{0,1,2}\" parameters.");
+    xml.comment(" * predictor_static      : don't use \"predictor_{0,1,2}\" parameters.");
+    xml.comment(" * predictor_last_take   : don't use \"predictor_{0,1,2}\" parameters.");
+    xml.comment(" * predictor_counter     :       use \"predictor_0\"       parameters.");
+    xml.comment(" * predictor_local       :       use \"predictor_0\"       parameters.");
+    xml.comment(" * predictor_global      :       use \"predictor_0\"       parameters.");
+    xml.comment(" * predictor_meta        :       use \"predictor_{0,1,2}\" parameters.");
+    xml.comment(" * predictor_custom      :       use \"predictor_{0,1,2}\" parameters.");
+    for (uint32_t i=0; i<3; i++)
+      {
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_bht              "); xml.attribut("value",toString(_dir_have_bht               [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_size_shifter      "); xml.attribut("value",toString(_dir_bht_size_shifter       [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_bht_nb_shifter        "); xml.attribut("value",toString(_dir_bht_nb_shifter         [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_have_pht              "); xml.attribut("value",toString(_dir_have_pht               [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_counter      "); xml.attribut("value",toString(_dir_pht_size_counter       [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_nb_counter        "); xml.attribut("value",toString(_dir_pht_nb_counter         [i])); xml.singleton_end();
+        xml.singleton_begin("dir_predictor_"+toString(i)+"_pht_size_address_share"); xml.attribut("value",toString(_dir_pht_size_address_share [i])); xml.singleton_end();
+      }
+
+    for (uint32_t i=0;i<_nb_context; i++)
+      {
+        xml. balise_open_begin("component");
+        xml.  attribut("type","context");
+        xml.  attribut("id"  ,toString(i));
+        xml. balise_open_end();
+        xml.  singleton_begin("nb_instruction                        "); xml.attribut("value",toString(_nb_instruction                     [i])); xml.singleton_end();
+        xml.  singleton_begin("ras_size_queue                        "); xml.attribut("value",toString(_ras_size_queue                     [i])); xml.singleton_end();
+        xml.  singleton_begin("upt_size_queue                        "); xml.attribut("value",toString(_upt_size_queue                     [i])); xml.singleton_end();
+        xml. balise_close();
+      }
+
+    for (uint32_t i=0;i<_nb_decod_unit; i++)
+      {
+        xml. balise_open_begin("component");
+        xml.  attribut("type","decod_unit");
+        xml.  attribut("id"  ,toString(i));
+        xml. balise_open_end();
+        xml.  singleton_begin("nb_inst_decod                         "); xml.attribut("value",toString(_nb_inst_decod                      [i])); xml.singleton_end();
+        xml. balise_close();
+      }
+
+
     xml.balise_close();
 
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_allocation.cpp	(revision 82)
@@ -15,6 +15,4 @@
 namespace front_end {
 namespace prediction_unit {
-
-
 
 #undef  FUNCTION
@@ -54,13 +52,764 @@
       in_NRESET       = interface->set_signal_in  <Tcontrol_t> ("nreset",1, RESET_VHDL_YES);
     }
+
+    // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      {
+	ALLOC1_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context);
+	
+	ALLOC1_VALACK_IN ( in_PREDICT_VAL                        ,VAL);
+	ALLOC1_VALACK_OUT(out_PREDICT_ACK                        ,ACK);
+	ALLOC1_SIGNAL_IN ( in_PREDICT_PC_PREVIOUS                ,"pc_previous"                ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT                 ,"pc_current"                 ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_IN ( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,"pc_current_is_ds_take"      ,Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT                    ,"pc_next"                    ,Taddress_t         ,_param->_size_address);
+	ALLOC1_SIGNAL_OUT(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,"pc_next_is_ds_take"         ,Tcontrol_t         ,1);
+	ALLOC1_SIGNAL_OUT(out_PREDICT_INST_IFETCH_PTR            ,"inst_ifetch_ptr"            ,Tinst_ifetch_ptr_t ,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
+	ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state);
+	ALLOC1_SIGNAL_OUT(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_size_depth [alloc_signal_it1]);
+      }
+      {
+	ALLOC2_INTERFACE("predict",IN,SOUTH,"Interface with ifetch unit",_param->_nb_context,_param->_nb_instruction[alloc_interface_it1]);
+	_ALLOC2_SIGNAL_OUT(out_PREDICT_INSTRUCTION_ENABLE         ,"instruction_enable"         ,Tcontrol_t         ,1,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1]);
+      }
+    }
+
+    // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+    {
+      {
+	ALLOC2_INTERFACE("decod",IN,SOUTH,"Interface with decod unit",_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_interface_it1]);
+	
+	_ALLOC2_VALACK_IN ( in_DECOD_VAL                        ,VAL,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_VALACK_OUT(out_DECOD_ACK                        ,ACK,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_CONTEXT_ID                 ,"context_id"                 ,Tcontext_t         ,_param->_size_context_id      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_MATCH_INST_IFETCH_PTR      ,"match_inst_ifetch_ptr"      ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_STATE               ,"branch_state"               ,Tbranch_state_t    ,_param->_size_branch_state    ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,"branch_update_prediction_id",Tprediction_ptr_t  ,_param->_max_size_depth       ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_CONDITION           ,"branch_condition"           ,Tbranch_condition_t,_param->_size_branch_condition,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_BRANCH_DIRECTION           ,"branch_direction"           ,Tcontrol_t         ,1                             ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_SRC                ,"address_src"                ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+	_ALLOC2_SIGNAL_IN ( in_DECOD_ADDRESS_DEST               ,"address_dest"               ,Taddress_t         ,_param->_size_address         ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1]);
+      }
+    }
+
+    // ~~~~~[ Interface : "branch_complete" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC1_INTERFACE("branch_complete", IN,SOUTH, "branch_complete", _param->_nb_inst_branch_complete);
+      
+      ALLOC1_VALACK_IN ( in_BRANCH_COMPLETE_VAL            ,VAL);
+      ALLOC1_VALACK_OUT(out_BRANCH_COMPLETE_ACK            ,ACK);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_ADDRESS        ,"address"        ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_IN ( in_BRANCH_COMPLETE_FLAG           ,"flag"           ,Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_TAKE           ,"take"           ,Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_COMPLETE_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
+    }
+
+    // ~~~~~[ Interface : "branch_event" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      ALLOC1_INTERFACE("branch_event", IN,SOUTH, "branch_event", _param->_nb_context);
+      
+      ALLOC1_VALACK_OUT(out_BRANCH_EVENT_VAL            ,VAL);
+      ALLOC1_VALACK_IN ( in_BRANCH_EVENT_ACK            ,ACK);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_CONTEXT_ID     ,"context_id"     ,Tcontext_t,_param->_size_context_id);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_DEPTH          ,"depth"          ,Tdepth_t  ,_param->_max_size_depth);
+//    ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_MISS_PREDICTION,"miss_prediction",Tcontrol_t,1);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_SRC    ,"address_src"    ,Taddress_t,_param->_size_address);
+      ALLOC1_SIGNAL_OUT(out_BRANCH_EVENT_ADDRESS_DEST   ,"address_dest"   ,Taddress_t,_param->_size_address);
+    }
+
+    // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~	      
+    {
+      ALLOC1_INTERFACE("depth",OUT,SOUTH,"Interface with depth",_param->_nb_context);
+
+      ALLOC1_SIGNAL_OUT(out_DEPTH_NB_BRANCH    ,"nb_branch"    ,Tdepth_t,_param->_size_depth[alloc_signal_it1]+1);
+      ALLOC1_SIGNAL_OUT(out_DEPTH_TAIL         ,"tail"         ,Tdepth_t,_param->_size_depth[alloc_signal_it1]);
+    }
+
+    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    std::string name;
+
+    {
+      name = _name+"_branch_target_buffer";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
+      
+      _component_btb = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::branch_target_buffer::Branch_Target_Buffer
+        (name.c_str()
+#ifdef STATISTICS
+         ,param_statistics
+#endif
+         ,_param->_param_btb
+	 ,_usage);
+      
+      _component->set_component (_component_btb->_component
+#ifdef POSITION
+                                 , 50, 50, 10, 10
+#endif
+                                 );
+    }
+
+    {
+      name = _name+"_direction";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
+      
+      _component_dir = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::direction::Direction
+        (name.c_str()
+#ifdef STATISTICS
+         ,param_statistics
+#endif
+         ,_param->_param_dir
+	 ,_usage);
+      
+      _component->set_component (_component_dir->_component
+#ifdef POSITION
+                                 , 50, 50, 10, 10
+#endif
+                                 );
+    }
     
-    // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    {
+      name = _name+"_return_address_stack";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
+      
+      _component_ras = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::return_address_stack::Return_Address_Stack
+        (name.c_str()
+#ifdef STATISTICS
+         ,param_statistics
+#endif
+         ,_param->_param_ras
+	 ,_usage);
+      
+      _component->set_component (_component_ras->_component
+#ifdef POSITION
+                                 , 50, 50, 10, 10
+#endif
+                                 );
+    }
+    
+    {
+      name = _name+"_update_prediction_table";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
+      
+      _component_upt = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::update_prediction_table::Update_Prediction_Table
+        (name.c_str()
+#ifdef STATISTICS
+         ,param_statistics
+#endif
+         ,_param->_param_upt
+	 ,_usage);
+      
+      _component->set_component (_component_upt->_component
+#ifdef POSITION
+                                 , 50, 50, 10, 10
+#endif
+                                 );
+    }
+
+    {
+      name = _name+"_prediction_unit_glue";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Create   : %s"),name.c_str());
+      
+      _component_glue = new morpheo::behavioural::core::multi_front_end::front_end::prediction_unit::prediction_unit_glue::Prediction_unit_Glue
+        (name.c_str()
+#ifdef STATISTICS
+         ,param_statistics
+#endif
+         ,_param->_param_glue
+	 ,_usage);
+      
+      _component->set_component (_component_glue->_component
+#ifdef POSITION
+                                 , 50, 50, 10, 10
+#endif
+                                 );
+    }
     
     // ~~~~~[ Instanciation ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
     std::string src,dest;
 
+    // ===================================================================
+    // =====[ branch_target_buffer ]======================================
+    // ===================================================================
+    {
+      src = _name+"_branch_target_buffer";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
+           
+      {
+        dest = _name;
+#ifdef POSITION
+        _component->interface_map (src ,"",
+                                   dest,"");
+#endif
+        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
+        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
+      }
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"predict_"+toString(i),
+				     dest,"predict_btb_"+toString(i));
+#endif
+
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"         ,
+			           dest,"out_PREDICT_BTB_"+toString(i)+"_VAL"         ); 
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"         ,
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_ACK"         ); 
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"  ,
+		                   dest,"out_PREDICT_BTB_"+toString(i)+"_CONTEXT_ID"  );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS"     ,
+		                   dest,"out_PREDICT_BTB_"+toString(i)+"_ADDRESS"     );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HIT"         ,
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_HIT"         ); 
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_SRC" ,
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_SRC" ); 
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_DEST",
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_ADDRESS_DEST"); 
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_CONDITION"   ,
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_CONDITION"   ); 
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_IS_ACCURATE" ,
+		                   dest, "in_PREDICT_BTB_"+toString(i)+"_IS_ACCURATE" );
+
+	  dest = _name+"_direction";
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_LAST_TAKE" ,
+		                   dest, "in_PREDICT_"+toString(i)+"_LAST_TAKE" );
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"decod_"+toString(i),
+				     dest,"decod_btb_"+toString(i));
+#endif
+
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"            ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_VAL"            );
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"            ,
+			           dest, "in_DECOD_BTB_"+toString(i)+"_ACK"            );
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"     ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_CONTEXT_ID"     );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_SRC"    ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_SRC"    );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_DEST"   ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_ADDRESS_DEST"   );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONDITION"      ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_CONDITION"      );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_LAST_TAKE"      ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_LAST_TAKE"      );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_PREDICTION",
+			           dest,"out_DECOD_BTB_"+toString(i)+"_MISS_PREDICTION");
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_IS_ACCURATE"    ,
+			           dest,"out_DECOD_BTB_"+toString(i)+"_IS_ACCURATE"    );
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
+			           dest,"out_UPDATE_BTB_"+toString(i)+"_VAL");
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
+			           dest, "in_UPDATE_BTB_"+toString(i)+"_ACK");
+
+	  dest = _name+"_update_prediction_table";
+#ifdef POSITION
+	  _component->interface_map (src ,"update_"+toString(i),
+				     dest,"update_"+toString(i));
+#endif
+
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONTEXT_ID"     ,
+			           dest,"out_UPDATE_"+toString(i)+    "_CONTEXT_ID"     );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS_SRC"    ,
+			           dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC"    );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS_DEST"   ,
+			           dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_DEST"   );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONDITION"      ,
+			           dest,"out_UPDATE_"+toString(i)+"_BTB_CONDITION"      );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_LAST_TAKE"      ,
+			           dest,"out_UPDATE_"+toString(i)+    "_DIRECTION_GOOD" );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_MISS_PREDICTION",
+			           dest,"out_UPDATE_"+toString(i)+    "_MISS_PREDICTION");
+	}
+    }
+
+    // ===================================================================
+    // =====[ direction ]=================================================
+    // ===================================================================
+    {
+      src = _name+"_direction";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
+           
+      {
+        dest = _name;
+#ifdef POSITION
+        _component->interface_map (src ,"",
+                                   dest,"");
+#endif
+        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
+        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
+      }
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"predict_"+toString(i),
+				     dest,"predict_dir_"+toString(i));
+#endif
+
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"        ,
+			           dest,"out_PREDICT_DIR_"+toString(i)+"_VAL"        );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"        ,
+			           dest, "in_PREDICT_DIR_"+toString(i)+"_ACK"        );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS_SRC",
+			           dest,"out_PREDICT_DIR_"+toString(i)+"_ADDRESS_SRC");
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_STATIC"     ,
+			           dest,"out_PREDICT_DIR_"+toString(i)+"_STATIC"     );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_DIRECTION"  ,
+			           dest, "in_PREDICT_DIR_"+toString(i)+"_DIRECTION"  );
+
+	  dest = _name+"_update_prediction_table";
+	  if (_param->_have_port_history)
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HISTORY"  ,
+			           dest, "in_PREDICT_"    +toString(i)+"_HISTORY"  );
+	  //out_PREDICT_DIR_LAST_TAKE - component_map branch_target_buffer
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
+			           dest,"out_UPDATE_DIR_"+toString(i)+"_VAL");
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
+			           dest, "in_UPDATE_DIR_"+toString(i)+"_ACK");
+
+	  dest = _name+"_update_prediction_table";
+#ifdef POSITION
+	  _component->interface_map (src ,"update_"+toString(i),
+				     dest,"update_"+toString(i));
+#endif
+
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS"  ,
+			           dest,"out_UPDATE_"+toString(i)+"_BTB_ADDRESS_SRC");
+	  if (_param->_have_port_history)
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_HISTORY"  ,
+			           dest,"out_UPDATE_"+toString(i)+"_DIR_HISTORY"  );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_DIRECTION",
+			           dest,"out_UPDATE_"+toString(i)+    "_DIRECTION_GOOD");
+	  
+	}
+    }
+
+    // ===================================================================
+    // =====[ return_address_stack ]======================================
+    // ===================================================================
+    {
+      src = _name+"_return_address_stack";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
+
+           
+      {
+        dest = _name;
+#ifdef POSITION
+        _component->interface_map (src ,"",
+                                   dest,"");
+#endif
+        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
+        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
+      }
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"predict_"+toString(i),
+				     dest,"predict_dir_"+toString(i));
+#endif
+	  
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"         ,
+		                   dest,"out_PREDICT_RAS_"+toString(i)+"_VAL"         );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"         ,
+		                   dest, "in_PREDICT_RAS_"+toString(i)+"_ACK"         );
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"  ,
+		                   dest,"out_PREDICT_RAS_"+toString(i)+"_CONTEXT_ID"  );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_HIT"         ,
+		                   dest, "in_PREDICT_RAS_"+toString(i)+"_HIT"         ); 
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_PUSH"        ,
+		                   dest,"out_PREDICT_RAS_"+toString(i)+"_PUSH"        );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_ADDRESS_PUSH",
+		                   dest,"out_PREDICT_RAS_"+toString(i)+"_ADDRESS_PUSH");
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ADDRESS_POP" ,
+		                   dest, "in_PREDICT_RAS_"+toString(i)+"_ADDRESS_POP" );
+
+	  dest = _name+"_update_prediction_table";
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_INDEX",
+		                   dest, "in_PREDICT_"    +toString(i)+"_RAS_INDEX");
+	}
+      
+      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"decod_"+toString(i),
+				     dest,"decod_ras_"+toString(i));
+#endif
+	  
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"            ,
+			           dest,"out_DECOD_RAS_"+toString(i)+"_VAL"            );
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"            ,
+			           dest, "in_DECOD_RAS_"+toString(i)+"_ACK"            );
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"     ,
+			           dest,"out_DECOD_RAS_"+toString(i)+"_CONTEXT_ID"     ); 
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_HIT"            ,
+			           dest, "in_DECOD_RAS_"+toString(i)+"_HIT"            ); 
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_PUSH"           ,
+			           dest,"out_DECOD_RAS_"+toString(i)+"_PUSH"           );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_ADDRESS_PUSH"   ,
+			           dest,"out_DECOD_RAS_"+toString(i)+"_ADDRESS_PUSH"   );
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ADDRESS_POP"    ,
+			           dest, "in_DECOD_RAS_"+toString(i)+"_ADDRESS_POP"    );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_PREDICTION",
+			           dest,"out_DECOD_RAS_"+toString(i)+"_MISS_PREDICTION");
+
+	  dest = _name+"_update_prediction_table";
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_INDEX"          ,
+			           dest, "in_DECOD_"    +toString(i)+"_RAS_INDEX"      ); 
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_VAL",
+			           dest,"out_UPDATE_RAS_"+toString(i)+"_VAL");
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_ACK",
+			           dest, "in_UPDATE_RAS_"+toString(i)+"_ACK");
+
+	  dest = _name+"_update_prediction_table";
+#ifdef POSITION
+	  _component->interface_map (src ,"update_"+toString(i),
+				     dest,"update_"+toString(i));
+#endif
+
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_CONTEXT_ID"       ,
+			           dest,"out_UPDATE_"+toString(i)+    "_CONTEXT_ID"       );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_PUSH"             ,
+			           dest,"out_UPDATE_"+toString(i)+"_RAS_PUSH"             );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_ADDRESS"          ,
+			           dest,"out_UPDATE_"+toString(i)+"_RAS_ADDRESS"          );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_INDEX"            ,
+			           dest,"out_UPDATE_"+toString(i)+"_RAS_INDEX"            );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_MISS_PREDICTION"  ,
+			           dest,"out_UPDATE_"+toString(i)+    "_MISS_PREDICTION"  );
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"+toString(i)+    "_PREDICTION_IFETCH",
+			           dest,"out_UPDATE_"+toString(i)+"_RAS_PREDICTION_IFETCH");
+	}
+    }
+
+    // ===================================================================
+    // =====[ update_prediction_table ]===================================
+    // ===================================================================
+    {
+      src = _name+"_update_prediction_table";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
+           
+      {
+        dest = _name;
+#ifdef POSITION
+        _component->interface_map (src ,"",
+                                   dest,"");
+#endif
+        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
+        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
+      }
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_predict; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+#ifdef POSITION
+	  _component->interface_map (src ,"predict_"+toString(i),
+				     dest,"predict_dir_"+toString(i));
+#endif
+      
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_VAL"             ,
+			           dest,"out_PREDICT_UPT_"+toString(i)+"_VAL"             );
+	  COMPONENT_MAP(_component,src ,"out_PREDICT_"    +toString(i)+"_ACK"             ,
+		                   dest, "in_PREDICT_UPT_"+toString(i)+"_ACK"             );
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_CONTEXT_ID"      ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_CONTEXT_ID"      );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_ADDRESS_SRC" ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_SRC" );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_ADDRESS_DEST",
+			           dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_ADDRESS_DEST");
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_CONDITION"   ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_CONDITION"   );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_LAST_TAKE"   ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_LAST_TAKE"   );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_BTB_IS_ACCURATE" ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_BTB_IS_ACCURATE" );
+	  COMPONENT_MAP(_component,src , "in_PREDICT_"    +toString(i)+"_RAS_ADDRESS"     ,
+		                   dest,"out_PREDICT_UPT_"+toString(i)+"_RAS_ADDRESS"     );
+
+	  //out_PREDICT_HISTORY   - component_map direction
+	  // in_PREDICT_RAS_INDEX - component_map return_address_stack
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_decod; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+	  
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_VAL"                 ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_VAL"                 );
+	  COMPONENT_MAP(_component,src ,"out_DECOD_"    +toString(i)+"_ACK"                 ,
+			           dest, "in_DECOD_UPT_"+toString(i)+"_ACK"                 );
+	  if (_param->_have_port_context_id)
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_CONTEXT_ID"          ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_CONTEXT_ID"          );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_ADDRESS_SRC"     ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_SRC"     );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_ADDRESS_DEST"    ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_BTB_ADDRESS_DEST"    );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_CONDITION"       ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_BTB_CONDITION"       );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_BTB_LAST_TAKE"       ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_BTB_LAST_TAKE"       );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_RAS_ADDRESS"         ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_RAS_ADDRESS"         );
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_IFETCH"         ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_MISS_IFETCH"         ); 
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_MISS_DECOD"          ,
+			           dest,"out_DECOD_UPT_"+toString(i)+"_MISS_DECOD"          ); 
+	  if (_param->_have_port_max_depth)
+	  COMPONENT_MAP(_component,src , "in_DECOD_"    +toString(i)+"_UPDATE_PREDICTION_ID",
+			           dest,"out_DECOD_UPT_"+toString(i)+"_UPDATE_PREDICTION_ID");
+	  
+	  //out_DECOD_UPT_RAS_INDEX - component_map return_address_stack
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_update; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+
+#ifdef POSITION
+	  _component->interface_map (src ,"update_"+toString(i),
+				     dest,"update_upt_"+toString(i));
+#endif
+
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_VAL",
+			           dest, "in_UPDATE_UPT_"+toString(i)+"_VAL");
+	  COMPONENT_MAP(_component,src , "in_UPDATE_"    +toString(i)+"_ACK",
+			           dest,"out_UPDATE_UPT_"+toString(i)+"_ACK");
+
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_BTB_VAL",
+			           dest, "in_UPDATE_UPT_"+toString(i)+"_BTB_VAL");
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_DIR_VAL",
+			           dest, "in_UPDATE_UPT_"+toString(i)+"_DIR_VAL");
+	  COMPONENT_MAP(_component,src ,"out_UPDATE_"    +toString(i)+"_RAS_VAL",
+			           dest, "in_UPDATE_UPT_"+toString(i)+"_RAS_VAL");
+
+	  //in_UPDATE_UPT_CONTEXT_ID            - component_map branch_target_buffer
+	  //in_UPDATE_UPT_MISS_PREDICTION       - component_map branch_target_buffer
+	  //in_UPDATE_UPT_DIRECTION_GOOD        - component_map branch_target_buffer
+	  //in_UPDATE_UPT_BTB_ADDRESS_SRC       - component_map branch_target_buffer
+	  //in_UPDATE_UPT_BTB_ADDRESS_DEST      - component_map branch_target_buffer
+	  //in_UPDATE_UPT_BTB_CONDITION         - component_map branch_target_buffer
+	  //in_UPDATE_UPT_DIR_HISTORY           - component_map direction
+	  //in_UPDATE_UPT_RAS_ADDRESS           - component_map return_address_stack
+	  //in_UPDATE_UPT_RAS_PUSH              - component_map return_address_stack
+	  //in_UPDATE_UPT_RAS_INDEX             - component_map return_address_stack
+	  //in_UPDATE_UPT_RAS_PREDICTION_IFETCH - component_map return_address_stack
+	}
+
+      for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++)
+	{
+	  dest = _name;
+
+#ifdef POSITION
+	  _component->interface_map (src ,"complete_"+toString(i),
+				     dest,"complete_"+toString(i));
+#endif
+
+	  PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            ,
+		              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_VAL"            );
+	  PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            ,
+		              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ACK"            );
+	  if (_param->_have_port_context_id)
+	  PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     ,
+		              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_CONTEXT_ID"     );
+	  if (_param->_have_port_max_depth)
+	  PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          ,
+		              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_DEPTH"          );
+	  PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        ,
+		              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS"        );
+	  PORT_MAP(_component,src , "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"           ,
+		              dest, "in_BRANCH_COMPLETE_"+toString(i)+"_FLAG"           );
+	  PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION",
+		              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_MISS_PREDICTION");
+	  PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE"           ,
+		              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_TAKE"           );
+	  PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC"    ,
+		              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_SRC"    );
+	  PORT_MAP(_component,src ,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"   ,
+		              dest,"out_BRANCH_COMPLETE_"+toString(i)+"_ADDRESS_DEST"   );
+	}
+
+      for (uint32_t i=0; i<_param->_nb_context; i++)
+	{
+	  dest = _name;
+
+#ifdef POSITION
+	  _component->interface_map (src ,"branch_event_"+toString(i),
+				     dest,"branch_event_"+toString(i));
+#endif
+
+	  PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_VAL"         ,dest,"out_BRANCH_EVENT_"+toString(i)+"_VAL"         );
+	  PORT_MAP(_component,src , "in_BRANCH_EVENT_"+toString(i)+"_ACK"         ,dest, "in_BRANCH_EVENT_"+toString(i)+"_ACK"         );
+	  PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" ,dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_SRC" );
+	  PORT_MAP(_component,src ,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST",dest,"out_BRANCH_EVENT_"+toString(i)+"_ADDRESS_DEST");
+	}
+
+      for (uint32_t i=0; i<_param->_nb_context; i++)
+	{
+	  dest = _name+"_prediction_unit_glue";
+	  
+#ifdef POSITION
+	  _component->interface_map (src ,"depth_"+toString(i),
+				     dest,"depth_"+toString(i));
+#endif
+	  
+	  COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_NB_BRANCH",
+			           dest, "in_DEPTH_"+toString(i)+"_UPT_NB_BRANCH");
+
+	  if (_param->_have_port_depth[i])
+	  COMPONENT_MAP(_component,src ,"out_DEPTH_"+toString(i)+    "_TAIL"     ,
+		                   dest, "in_DEPTH_"+toString(i)+"_UPT_TAIL"     );
+	}
+
+    }
+
+    // ===================================================================
+    // =====[ prediction_unit_glue ]======================================
+    // ===================================================================
+    {
+      src = _name+"_prediction_unit_glue";
+      log_printf(INFO,Prediction_unit,FUNCTION,_("Instance : %s"),src.c_str());
+           
+      {
+        dest = _name;
+#ifdef POSITION
+        _component->interface_map (src ,"",
+                                   dest,"");
+#endif
+
+        PORT_MAP(_component,src , "in_CLOCK" ,dest, "in_CLOCK");
+        PORT_MAP(_component,src , "in_NRESET",dest, "in_NRESET");
+      }
+
+      for (uint32_t i=0; i<_param->_nb_context; i++)
+	{
+	  dest = _name;
+#ifdef POSITION
+	  _component->interface_map (src ,"predict_"+toString(i),
+				     dest,"predict_"+toString(i));
+#endif
+	  
+	  PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_VAL"                        ,
+		              dest, "in_PREDICT_"+toString(i)+"_VAL"                        );
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_ACK"                        ,
+		              dest,"out_PREDICT_"+toString(i)+"_ACK"                        );
+	  PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_PREVIOUS"                ,
+		              dest, "in_PREDICT_"+toString(i)+"_PC_PREVIOUS"                );
+	  PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT"                 ,
+		              dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT"                 );
+	  PORT_MAP(_component,src , "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE"      ,
+		              dest, "in_PREDICT_"+toString(i)+"_PC_CURRENT_IS_DS_TAKE"      );
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT"                    ,
+		              dest,"out_PREDICT_"+toString(i)+"_PC_NEXT"                    );
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         ,
+		              dest,"out_PREDICT_"+toString(i)+"_PC_NEXT_IS_DS_TAKE"         );
+	  if (_param->_have_port_inst_ifetch_ptr [i])
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            ,
+		              dest,"out_PREDICT_"+toString(i)+"_INST_IFETCH_PTR"            );
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               ,
+		              dest,"out_PREDICT_"+toString(i)+"_BRANCH_STATE"               );
+	  if (_param->_have_port_depth [i])
+	  PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID",
+		              dest,"out_PREDICT_"+toString(i)+"_BRANCH_UPDATE_PREDICTION_ID");
+	  
+	  for (uint32_t j=0; j<_param->_nb_instruction[i]; j++)
+	    {
+	      dest = _name;
+#ifdef POSITION
+	      _component->interface_map (src ,"predict_"+toString(i)+"_"+toString(j),
+					 dest,"predict_"+toString(i)+"_"+toString(j));
+#endif
+	      
+	      PORT_MAP(_component,src ,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE",
+		                  dest,"out_PREDICT_"+toString(i)+"_"+toString(j)+"_INSTRUCTION_ENABLE");
+	    }
+	}
+
+      for (uint32_t i=0; i<_param->_nb_decod_unit; i++)
+	for (uint32_t j=0; j<_param->_nb_inst_decod[i]; j++)
+	  {
+	    dest = _name;
+#ifdef POSITION
+	    _component->interface_map (src ,"decod_"+toString(i),
+				       dest,"decod_"+toString(i));
+#endif
+	    
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL"                        ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_VAL"                        );
+	    PORT_MAP(_component,src ,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK"                        ,
+		                dest,"out_DECOD_"+toString(i)+"_"+toString(j)+"_ACK"                        );
+	    if (_param->_have_port_context_id)
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_CONTEXT_ID"                 );
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_MATCH_INST_IFETCH_PTR"      );
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_STATE"               );
+	    if (_param->_have_port_max_depth)
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID",
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_UPDATE_PREDICTION_ID");
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_CONDITION"           );
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_BRANCH_DIRECTION"           );
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_SRC"                );
+	    PORT_MAP(_component,src , "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               ,
+		                dest, "in_DECOD_"+toString(i)+"_"+toString(j)+"_ADDRESS_DEST"               );
+	  }
+
+      for (uint32_t i=0; i<_param->_nb_context; i++)
+	{
+	  dest = _name;
+#ifdef POSITION
+	  _component->interface_map (src ,"depth_"+toString(i),
+				     dest,"depth_"+toString(i));
+#endif
+	  
+	  PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_NB_BRANCH",dest,"out_DEPTH_"+toString(i)+"_NB_BRANCH");
+	  if (_param->_have_port_depth[i])
+	  PORT_MAP(_component,src ,"out_DEPTH_"+toString(i)+"_TAIL"     ,dest,"out_DEPTH_"+toString(i)+"_TAIL"     );
+	}
+    }
 
     // ~~~~~[ Others ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
-     _component->test_map();
+    _component->test_map(false);
 
 #ifdef POSITION
Index: trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp
===================================================================
--- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp	(revision 81)
+++ trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/src/Prediction_unit_deallocation.cpp	(revision 82)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/include/Prediction_unit.h"
+#include "Behavioural/include/Allocation.h"
 
 namespace morpheo                    {
@@ -26,8 +27,59 @@
 	delete    in_CLOCK ;
 	delete    in_NRESET;
+
+	DELETE1_SIGNAL( in_PREDICT_VAL                        ,_param->_nb_context,1);
+	DELETE1_SIGNAL(out_PREDICT_ACK                        ,_param->_nb_context,1);
+	DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS                ,_param->_nb_context,_param->_size_address);
+	DELETE1_SIGNAL( in_PREDICT_PC_CURRENT                 ,_param->_nb_context,_param->_size_address);
+	DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE      ,_param->_nb_context,1);
+	DELETE1_SIGNAL(out_PREDICT_PC_NEXT                    ,_param->_nb_context,_param->_size_address);
+	DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE         ,_param->_nb_context,1);
+	DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR            ,_param->_nb_context,_param->_size_inst_ifetch_ptr [alloc_signal_it1]);
+	DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE               ,_param->_nb_context,_param->_size_branch_state);
+	DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context,_param->_size_depth [alloc_signal_it1]);
+
+	DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE       ,_param->_nb_context,_param->_nb_instruction[alloc_signal_it1],1);
+	DELETE2_SIGNAL( in_DECOD_VAL                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
+	DELETE2_SIGNAL(out_DECOD_ACK                        ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1);
+	DELETE2_SIGNAL( in_DECOD_CONTEXT_ID                 ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_context_id      );
+	DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR      ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_STATE               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_state    );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_max_size_depth       );
+	DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_branch_condition);
+	DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION           ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],1                             );
+	DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC                ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
+	DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST               ,_param->_nb_decod_unit,_param->_nb_inst_decod[alloc_signal_it1],_param->_size_address         );
+      
+        DELETE1_SIGNAL( in_BRANCH_COMPLETE_VAL            ,_param->_nb_inst_branch_complete,1);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ACK            ,_param->_nb_inst_branch_complete,1);
+        DELETE1_SIGNAL( in_BRANCH_COMPLETE_CONTEXT_ID     ,_param->_nb_inst_branch_complete,_param->_size_context_id);
+        DELETE1_SIGNAL( in_BRANCH_COMPLETE_DEPTH          ,_param->_nb_inst_branch_complete,_param->_max_size_depth);
+        DELETE1_SIGNAL( in_BRANCH_COMPLETE_ADDRESS        ,_param->_nb_inst_branch_complete,_param->_size_address);
+        DELETE1_SIGNAL( in_BRANCH_COMPLETE_FLAG           ,_param->_nb_inst_branch_complete,1);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_MISS_PREDICTION,_param->_nb_inst_branch_complete,1);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_TAKE           ,_param->_nb_inst_branch_complete,1);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_SRC    ,_param->_nb_inst_branch_complete,_param->_size_address);
+        DELETE1_SIGNAL(out_BRANCH_COMPLETE_ADDRESS_DEST   ,_param->_nb_inst_branch_complete,_param->_size_address);
+
+        DELETE1_SIGNAL(out_BRANCH_EVENT_VAL            ,_param->_nb_context,1);
+        DELETE1_SIGNAL( in_BRANCH_EVENT_ACK            ,_param->_nb_context,1);
+//      DELETE1_SIGNAL(out_BRANCH_EVENT_CONTEXT_ID     ,_param->_nb_context,_param->_size_context_id);
+//      DELETE1_SIGNAL(out_BRANCH_EVENT_DEPTH          ,_param->_nb_context,_param->_max_size_depth);
+//      DELETE1_SIGNAL(out_BRANCH_EVENT_MISS_PREDICTION,_param->_nb_context,1);
+        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_SRC    ,_param->_nb_context,_param->_size_address);
+        DELETE1_SIGNAL(out_BRANCH_EVENT_ADDRESS_DEST   ,_param->_nb_context,_param->_size_address);
+
+        DELETE1_SIGNAL(out_DEPTH_NB_BRANCH    ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]+1);
+        DELETE1_SIGNAL(out_DEPTH_TAIL         ,_param->_nb_context,_param->_size_depth[alloc_signal_it1]);
       }
     // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    
 
     delete _component;
+
+    delete _component_btb;
+    delete _component_dir;
+    delete _component_ras;
+    delete _component_upt;
+    delete _component_glue;
 
     log_printf(FUNC,Prediction_unit,FUNCTION,"End");
