Changeset 110 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
- Timestamp:
- Feb 19, 2009, 5:31:47 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Prediction_unit/Prediction_unit_Glue/src/Prediction_unit_Glue_genMealy_decod.cpp
r107 r110 78 78 // * branch was not detected 79 79 Tcontrol_t miss_decod = (branch_state == BRANCH_STATE_NONE); 80 Tcontrol_t can_continue = false; 80 81 81 82 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * DECOD [%d][%d] : valid",decod_unit,i); … … 90 91 { 91 92 Tbranch_condition_t condition = PORT_READ(in_DECOD_BRANCH_CONDITION [decod_unit][i]); 92 Tcontrol_t direction = PORT_READ(in_DECOD_BRANCH_DIRECTION [decod_unit][i]);93 Tcontrol_t take; 93 94 Taddress_t address_src = PORT_READ(in_DECOD_ADDRESS_SRC [decod_unit][i]); 94 95 Taddress_t address_dest = PORT_READ(in_DECOD_ADDRESS_DEST [decod_unit][i]); … … 105 106 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_NONE_WITH_WRITE_STACK"); 106 107 108 take = true ; 107 109 is_accurate = true ;//PORT_READ(in_DECOD_RAS_HIT [port]); 108 110 use_ras = true ; … … 119 121 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_READ_REGISTER_WITH_WRITE_STACK"); 120 122 123 take = true ; 121 124 is_accurate = false; // address unknow : in a register 122 125 use_ras = true; … … 132 135 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_READ_STACK"); 133 136 137 take = true ; 134 138 is_accurate = PORT_READ(in_DECOD_RAS_HIT [port]); 135 139 use_ras = true; … … 146 150 147 151 // * READ_REGISTER_WITHOUT_WRITE_STACK : Take but destination is unknow - don't continue 152 take = true ; 148 153 is_accurate = false; // address unknow : in a register 149 154 … … 158 163 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_FLAG"); 159 164 165 take = PORT_READ(in_DECOD_BRANCH_DIRECTION [decod_unit][i]); 160 166 is_accurate = true; // address dest is know 161 167 … … 168 174 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * BRANCH_CONDITION_NONE_WITHOUT_WRITE_STACK"); 169 175 176 take = true; 170 177 is_accurate = true; 171 178 … … 173 180 } 174 181 } 182 183 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * take : %d",take); 175 184 176 185 if (use_btb) … … 181 190 PORT_WRITE(out_DECOD_BTB_ADDRESS_DEST [port],address_dest); 182 191 PORT_WRITE(out_DECOD_BTB_CONDITION [port],condition); 183 PORT_WRITE(out_DECOD_BTB_LAST_TAKE [port], direction);192 PORT_WRITE(out_DECOD_BTB_LAST_TAKE [port],take); 184 193 PORT_WRITE(out_DECOD_BTB_MISS_PREDICTION [port],1); 185 194 PORT_WRITE(out_DECOD_BTB_IS_ACCURATE [port],is_accurate); … … 198 207 PORT_WRITE(out_DECOD_UPT_BTB_ADDRESS_DEST[port],address_dest); 199 208 PORT_WRITE(out_DECOD_UPT_BTB_CONDITION [port],condition); 200 PORT_WRITE(out_DECOD_UPT_BTB_LAST_TAKE [port], direction);209 PORT_WRITE(out_DECOD_UPT_BTB_LAST_TAKE [port],take); 201 210 PORT_WRITE(out_DECOD_UPT_RAS_ADDRESS [port],PORT_READ(in_DECOD_RAS_ADDRESS_POP [port])); 202 211 PORT_WRITE(out_DECOD_UPT_IS_ACCURATE [port],is_accurate); 203 212 } 213 214 can_continue = false; // need update upt 204 215 } 205 // else 206 // { 207 // log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * hit"); 216 else 217 { 218 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * hit"); 219 220 if (branch_state == BRANCH_STATE_SPEC_NTAKE) 221 can_continue = PORT_READ(in_DECOD_UPT_CAN_CONTINUE [port]); 222 else 223 // BRANCH_STATE_NONE -> miss 224 // BRANCH_STATE_NSPEC_TAKE -> take 225 // BRANCH_STATE_SPEC_TAKE -> take 226 can_continue = false; 208 227 209 228 // miss_decod = false; 210 229 // // Hit speculation 211 //}230 } 212 231 213 214 232 // in all case 215 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_btb : %d",use_btb); 216 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_ras : %d",use_ras); 217 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_upt : %d",use_upt); 233 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * can_continue : %d",can_continue); 234 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_btb : %d",use_btb); 235 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_ras : %d",use_ras); 236 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * use_upt : %d",use_upt); 218 237 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * btb_ack [%d] : %d",port,PORT_READ(in_DECOD_BTB_ACK [port])); 219 238 log_printf(TRACE,Prediction_unit_Glue,FUNCTION," * ras_ack [%d] : %d",port,PORT_READ(in_DECOD_RAS_ACK [port])); … … 250 269 if (_param->_have_port_depth) 251 270 PORT_WRITE(out_DECOD_UPT_UPDATE_PREDICTION_ID [port],depth); 252 271 PORT_WRITE(out_DECOD_CAN_CONTINUE [decod_unit][i], can_continue); 272 253 273 port ++; // have find port 254 274 }
Note: See TracChangeset
for help on using the changeset viewer.