[110] | 1 | /* |
---|
| 2 | * $Id: Two_Level_Branch_Predictor_deallocation.cpp 112 2009-03-18 22:36:26Z rosiere $ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Direction/Meta_Predictor/Two_Level_Branch_Predictor/include/Two_Level_Branch_Predictor.h" |
---|
| 9 | #include "Behavioural/include/Allocation.h" |
---|
| 10 | |
---|
| 11 | namespace morpheo { |
---|
| 12 | namespace behavioural { |
---|
| 13 | namespace core { |
---|
| 14 | namespace multi_front_end { |
---|
| 15 | namespace front_end { |
---|
| 16 | namespace prediction_unit { |
---|
| 17 | namespace direction { |
---|
| 18 | namespace meta_predictor { |
---|
| 19 | namespace two_level_branch_predictor { |
---|
| 20 | |
---|
| 21 | |
---|
| 22 | #undef FUNCTION |
---|
| 23 | #define FUNCTION "Two_Level_Branch_Predictor::deallocation" |
---|
| 24 | void Two_Level_Branch_Predictor::deallocation (void) |
---|
| 25 | { |
---|
| 26 | log_begin(Two_Level_Branch_Predictor,FUNCTION); |
---|
| 27 | |
---|
| 28 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 29 | { |
---|
| 30 | delete in_CLOCK ; |
---|
| 31 | delete in_NRESET; |
---|
[111] | 32 | |
---|
| 33 | DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1 ); |
---|
| 34 | DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1 ); |
---|
| 35 | DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_address); |
---|
| 36 | DELETE1_SIGNAL(out_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); |
---|
| 37 | DELETE1_SIGNAL(out_PREDICT_HISTORY ,_param->_nb_inst_predict,_param->_size_history); |
---|
| 38 | if (_param->_update_on_prediction) |
---|
| 39 | { |
---|
| 40 | DELETE1_SIGNAL( in_PREDICT_DIRECTION_VAL,_param->_nb_inst_predict,1 ); |
---|
| 41 | DELETE1_SIGNAL( in_PREDICT_DIRECTION ,_param->_nb_inst_predict,1 ); |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1 ); |
---|
| 45 | DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1 ); |
---|
| 46 | DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_address); |
---|
| 47 | DELETE1_SIGNAL( in_UPDATE_HISTORY ,_param->_nb_inst_update,_param->_size_history); |
---|
[112] | 48 | DELETE1_SIGNAL( in_UPDATE_HISTORY_VAL ,_param->_nb_inst_update,1 ); |
---|
[111] | 49 | DELETE1_SIGNAL( in_UPDATE_DIRECTION ,_param->_nb_inst_update,1 ); |
---|
| 50 | if (_param->_update_on_prediction) |
---|
| 51 | DELETE1_SIGNAL( in_UPDATE_MISS ,_param->_nb_inst_update,1 ); |
---|
| 52 | |
---|
| 53 | if (_param->_have_bht) |
---|
| 54 | DELETE1(reg_BHT ,_param->_bht_nb_shifter); |
---|
| 55 | if (_param->_have_pht) |
---|
| 56 | DELETE2(reg_PHT ,_param->_pht_nb_bank,_param->_pht_size_bank); |
---|
| 57 | |
---|
| 58 | DELETE1(internal_PREDICT_ACK ,_param->_nb_inst_predict); |
---|
| 59 | if (_param->_update_on_prediction) |
---|
| 60 | { |
---|
| 61 | if (_param->_have_bht) |
---|
| 62 | DELETE1(internal_PREDICT_BHT_NUM_REG ,_param->_nb_inst_predict); |
---|
| 63 | if (_param->_have_pht) |
---|
| 64 | { |
---|
| 65 | DELETE1(internal_PREDICT_PHT_NUM_BANK ,_param->_nb_inst_predict); |
---|
| 66 | DELETE1(internal_PREDICT_PHT_NUM_REG ,_param->_nb_inst_predict); |
---|
| 67 | } |
---|
| 68 | } |
---|
| 69 | DELETE1(internal_UPDATE_ACK ,_param->_nb_inst_update ); |
---|
[110] | 70 | } |
---|
| 71 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 72 | |
---|
| 73 | delete _component; |
---|
| 74 | |
---|
| 75 | log_end(Two_Level_Branch_Predictor,FUNCTION); |
---|
| 76 | }; |
---|
| 77 | |
---|
| 78 | }; // end namespace two_level_branch_predictor |
---|
| 79 | }; // end namespace meta_predictor |
---|
| 80 | }; // end namespace direction |
---|
| 81 | }; // end namespace prediction_unit |
---|
| 82 | }; // end namespace front_end |
---|
| 83 | }; // end namespace multi_front_end |
---|
| 84 | }; // end namespace core |
---|
| 85 | |
---|
| 86 | }; // end namespace behavioural |
---|
| 87 | }; // end namespace morpheo |
---|