Changeset 139 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
- Timestamp:
- Jul 30, 2010, 4:47:27 PM (14 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_transition.cpp
r137 r139 54 54 // reg_EVENT_FLUSH [i][j] = false; 55 55 // reg_EVENT_STOP [i][j] = false; 56 57 58 //reg_EVENT_CAN_RESTART [i][j] = 0; // not necessary56 // reg_EVENT_NUM_BANK [i][j] = 0; // not necessary 57 // reg_EVENT_NUM_PTR [i][j] = 0; // not necessary 58 // reg_EVENT_CAN_RESTART [i][j] = 0; // not necessary 59 59 reg_EVENT_PACKET [i][j] = 0; // not necessary 60 reg_EVENT_DEPTH [i][j] = 0; // not necessary 60 61 reg_EVENT_NB_INST [i][j] = 0; 61 62 reg_EVENT_LAST [i][j] = false; … … 72 73 reg_PC_NEXT [i][j] = (0x100+4)>>2; 73 74 } 75 76 // Resert RAT_UPDATE_TABLE 77 for (uint32_t i=0; i<_param->_nb_front_end; i++) 78 for (uint32_t j=0; j<_param->_nb_context[i]; j++) 79 { 80 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 81 rat_gpr_update_table [i][j][k] = false; // not necessary 82 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 83 rat_spr_update_table [i][j][k] = false; // not necessary 84 } 74 85 75 86 // Reset priority algorithm … … 114 125 // else 115 126 reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_WAIT_END; 127 128 // Reset update_table 129 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 130 rat_gpr_update_table [i][j][k] = false; 131 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 132 rat_spr_update_table [i][j][k] = false; 116 133 } 117 134 … … 180 197 else 181 198 { 199 uint32_t next_packet = reg_EVENT_NEXT_PACKET [i][j]; 200 182 201 reg_EVENT_STATE [i][j] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 183 202 184 203 reg_EVENT_NEXT_STOP [i][j] = false; 185 reg_EVENT_PACKET [i][j] = reg_EVENT_NEXT_PACKET [i][j]; 204 reg_EVENT_PACKET [i][j] = next_packet; 205 // reg_EVENT_DEPTH [i][j] = _rob[next_packet].depth; 186 206 reg_EVENT_NB_INST [i][j] = reg_NB_INST_COMMIT_ALL [i][j]; 187 207 //reg_EVENT_STOP [i][j] = true; … … 596 616 reg_EVENT_STATE [front_end_id][context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 597 617 618 // reg_EVENT_DEPTH [front_end_id][context_id] = _rob[packet].depth; 598 619 reg_EVENT_NB_INST [front_end_id][context_id] = reg_NB_INST_COMMIT_ALL [front_end_id][context_id]; 599 620 … … 697 718 #endif 698 719 699 700 720 #ifdef STATISTICS 701 if (usage_is_set(_usage,USE_STATISTICS)) 702 (*_stat_nb_inst_retire [x]) ++; 703 721 if (usage_is_set(_usage,USE_STATISTICS)) 722 (*_stat_nb_inst_retire [x]) ++; 704 723 #endif 705 724 … … 709 728 entry->state_old = entry->state; 710 729 entry->state = ROB_END; 730 731 732 // Update RAT_UPDATE_TABLE 733 Tcontext_t front_end_id = entry->front_end_id; 734 Tcontext_t context_id = entry->context_id ; 735 736 if (entry->write_rd and internal_BANK_RETIRE_RESTORE_RD_PHY_OLD [num_bank]) 737 rat_gpr_update_table [front_end_id][context_id][entry->num_reg_rd_log] = true; 738 if (entry->write_re and internal_BANK_RETIRE_RESTORE_RE_PHY_OLD [num_bank]) 739 rat_spr_update_table [front_end_id][context_id][entry->num_reg_re_log] = true; 711 740 } 712 741 } … … 771 800 { 772 801 reg_EVENT_STATE [front_end_id][context_id] = COMMIT_EVENT_STATE_EVENT; 802 reg_EVENT_TYPE [front_end_id][context_id] = rob_state_to_event_type(state); 773 803 // reg_EVENT_STOP [front_end_id][context_id] = false; // instruction flow can continue 774 804 reg_EVENT_LAST [front_end_id][context_id] = false; 775 805 // it the head ! 776 806 reg_EVENT_PACKET [front_end_id][context_id] = packet_id; 777 807 reg_EVENT_DEPTH [front_end_id][context_id] = entry->depth; 808 778 809 // // If event is an load_miss, many instruction can be inserted. 779 810 // // -> new last instruction … … 947 978 // In all case, stop instruction flow 948 979 reg_EVENT_STATE [entry->front_end_id][entry->context_id] = COMMIT_EVENT_STATE_NOT_YET_EVENT; 980 // reg_EVENT_DEPTH [entry->front_end_id][entry->context_id] = _rob[packet]._depth; 949 981 reg_EVENT_NB_INST [entry->front_end_id][entry->context_id] = reg_NB_INST_COMMIT_ALL [entry->front_end_id][entry->context_id]; 950 951 982 // reg_EVENT_STOP [entry->front_end_id][entry->context_id] = true; 952 983 … … 1283 1314 // log_printf(TRACE,Commit_unit,FUNCTION," * EVENT : %d (bank %d, ptr %d)",((reg_EVENT_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_NUM_BANK [i][j]), reg_EVENT_NUM_BANK [i][j],reg_EVENT_NUM_PTR [i][j]); 1284 1315 // log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_CAN_RESTART : %d",reg_EVENT_CAN_RESTART [i][j]); 1316 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_DEPTH : %d - type %s",reg_EVENT_DEPTH [i][j],toString(reg_EVENT_TYPE [i][j]).c_str()); 1285 1317 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_LAST : %d - packet %d - ptr %d (bank %d, ptr %d)",reg_EVENT_LAST [i][j],reg_EVENT_PACKET[i][j],((reg_EVENT_LAST_NUM_PTR [i][j] << _param->_shift_num_slot) | reg_EVENT_LAST_NUM_BANK [i][j]), reg_EVENT_LAST_NUM_BANK [i][j],reg_EVENT_LAST_NUM_PTR [i][j]); 1286 1318 log_printf(TRACE,Commit_unit,FUNCTION," * EVENT_NEXT : stop : %d - packet : %d",reg_EVENT_NEXT_STOP [i][j],reg_EVENT_NEXT_PACKET[i][j]); … … 1370 1402 } 1371 1403 1404 log_printf(TRACE,Commit_unit,FUNCTION," * Dump RAT Update Table"); 1405 for (uint32_t i=0; i<_param->_nb_front_end; ++i) 1406 for (uint32_t j=0; j<_param->_nb_context[i]; ++j) 1407 { 1408 { 1409 std::string str = ""; 1410 for (uint32_t k=0; k<_param->_nb_general_register_logic; k++) 1411 str+=toString("%.1d ",rat_gpr_update_table[i][j][k]); 1412 1413 log_printf(TRACE,Commit_unit,FUNCTION," * GPR [%d][%d] %s",i,j,str.c_str()); 1414 } 1415 1416 { 1417 std::string str = ""; 1418 for (uint32_t k=0; k<_param->_nb_special_register_logic; k++) 1419 str+=toString("%.1d ",rat_spr_update_table[i][j][k]); 1420 1421 log_printf(TRACE,Commit_unit,FUNCTION," * GPR [%d][%d] %s",i,j,str.c_str()); 1422 } 1423 } 1424 1372 1425 log_printf(TRACE,Commit_unit,FUNCTION," * nb_write_rd : %d",nb_write_rd); 1373 1426 log_printf(TRACE,Commit_unit,FUNCTION," * nb_write_re : %d",nb_write_re);
Note: See TracChangeset
for help on using the changeset viewer.