Changeset 123 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
- Timestamp:
- Jun 8, 2009, 10:43:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_genMoore.cpp
r122 r123 24 24 log_function(Commit_unit,FUNCTION,_name.c_str()); 25 25 26 if (PORT_READ(in_NRESET)) 27 { 26 28 // =================================================================== 27 29 // =====[ REEXECUTE ]================================================= … … 105 107 106 108 internal_REEXECUTE_VAL [i] = val; 107 PORT_WRITE(out_REEXECUTE_VAL[i], internal_REEXECUTE_VAL [i]);108 109 } 109 110 } … … 148 149 149 150 // don't complete a branch when rob manage an present event 150 if ((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NO_EVENT) and 151 if (((reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NO_EVENT) or 152 (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT)) and 151 153 (state == ROB_BRANCH_COMPLETE)) 152 154 { … … 154 156 155 157 // test if have a future event (stop is set) 156 log_printf(TRACE,Commit_unit,FUNCTION," * reg_EVENT_STOP : %d",reg_EVENT_STOP [front_end_id][context_id]);157 158 if (reg_EVENT_ST OP [front_end_id][context_id])158 // log_printf(TRACE,Commit_unit,FUNCTION," * reg_EVENT_STOP : %d",reg_EVENT_STOP [front_end_id][context_id]); 159 160 if (reg_EVENT_STATE [front_end_id][context_id] == COMMIT_EVENT_STATE_NOT_YET_EVENT) 159 161 { 160 162 // Have future event, can complete the branch if the event is most speculative than this branchement … … 204 206 205 207 internal_BRANCH_COMPLETE_VAL [i] = val; 206 PORT_WRITE(out_BRANCH_COMPLETE_VAL [i], internal_BRANCH_COMPLETE_VAL [i]);207 208 } 208 209 } … … 275 276 } 276 277 277 PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL);278 279 278 log_printf(TRACE,Commit_unit,FUNCTION," * UPDATE (end)"); 280 279 } … … 283 282 // =====[ NB_INST ]=================================================== 284 283 // =================================================================== 285 for (uint32_t i=0; i<_param->_nb_front_end; i++) 286 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 287 { 288 PORT_WRITE(out_NB_INST_COMMIT_ALL [i][j], reg_NB_INST_COMMIT_ALL [i][j]); 289 PORT_WRITE(out_NB_INST_COMMIT_MEM [i][j], reg_NB_INST_COMMIT_MEM [i][j]); 290 } 284 { 285 #ifdef DEBUG_TEST 286 bool empty = true; 287 #endif 288 for (uint32_t i=0; i<_param->_nb_front_end; i++) 289 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 290 { 291 #ifdef DEBUG_TEST 292 empty &= (reg_NB_INST_COMMIT_ALL [i][j] == 0); 293 #endif 294 PORT_WRITE(out_NB_INST_COMMIT_ALL [i][j], reg_NB_INST_COMMIT_ALL [i][j]); 295 PORT_WRITE(out_NB_INST_COMMIT_MEM [i][j], reg_NB_INST_COMMIT_MEM [i][j]); 296 } 297 #ifdef DEBUG_TEST 298 PORT_WRITE(out_INFO_ROB_EMPTY,empty); 299 #endif 300 } 301 291 302 292 303 // =================================================================== … … 296 307 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 297 308 { 298 // bool flush = reg_EVENT_FLUSH [i][j]; 299 bool flush = (((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_EVENT) or 300 (reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_WAIT_DECOD)) and 301 not reg_EVENT_CAN_RESTART[i][j]); 309 // bool flush = (((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_EVENT) or 310 // (reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_WAIT_DECOD)) and 311 // not reg_EVENT_CAN_RESTART[i][j]); 302 312 303 313 PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], commit_event_state_to_event_state(reg_EVENT_STATE[i][j])); 304 PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush); 305 PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], reg_EVENT_STOP [i][j]); 314 // PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush); 315 // PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], reg_EVENT_STOP [i][j]); 316 PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], ((reg_EVENT_STATE [i][j] == COMMIT_EVENT_STATE_NOT_YET_EVENT) or 317 reg_EVENT_NEXT_STOP [i][j])); 306 318 } 307 319 } 320 else 321 { 322 for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i) 323 { 324 internal_REEXECUTE_VAL [i] = 0; 325 // internal_REEXECUTE_NUM_BANK [i] = num_bank; 326 } 327 328 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 329 { 330 internal_BRANCH_COMPLETE_VAL [i] = 0; 331 // internal_BRANCH_COMPLETE_NUM_BANK [i] = num_bank; 332 } 333 334 internal_UPDATE_VAL = 0; 335 // internal_UPDATE_NUM_BANK = reg_NUM_BANK_HEAD; 336 337 338 for (uint32_t i=0; i<_param->_nb_front_end; i++) 339 for (uint32_t j=0; j<_param->_nb_context [i]; j++) 340 { 341 PORT_WRITE(out_RETIRE_EVENT_STATE [i][j], commit_event_state_to_event_state(COMMIT_EVENT_STATE_NO_EVENT)); 342 // PORT_WRITE(out_RETIRE_EVENT_FLUSH [i][j], flush); 343 // PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], reg_EVENT_STOP [i][j]); 344 PORT_WRITE(out_RETIRE_EVENT_STOP [i][j], true); 345 } 346 } 347 348 for (uint32_t i=0; i<_param->_nb_inst_reexecute; ++i) 349 PORT_WRITE(out_REEXECUTE_VAL[i], internal_REEXECUTE_VAL [i]); 350 for (uint32_t i=0; i<_param->_nb_inst_branch_complete; i++) 351 PORT_WRITE(out_BRANCH_COMPLETE_VAL [i], internal_BRANCH_COMPLETE_VAL [i]); 352 PORT_WRITE(out_UPDATE_VAL, internal_UPDATE_VAL); 353 308 354 log_end(Commit_unit,FUNCTION); 309 355 };
Note: See TracChangeset
for help on using the changeset viewer.