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;
