[78] | 1 | /* |
---|
| 2 | * $Id: Branch_Target_Buffer_Register_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/Branch_Target_Buffer/Branch_Target_Buffer_Register/include/Branch_Target_Buffer_Register.h" |
---|
[112] | 9 | #include "Behavioural/include/Allocation.h" |
---|
[78] | 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 branch_target_buffer { |
---|
| 18 | namespace branch_target_buffer_register { |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | #undef FUNCTION |
---|
| 22 | #define FUNCTION "Branch_Target_Buffer_Register::deallocation" |
---|
| 23 | void Branch_Target_Buffer_Register::deallocation (void) |
---|
| 24 | { |
---|
| 25 | log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"Begin"); |
---|
| 26 | |
---|
[88] | 27 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
[78] | 28 | { |
---|
| 29 | delete in_CLOCK ; |
---|
| 30 | delete in_NRESET; |
---|
| 31 | |
---|
[112] | 32 | DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1); |
---|
| 33 | DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1); |
---|
| 34 | DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID ,_param->_nb_inst_predict,_param->_size_context_id); |
---|
| 35 | DELETE1_SIGNAL( in_PREDICT_ADDRESS ,_param->_nb_inst_predict,_param->_size_instruction_address); |
---|
| 36 | DELETE2_SIGNAL(out_PREDICT_HIT , _param->_nb_inst_predict, _param->_associativity,1); |
---|
| 37 | DELETE2_SIGNAL(out_PREDICT_ADDRESS_SRC , _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address); |
---|
| 38 | DELETE2_SIGNAL(out_PREDICT_ADDRESS_DEST, _param->_nb_inst_predict, _param->_associativity,_param->_size_instruction_address); |
---|
| 39 | DELETE2_SIGNAL(out_PREDICT_CONDITION , _param->_nb_inst_predict, _param->_associativity,_param->_size_branch_state); |
---|
| 40 | DELETE2_SIGNAL(out_PREDICT_LAST_TAKE , _param->_nb_inst_predict, _param->_associativity,1); |
---|
| 41 | DELETE2_SIGNAL(out_PREDICT_IS_ACCURATE , _param->_nb_inst_predict, _param->_associativity,1); |
---|
| 42 | |
---|
| 43 | DELETE1_SIGNAL( in_DECOD_VAL , _param->_nb_inst_decod,1); |
---|
| 44 | DELETE1_SIGNAL(out_DECOD_ACK , _param->_nb_inst_decod,1); |
---|
| 45 | if (_param->_have_port_victim) |
---|
| 46 | { |
---|
| 47 | DELETE1_SIGNAL(out_DECOD_HIT , _param->_nb_inst_decod,1); |
---|
| 48 | DELETE1_SIGNAL(out_DECOD_HIT_INDEX , _param->_nb_inst_decod,_param->_size_victim); |
---|
| 49 | DELETE1_SIGNAL( in_DECOD_VICTIM , _param->_nb_inst_decod,_param->_size_victim); |
---|
| 50 | } |
---|
| 51 | DELETE1_SIGNAL( in_DECOD_CONTEXT_ID , _param->_nb_inst_decod,_param->_size_context_id); |
---|
| 52 | DELETE1_SIGNAL( in_DECOD_ADDRESS_SRC , _param->_nb_inst_decod,_param->_size_instruction_address); |
---|
| 53 | DELETE1_SIGNAL( in_DECOD_ADDRESS_DEST , _param->_nb_inst_decod,_param->_size_instruction_address); |
---|
| 54 | DELETE1_SIGNAL( in_DECOD_CONDITION , _param->_nb_inst_decod,_param->_size_branch_state); |
---|
| 55 | DELETE1_SIGNAL( in_DECOD_LAST_TAKE , _param->_nb_inst_decod,1); |
---|
| 56 | DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION, _param->_nb_inst_decod,1); |
---|
| 57 | DELETE1_SIGNAL( in_DECOD_IS_ACCURATE , _param->_nb_inst_decod,1); |
---|
| 58 | |
---|
| 59 | DELETE1_SIGNAL( in_UPDATE_VAL , _param->_nb_inst_update,1); |
---|
| 60 | DELETE1_SIGNAL(out_UPDATE_ACK , _param->_nb_inst_update,1); |
---|
| 61 | if (_param->_have_port_victim) |
---|
| 62 | { |
---|
| 63 | DELETE1_SIGNAL(out_UPDATE_HIT , _param->_nb_inst_update,1); |
---|
| 64 | DELETE1_SIGNAL(out_UPDATE_HIT_INDEX , _param->_nb_inst_update,_param->_size_victim); |
---|
| 65 | DELETE1_SIGNAL( in_UPDATE_VICTIM , _param->_nb_inst_update,_param->_size_victim); |
---|
| 66 | } |
---|
| 67 | DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID , _param->_nb_inst_update,_param->_size_context_id); |
---|
| 68 | DELETE1_SIGNAL( in_UPDATE_ADDRESS_SRC , _param->_nb_inst_update,_param->_size_instruction_address); |
---|
| 69 | DELETE1_SIGNAL( in_UPDATE_ADDRESS_DEST , _param->_nb_inst_update,_param->_size_instruction_address); |
---|
| 70 | DELETE1_SIGNAL( in_UPDATE_CONDITION , _param->_nb_inst_update,_param->_size_branch_state); |
---|
| 71 | DELETE1_SIGNAL( in_UPDATE_LAST_TAKE , _param->_nb_inst_update,1); |
---|
| 72 | DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION, _param->_nb_inst_update,1); |
---|
| 73 | |
---|
| 74 | DELETE2(reg_BTB ,_param->_size_bank,_param->_associativity); |
---|
[78] | 75 | |
---|
[112] | 76 | DELETE1(internal_DECOD_ACK ,_param->_nb_inst_decod ); |
---|
| 77 | DELETE1(internal_DECOD_HIT ,_param->_nb_inst_decod ); |
---|
| 78 | DELETE1(internal_DECOD_NUM_BANK ,_param->_nb_inst_decod ); |
---|
| 79 | DELETE1(internal_DECOD_NUM_ENTRY ,_param->_nb_inst_decod ); |
---|
| 80 | DELETE1(internal_UPDATE_ACK ,_param->_nb_inst_update); |
---|
| 81 | DELETE1(internal_UPDATE_HIT ,_param->_nb_inst_update); |
---|
| 82 | DELETE1(internal_UPDATE_NUM_BANK ,_param->_nb_inst_update); |
---|
| 83 | DELETE1(internal_UPDATE_NUM_ENTRY,_param->_nb_inst_update); |
---|
[78] | 84 | } |
---|
| 85 | |
---|
| 86 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 87 | |
---|
| 88 | delete _component; |
---|
| 89 | |
---|
| 90 | log_printf(FUNC,Branch_Target_Buffer_Register,FUNCTION,"End"); |
---|
| 91 | }; |
---|
| 92 | |
---|
| 93 | }; // end namespace branch_target_buffer_register |
---|
| 94 | }; // end namespace branch_target_buffer |
---|
| 95 | }; // end namespace prediction_unit |
---|
| 96 | }; // end namespace front_end |
---|
| 97 | }; // end namespace multi_front_end |
---|
| 98 | }; // end namespace core |
---|
| 99 | |
---|
| 100 | }; // end namespace behavioural |
---|
| 101 | }; // end namespace morpheo |
---|