[81] | 1 | /* |
---|
[78] | 2 | * $Id: Return_Address_Stack_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/Return_Address_Stack/include/Return_Address_Stack.h" |
---|
[88] | 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 return_address_stack { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Return_Address_Stack::deallocation" |
---|
| 22 | void Return_Address_Stack::deallocation (void) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"Begin"); |
---|
| 25 | |
---|
[88] | 26 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
[78] | 27 | { |
---|
| 28 | delete in_CLOCK ; |
---|
| 29 | delete in_NRESET; |
---|
| 30 | |
---|
[88] | 31 | DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_inst_predict,1); |
---|
| 32 | DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_inst_predict,1); |
---|
| 33 | DELETE1_SIGNAL( in_PREDICT_CONTEXT_ID ,_param->_nb_inst_predict,_param->_size_context_id); |
---|
| 34 | DELETE1_SIGNAL(out_PREDICT_HIT ,_param->_nb_inst_predict,1); |
---|
| 35 | DELETE1_SIGNAL( in_PREDICT_PUSH ,_param->_nb_inst_predict,1); |
---|
| 36 | DELETE1_SIGNAL( in_PREDICT_ADDRESS_PUSH ,_param->_nb_inst_predict,_param->_size_instruction_address); |
---|
| 37 | DELETE1_SIGNAL(out_PREDICT_ADDRESS_POP ,_param->_nb_inst_predict,_param->_size_instruction_address); |
---|
| 38 | DELETE1_SIGNAL(out_PREDICT_INDEX ,_param->_nb_inst_predict,_param->_size_index); |
---|
[78] | 39 | |
---|
[88] | 40 | DELETE1_SIGNAL( in_DECOD_VAL ,_param->_nb_inst_decod,1); |
---|
| 41 | DELETE1_SIGNAL(out_DECOD_ACK ,_param->_nb_inst_decod,1); |
---|
| 42 | DELETE1_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_inst_decod,_param->_size_context_id); |
---|
| 43 | DELETE1_SIGNAL(out_DECOD_HIT ,_param->_nb_inst_decod,1); |
---|
| 44 | DELETE1_SIGNAL( in_DECOD_PUSH ,_param->_nb_inst_decod,1); |
---|
| 45 | DELETE1_SIGNAL( in_DECOD_ADDRESS_PUSH ,_param->_nb_inst_decod,_param->_size_instruction_address); |
---|
| 46 | DELETE1_SIGNAL(out_DECOD_ADDRESS_POP ,_param->_nb_inst_decod,_param->_size_instruction_address); |
---|
| 47 | DELETE1_SIGNAL(out_DECOD_INDEX ,_param->_nb_inst_decod,_param->_size_index); |
---|
| 48 | DELETE1_SIGNAL( in_DECOD_MISS_PREDICTION ,_param->_nb_inst_decod,1); |
---|
[78] | 49 | |
---|
[88] | 50 | DELETE1_SIGNAL( in_UPDATE_VAL ,_param->_nb_inst_update,1); |
---|
| 51 | DELETE1_SIGNAL(out_UPDATE_ACK ,_param->_nb_inst_update,1); |
---|
| 52 | DELETE1_SIGNAL( in_UPDATE_CONTEXT_ID ,_param->_nb_inst_update,_param->_size_context_id); |
---|
| 53 | DELETE1_SIGNAL( in_UPDATE_PUSH ,_param->_nb_inst_update,1); |
---|
[95] | 54 | DELETE1_SIGNAL( in_UPDATE_FLUSH ,_param->_nb_inst_update,1); |
---|
[88] | 55 | DELETE1_SIGNAL( in_UPDATE_ADDRESS ,_param->_nb_inst_update,_param->_size_instruction_address); |
---|
| 56 | DELETE1_SIGNAL( in_UPDATE_INDEX ,_param->_nb_inst_update,_param->_size_index); |
---|
| 57 | DELETE1_SIGNAL( in_UPDATE_MISS_PREDICTION ,_param->_nb_inst_update,1); |
---|
| 58 | DELETE1_SIGNAL( in_UPDATE_PREDICTION_IFETCH,_param->_nb_inst_update,1); |
---|
| 59 | |
---|
| 60 | // ~~~~~[ Internal ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[112] | 61 | DELETE2(reg_stack ,_param->_nb_context,_param->_size_queue [it1]); |
---|
| 62 | |
---|
| 63 | DELETE1(reg_TOP ,_param->_nb_context); |
---|
| 64 | // DELETE1(reg_BOTTOM ,_param->_nb_context); |
---|
| 65 | DELETE1(reg_NB_ELT ,_param->_nb_context); |
---|
| 66 | |
---|
| 67 | DELETE1(reg_PREDICT_TOP ,_param->_nb_context); |
---|
| 68 | // DELETE1(reg_PREDICT_BOTTOM ,_param->_nb_context); |
---|
| 69 | DELETE1(reg_PREDICT_NB_ELT ,_param->_nb_context); |
---|
| 70 | |
---|
| 71 | DELETE1(internal_PREDICT_ACK ,_param->_nb_inst_predict); |
---|
| 72 | DELETE1(internal_PREDICT_HIT ,_param->_nb_inst_predict); |
---|
| 73 | DELETE1(internal_DECOD_ACK ,_param->_nb_inst_decod ); |
---|
| 74 | DELETE1(internal_DECOD_HIT ,_param->_nb_inst_decod ); |
---|
| 75 | DELETE1(internal_UPDATE_ACK ,_param->_nb_inst_update ); |
---|
[88] | 76 | } |
---|
[78] | 77 | |
---|
| 78 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 79 | |
---|
| 80 | delete _component; |
---|
| 81 | |
---|
| 82 | log_printf(FUNC,Return_Address_Stack,FUNCTION,"End"); |
---|
| 83 | }; |
---|
| 84 | |
---|
| 85 | }; // end namespace return_address_stack |
---|
| 86 | }; // end namespace prediction_unit |
---|
| 87 | }; // end namespace front_end |
---|
| 88 | }; // end namespace multi_front_end |
---|
| 89 | }; // end namespace core |
---|
| 90 | |
---|
| 91 | }; // end namespace behavioural |
---|
| 92 | }; // end namespace morpheo |
---|