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 88)
+++ 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 112)
@@ -7,4 +7,5 @@
 
 #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h"
+#include "Behavioural/include/Allocation.h"
 
 namespace morpheo                    {
@@ -29,58 +30,56 @@
 	delete    in_NRESET;
 
-	delete []  in_PREDICT_VAL           ;
-	delete [] out_PREDICT_ACK           ;
-	if (_param->_have_port_context_id)
-	delete []  in_PREDICT_CONTEXT_ID    ;
-	delete []  in_PREDICT_ADDRESS       ;
-	delete [] out_PREDICT_HIT           ;
-	delete [] out_PREDICT_ADDRESS_SRC   ;
-	delete [] out_PREDICT_ADDRESS_DEST  ;
-	delete [] out_PREDICT_CONDITION     ;
-	delete [] out_PREDICT_LAST_TAKE     ;
-	delete [] out_PREDICT_IS_ACCURATE   ;
-	delete []  in_DECOD_VAL             ;
-	delete [] out_DECOD_ACK             ;
-	if (_param->_have_port_victim)
-          {
-	delete [] out_DECOD_HIT             ;
-	delete [] out_DECOD_HIT_INDEX       ;
-	delete []  in_DECOD_VICTIM          ;
-          }
-	if (_param->_have_port_context_id)
-	delete []  in_DECOD_CONTEXT_ID      ;
-	delete []  in_DECOD_ADDRESS_SRC     ;
-	delete []  in_DECOD_ADDRESS_DEST    ;
-	delete []  in_DECOD_CONDITION       ;
-	delete []  in_DECOD_LAST_TAKE       ;
-	delete []  in_DECOD_MISS_PREDICTION ;
-	delete []  in_DECOD_IS_ACCURATE     ;
-	delete []  in_UPDATE_VAL            ;
-	delete [] out_UPDATE_ACK            ;
-	if (_param->_have_port_victim)
-          {
-	delete [] out_UPDATE_HIT            ;
-	delete [] out_UPDATE_HIT_INDEX      ;
-	delete []  in_UPDATE_VICTIM         ;
-          }
-	if (_param->_have_port_context_id)
-	delete []  in_UPDATE_CONTEXT_ID     ;
-	delete []  in_UPDATE_ADDRESS_SRC    ;
-	delete []  in_UPDATE_ADDRESS_DEST   ;
-	delete []  in_UPDATE_CONDITION      ;
-	delete []  in_UPDATE_LAST_TAKE      ;
-	delete []  in_UPDATE_MISS_PREDICTION;
+        DELETE1_SIGNAL( in_PREDICT_VAL         ,_param->_nb_inst_predict,1);
+        DELETE1_SIGNAL(out_PREDICT_ACK         ,_param->_nb_inst_predict,1);
+        DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID  ,_param->_nb_inst_predict,_param->_size_context_id);
+        DELETE1_SIGNAL( in_PREDICT_ADDRESS     ,_param->_nb_inst_predict,_param->_size_instruction_address);
+        DELETE2_SIGNAL(out_PREDICT_HIT         , _param->_nb_inst_predict, _param->_associativity,1);
+        DELETE2_SIGNAL(out_PREDICT_ADDRESS_SRC , _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address);
+        DELETE2_SIGNAL(out_PREDICT_ADDRESS_DEST, _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address);
+        DELETE2_SIGNAL(out_PREDICT_CONDITION   , _param->_nb_inst_predict, _param->_associativity,_param->_size_branch_state);
+        DELETE2_SIGNAL(out_PREDICT_LAST_TAKE   , _param->_nb_inst_predict, _param->_associativity,1);
+        DELETE2_SIGNAL(out_PREDICT_IS_ACCURATE , _param->_nb_inst_predict, _param->_associativity,1);
+  
+        DELETE1_SIGNAL( in_DECOD_VAL            , _param->_nb_inst_decod,1);
+        DELETE1_SIGNAL(out_DECOD_ACK            , _param->_nb_inst_decod,1);
+        if (_param->_have_port_victim)
+  	{
+        DELETE1_SIGNAL(out_DECOD_HIT            , _param->_nb_inst_decod,1);
+        DELETE1_SIGNAL(out_DECOD_HIT_INDEX      , _param->_nb_inst_decod,_param->_size_victim);
+        DELETE1_SIGNAL( in_DECOD_VICTIM         , _param->_nb_inst_decod,_param->_size_victim);
+  	}
+        DELETE1_SIGNAL( in_DECOD_CONTEXT_ID     , _param->_nb_inst_decod,_param->_size_context_id);
+        DELETE1_SIGNAL( in_DECOD_ADDRESS_SRC    , _param->_nb_inst_decod,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_DECOD_ADDRESS_DEST   , _param->_nb_inst_decod,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_DECOD_CONDITION      , _param->_nb_inst_decod,_param->_size_branch_state);
+        DELETE1_SIGNAL( in_DECOD_LAST_TAKE      , _param->_nb_inst_decod,1);
+        DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION, _param->_nb_inst_decod,1);
+        DELETE1_SIGNAL( in_DECOD_IS_ACCURATE    , _param->_nb_inst_decod,1);
+  
+        DELETE1_SIGNAL( in_UPDATE_VAL            , _param->_nb_inst_update,1);
+        DELETE1_SIGNAL(out_UPDATE_ACK            , _param->_nb_inst_update,1);
+        if (_param->_have_port_victim)
+  	{
+        DELETE1_SIGNAL(out_UPDATE_HIT            , _param->_nb_inst_update,1);
+        DELETE1_SIGNAL(out_UPDATE_HIT_INDEX      , _param->_nb_inst_update,_param->_size_victim);
+        DELETE1_SIGNAL( in_UPDATE_VICTIM         , _param->_nb_inst_update,_param->_size_victim);
+  	}
+        DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID     , _param->_nb_inst_update,_param->_size_context_id);
+        DELETE1_SIGNAL( in_UPDATE_ADDRESS_SRC    , _param->_nb_inst_update,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_UPDATE_ADDRESS_DEST   , _param->_nb_inst_update,_param->_size_instruction_address);
+        DELETE1_SIGNAL( in_UPDATE_CONDITION      , _param->_nb_inst_update,_param->_size_branch_state);
+        DELETE1_SIGNAL( in_UPDATE_LAST_TAKE      , _param->_nb_inst_update,1);
+        DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION, _param->_nb_inst_update,1);
+  
+        DELETE2(reg_BTB                  ,_param->_size_bank,_param->_associativity);
 
