[81] | 1 | /* |
---|
| 2 | * $Id$ |
---|
| 3 | * |
---|
| 4 | * [ Description ] |
---|
| 5 | * |
---|
| 6 | */ |
---|
| 7 | |
---|
| 8 | #include "Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/include/Prediction_unit_Glue.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 prediction_unit_glue { |
---|
| 18 | |
---|
| 19 | |
---|
| 20 | #undef FUNCTION |
---|
| 21 | #define FUNCTION "Prediction_unit_Glue::deallocation" |
---|
| 22 | void Prediction_unit_Glue::deallocation (void) |
---|
| 23 | { |
---|
| 24 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"Begin"); |
---|
| 25 | |
---|
| 26 | if (usage_is_set(_usage,USE_SYSTEMC)) |
---|
| 27 | { |
---|
| 28 | delete in_CLOCK ; |
---|
| 29 | delete in_NRESET; |
---|
| 30 | |
---|
[82] | 31 | |
---|
[81] | 32 | // ~~~~~[ Interface : "predict" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 33 | DELETE1_SIGNAL( in_PREDICT_VAL ,_param->_nb_context ,1); |
---|
| 34 | DELETE1_SIGNAL(out_PREDICT_ACK ,_param->_nb_context ,1); |
---|
[88] | 35 | DELETE1_SIGNAL( in_PREDICT_PC_PREVIOUS ,_param->_nb_context ,_param->_size_instruction_address); |
---|
| 36 | DELETE1_SIGNAL( in_PREDICT_PC_CURRENT ,_param->_nb_context ,_param->_size_instruction_address); |
---|
[81] | 37 | DELETE1_SIGNAL( in_PREDICT_PC_CURRENT_IS_DS_TAKE ,_param->_nb_context ,1); |
---|
[88] | 38 | DELETE1_SIGNAL(out_PREDICT_PC_NEXT ,_param->_nb_context ,_param->_size_instruction_address); |
---|
[81] | 39 | DELETE1_SIGNAL(out_PREDICT_PC_NEXT_IS_DS_TAKE ,_param->_nb_context ,1); |
---|
[88] | 40 | DELETE1_SIGNAL(out_PREDICT_INST_IFETCH_PTR ,_param->_nb_context ,_param->_size_inst_ifetch_ptr); |
---|
[81] | 41 | DELETE1_SIGNAL(out_PREDICT_BRANCH_STATE ,_param->_nb_context ,_param->_size_branch_state); |
---|
[88] | 42 | DELETE1_SIGNAL(out_PREDICT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_context ,_param->_size_depth); |
---|
| 43 | DELETE2_SIGNAL(out_PREDICT_INSTRUCTION_ENABLE ,_param->_nb_context ,_param->_nb_instruction[it1],1); |
---|
[82] | 44 | DELETE1_SIGNAL(out_PREDICT_BTB_VAL ,_param->_nb_inst_branch_predict,1); |
---|
| 45 | DELETE1_SIGNAL( in_PREDICT_BTB_ACK ,_param->_nb_inst_branch_predict,1); |
---|
| 46 | DELETE1_SIGNAL(out_PREDICT_BTB_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
[88] | 47 | DELETE1_SIGNAL(out_PREDICT_BTB_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 48 | DELETE1_SIGNAL( in_PREDICT_BTB_HIT ,_param->_nb_inst_branch_predict,1); |
---|
[88] | 49 | DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
| 50 | DELETE1_SIGNAL( in_PREDICT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 51 | DELETE1_SIGNAL( in_PREDICT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); |
---|
| 52 | // DELETE1_SIGNAL( in_PREDICT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
| 53 | DELETE1_SIGNAL( in_PREDICT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); |
---|
| 54 | DELETE1_SIGNAL(out_PREDICT_DIR_VAL ,_param->_nb_inst_branch_predict,1); |
---|
| 55 | DELETE1_SIGNAL( in_PREDICT_DIR_ACK ,_param->_nb_inst_branch_predict,1); |
---|
[88] | 56 | DELETE1_SIGNAL(out_PREDICT_DIR_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 57 | DELETE1_SIGNAL(out_PREDICT_DIR_STATIC ,_param->_nb_inst_branch_predict,1); |
---|
| 58 | // DELETE1_SIGNAL(out_PREDICT_DIR_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
| 59 | // DELETE1_SIGNAL( in_PREDICT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); |
---|
| 60 | DELETE1_SIGNAL( in_PREDICT_DIR_DIRECTION ,_param->_nb_inst_branch_predict,1); |
---|
| 61 | DELETE1_SIGNAL(out_PREDICT_RAS_VAL ,_param->_nb_inst_branch_predict,1); |
---|
| 62 | DELETE1_SIGNAL( in_PREDICT_RAS_ACK ,_param->_nb_inst_branch_predict,1); |
---|
| 63 | DELETE1_SIGNAL(out_PREDICT_RAS_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
| 64 | DELETE1_SIGNAL( in_PREDICT_RAS_HIT ,_param->_nb_inst_branch_predict,1); |
---|
| 65 | DELETE1_SIGNAL(out_PREDICT_RAS_PUSH ,_param->_nb_inst_branch_predict,1); |
---|
[88] | 66 | DELETE1_SIGNAL(out_PREDICT_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
| 67 | DELETE1_SIGNAL( in_PREDICT_RAS_ADDRESS_POP ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 68 | // DELETE1_SIGNAL( in_PREDICT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); |
---|
| 69 | DELETE1_SIGNAL(out_PREDICT_UPT_VAL ,_param->_nb_inst_branch_predict,1); |
---|
| 70 | DELETE1_SIGNAL( in_PREDICT_UPT_ACK ,_param->_nb_inst_branch_predict,1); |
---|
| 71 | DELETE1_SIGNAL(out_PREDICT_UPT_CONTEXT_ID ,_param->_nb_inst_branch_predict,_param->_size_context_id); |
---|
[88] | 72 | DELETE1_SIGNAL( in_PREDICT_UPT_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_predict,_param->_size_depth); |
---|
| 73 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
| 74 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 75 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_CONDITION ,_param->_nb_inst_branch_predict,_param->_size_branch_condition); |
---|
| 76 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_predict,1); |
---|
| 77 | DELETE1_SIGNAL(out_PREDICT_UPT_BTB_IS_ACCURATE ,_param->_nb_inst_branch_predict,1); |
---|
| 78 | // DELETE1_SIGNAL(out_PREDICT_UPT_DIR_HISTORY ,_param->_nb_inst_branch_predict,_param->_size_history); |
---|
[88] | 79 | DELETE1_SIGNAL(out_PREDICT_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_predict,_param->_size_instruction_address); |
---|
[82] | 80 | // DELETE1_SIGNAL(out_PREDICT_UPT_RAS_INDEX ,_param->_nb_inst_branch_predict,_param->_size_ras_index); |
---|
[81] | 81 | |
---|
[82] | 82 | // ~~~~~[ Interface : "decod" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
[88] | 83 | DELETE2_SIGNAL( in_DECOD_VAL ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); |
---|
| 84 | DELETE2_SIGNAL(out_DECOD_ACK ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1); |
---|
| 85 | DELETE2_SIGNAL( in_DECOD_CONTEXT_ID ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_context_id ); |
---|
| 86 | DELETE2_SIGNAL( in_DECOD_MATCH_INST_IFETCH_PTR ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); |
---|
| 87 | DELETE2_SIGNAL( in_DECOD_BRANCH_STATE ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_state ); |
---|
| 88 | DELETE2_SIGNAL( in_DECOD_BRANCH_UPDATE_PREDICTION_ID,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_depth ); |
---|
| 89 | DELETE2_SIGNAL( in_DECOD_BRANCH_CONDITION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_branch_condition); |
---|
| 90 | DELETE2_SIGNAL( in_DECOD_BRANCH_DIRECTION ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],1 ); |
---|
| 91 | DELETE2_SIGNAL( in_DECOD_ADDRESS_SRC ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); |
---|
| 92 | DELETE2_SIGNAL( in_DECOD_ADDRESS_DEST ,_param->_nb_decod_unit,_param->_nb_inst_decod[it1],_param->_size_instruction_address ); |
---|
[82] | 93 | DELETE1_SIGNAL(out_DECOD_BTB_VAL ,_param->_nb_inst_branch_decod,1); |
---|
| 94 | DELETE1_SIGNAL( in_DECOD_BTB_ACK ,_param->_nb_inst_branch_decod,1); |
---|
| 95 | DELETE1_SIGNAL(out_DECOD_BTB_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
[88] | 96 | DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
| 97 | DELETE1_SIGNAL(out_DECOD_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
[82] | 98 | DELETE1_SIGNAL(out_DECOD_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); |
---|
| 99 | DELETE1_SIGNAL(out_DECOD_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); |
---|
| 100 | DELETE1_SIGNAL(out_DECOD_BTB_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); |
---|
| 101 | DELETE1_SIGNAL(out_DECOD_BTB_IS_ACCURATE ,_param->_nb_inst_branch_decod,1); |
---|
| 102 | |
---|
| 103 | DELETE1_SIGNAL(out_DECOD_RAS_VAL ,_param->_nb_inst_branch_decod,1); |
---|
| 104 | DELETE1_SIGNAL( in_DECOD_RAS_ACK ,_param->_nb_inst_branch_decod,1); |
---|
| 105 | DELETE1_SIGNAL(out_DECOD_RAS_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
| 106 | DELETE1_SIGNAL( in_DECOD_RAS_HIT ,_param->_nb_inst_branch_decod,1); |
---|
| 107 | DELETE1_SIGNAL(out_DECOD_RAS_PUSH ,_param->_nb_inst_branch_decod,1); |
---|
[88] | 108 | DELETE1_SIGNAL(out_DECOD_RAS_ADDRESS_PUSH ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
| 109 | DELETE1_SIGNAL( in_DECOD_RAS_ADDRESS_POP ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
[82] | 110 | // DELETE1_SIGNAL( in_DECOD_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); |
---|
| 111 | DELETE1_SIGNAL(out_DECOD_RAS_MISS_PREDICTION,_param->_nb_inst_branch_decod,1); |
---|
| 112 | |
---|
| 113 | DELETE1_SIGNAL(out_DECOD_UPT_VAL ,_param->_nb_inst_branch_decod,1); |
---|
| 114 | DELETE1_SIGNAL( in_DECOD_UPT_ACK ,_param->_nb_inst_branch_decod,1); |
---|
| 115 | DELETE1_SIGNAL(out_DECOD_UPT_CONTEXT_ID ,_param->_nb_inst_branch_decod,_param->_size_context_id); |
---|
[88] | 116 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
| 117 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
[82] | 118 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_CONDITION ,_param->_nb_inst_branch_decod,_param->_size_branch_condition); |
---|
| 119 | DELETE1_SIGNAL(out_DECOD_UPT_BTB_LAST_TAKE ,_param->_nb_inst_branch_decod,1); |
---|
[88] | 120 | DELETE1_SIGNAL(out_DECOD_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_decod,_param->_size_instruction_address); |
---|
[82] | 121 | // DELETE1_SIGNAL(out_DECOD_UPT_RAS_INDEX ,_param->_nb_inst_branch_decod,_param->_size_ras_index); |
---|
| 122 | DELETE1_SIGNAL(out_DECOD_UPT_MISS_IFETCH ,_param->_nb_inst_branch_decod,1); |
---|
| 123 | DELETE1_SIGNAL(out_DECOD_UPT_MISS_DECOD ,_param->_nb_inst_branch_decod,1); |
---|
[88] | 124 | DELETE1_SIGNAL(out_DECOD_UPT_UPDATE_PREDICTION_ID,_param->_nb_inst_branch_decod,_param->_size_depth); |
---|
| 125 | DELETE1_SIGNAL(out_DECOD_UPT_IS_ACCURATE ,_param->_nb_inst_branch_decod,1); |
---|
[82] | 126 | |
---|
| 127 | // ~~~~~[ Interface : "update" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 128 | DELETE1_SIGNAL(out_UPDATE_BTB_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 129 | DELETE1_SIGNAL( in_UPDATE_BTB_ACK ,_param->_nb_inst_branch_update,1); |
---|
| 130 | // DELETE1_SIGNAL(out_UPDATE_BTB_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
[88] | 131 | // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
| 132 | // DELETE1_SIGNAL(out_UPDATE_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
[82] | 133 | // DELETE1_SIGNAL(out_UPDATE_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); |
---|
| 134 | // DELETE1_SIGNAL(out_UPDATE_BTB_LAST_TAKE ,_param->_nb_inst_branch_update,1); |
---|
| 135 | // DELETE1_SIGNAL(out_UPDATE_BTB_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
| 136 | |
---|
| 137 | DELETE1_SIGNAL(out_UPDATE_DIR_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 138 | DELETE1_SIGNAL( in_UPDATE_DIR_ACK ,_param->_nb_inst_branch_update,1); |
---|
[88] | 139 | // DELETE1_SIGNAL(out_UPDATE_DIR_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
[82] | 140 | // DELETE1_SIGNAL(out_UPDATE_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); |
---|
| 141 | // DELETE1_SIGNAL(out_UPDATE_DIR_DIRECTION ,_param->_nb_inst_branch_update,1); |
---|
| 142 | |
---|
| 143 | DELETE1_SIGNAL(out_UPDATE_RAS_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 144 | DELETE1_SIGNAL( in_UPDATE_RAS_ACK ,_param->_nb_inst_branch_update,1); |
---|
| 145 | // DELETE1_SIGNAL(out_UPDATE_RAS_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
| 146 | // DELETE1_SIGNAL(out_UPDATE_RAS_PUSH ,_param->_nb_inst_branch_update,1); |
---|
[88] | 147 | // DELETE1_SIGNAL(out_UPDATE_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
[82] | 148 | // DELETE1_SIGNAL(out_UPDATE_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); |
---|
| 149 | // DELETE1_SIGNAL(out_UPDATE_RAS_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
| 150 | // DELETE1_SIGNAL(out_UPDATE_RAS_PREDICTION_IFETCH ,_param->_nb_inst_branch_update,1); |
---|
| 151 | |
---|
| 152 | DELETE1_SIGNAL( in_UPDATE_UPT_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 153 | DELETE1_SIGNAL(out_UPDATE_UPT_ACK ,_param->_nb_inst_branch_update,1); |
---|
| 154 | // DELETE1_SIGNAL( in_UPDATE_UPT_CONTEXT_ID ,_param->_nb_inst_branch_update,_param->_size_context_id); |
---|
| 155 | // DELETE1_SIGNAL( in_UPDATE_UPT_MISS_PREDICTION ,_param->_nb_inst_branch_update,1); |
---|
| 156 | // DELETE1_SIGNAL( in_UPDATE_UPT_DIRECTION_GOOD ,_param->_nb_inst_branch_update,1); |
---|
| 157 | DELETE1_SIGNAL( in_UPDATE_UPT_BTB_VAL ,_param->_nb_inst_branch_update,1); |
---|
[88] | 158 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_SRC ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
| 159 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_ADDRESS_DEST ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
[82] | 160 | // DELETE1_SIGNAL( in_UPDATE_UPT_BTB_CONDITION ,_param->_nb_inst_branch_update,_param->_size_branch_condition); |
---|
| 161 | DELETE1_SIGNAL( in_UPDATE_UPT_DIR_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 162 | // DELETE1_SIGNAL( in_UPDATE_UPT_DIR_HISTORY ,_param->_nb_inst_branch_update,_param->_size_history); |
---|
| 163 | DELETE1_SIGNAL( in_UPDATE_UPT_RAS_VAL ,_param->_nb_inst_branch_update,1); |
---|
| 164 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PUSH ,_param->_nb_inst_branch_update,1); |
---|
[88] | 165 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_ADDRESS ,_param->_nb_inst_branch_update,_param->_size_instruction_address); |
---|
[82] | 166 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_INDEX ,_param->_nb_inst_branch_update,_param->_size_ras_index); |
---|
| 167 | // DELETE1_SIGNAL( in_UPDATE_UPT_RAS_PREDICTION_IFETCH,_param->_nb_inst_branch_update,1); |
---|
| 168 | |
---|
[88] | 169 | // // ~~~~~[ Interface : "depth" ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 170 | // DELETE1_SIGNAL( in_DEPTH_UPT_NB_BRANCH,_param->_nb_context,_param->_size_depth+1); |
---|
| 171 | // DELETE1_SIGNAL( in_DEPTH_UPT_TAIL ,_param->_nb_context,_param->_size_depth); |
---|
| 172 | // DELETE1_SIGNAL(out_DEPTH_NB_BRANCH ,_param->_nb_context,_param->_size_depth+1); |
---|
| 173 | // DELETE1_SIGNAL(out_DEPTH_TAIL ,_param->_nb_context,_param->_size_depth); |
---|
[81] | 174 | } |
---|
| 175 | // ~~~~~[ Component ]~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
---|
| 176 | |
---|
| 177 | delete _component; |
---|
| 178 | |
---|
| 179 | log_printf(FUNC,Prediction_unit_Glue,FUNCTION,"End"); |
---|
| 180 | }; |
---|
| 181 | |
---|
| 182 | }; // end namespace prediction_unit_glue |
---|
| 183 | }; // end namespace prediction_unit |
---|
| 184 | }; // end namespace front_end |
---|
| 185 | }; // end namespace multi_front_end |
---|
| 186 | }; // end namespace core |
---|
| 187 | |
---|
| 188 | }; // end namespace behavioural |
---|
| 189 | }; // end namespace morpheo |
---|