-	delete [] reg_BTB;
-
-	delete [] internal_DECOD_ACK       ;
-	delete [] internal_DECOD_HIT       ;
-	delete [] internal_DECOD_NUM_BANK  ;
-	delete [] internal_DECOD_NUM_ENTRY ;
-
-	delete [] internal_UPDATE_ACK      ;
-	delete [] internal_UPDATE_HIT      ;
-	delete [] internal_UPDATE_NUM_BANK ;
-	delete [] internal_UPDATE_NUM_ENTRY;
+        DELETE1(internal_DECOD_ACK       ,_param->_nb_inst_decod );
+        DELETE1(internal_DECOD_HIT       ,_param->_nb_inst_decod );
+        DELETE1(internal_DECOD_NUM_BANK  ,_param->_nb_inst_decod );
+        DELETE1(internal_DECOD_NUM_ENTRY ,_param->_nb_inst_decod );
+        DELETE1(internal_UPDATE_ACK      ,_param->_nb_inst_update);
+        DELETE1(internal_UPDATE_HIT      ,_param->_nb_inst_update);
+        DELETE1(internal_UPDATE_NUM_BANK ,_param->_nb_inst_update);
+        DELETE1(internal_UPDATE_NUM_ENTRY,_param->_nb_inst_update);
       }
 
