- Timestamp:
- Aug 2, 2010, 8:56:05 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r139 r141 55 55 #ifdef STATISTICS 56 56 public : Stat * _stat; 57 public : counter_t ** _stat_nb_inst_insert ;//[nb_rename_unit] 58 public : counter_t ** _stat_nb_inst_retire ;//[nb_rename_unit] 59 public : counter_t * _stat_nb_inst_commit ; 57 58 public : counters_t ** _stat_nb_inst_insert ;//[nb_rename_unit] 59 public : counters_t ** _stat_nb_inst_retire ;//[nb_rename_unit] 60 public : counters_t ** _stat_nb_inst_commit ;//[nb_rename_unit] 61 60 62 public : counter_t * _stat_nb_inst_commit_conflit_access; 61 63 public : counter_t ** _stat_nb_inst_retire_ok ;//[nb_thread] -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r137 r141 48 48 } 49 49 50 _stat_nb_inst_insert = new counter_t * [_param->_nb_rename_unit];51 _stat_nb_inst_retire = new counter_t * [_param->_nb_rename_unit];52 50 _stat_nb_inst_retire_ok = new counter_t * [_param->_nb_thread]; 53 51 _stat_nb_inst_retire_ko = new counter_t * [_param->_nb_thread]; … … 55 53 _stat_nb_inst_type = new counter_t * [_param->_nb_type]; 56 54 _stat_bank_nb_inst = new counter_t * [_param->_nb_bank]; 57 58 {59 std::string sum_nb_inst_insert = "0";60 std::string sum_nb_inst_retire = "0";61 62 for (uint32_t i=0; i<_param->_nb_rename_unit; i++)63 {64 _stat_nb_inst_insert [i] = _stat->create_variable("nb_inst_insert_" +toString(i));65 _stat_nb_inst_retire [i] = _stat->create_variable("nb_inst_retire_" +toString(i));66 67 _stat->create_expr_average_by_cycle("average_use_interface_insert_"+toString(i), "nb_inst_insert_"+toString(i), "", toString(_("Average instruction by cycle on insert interface (rename_unit %d)"),i));68 _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), "nb_inst_retire_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));69 _stat->create_expr_percent ("percent_use_interface_insert_"+toString(i) , "average_use_interface_insert_"+toString(i), toString(_param->_nb_inst_insert [i]), toString(_("Percent usage of insert interface (rename_unit %d)"),i));70 _stat->create_expr_percent ("percent_use_interface_retire_"+toString(i) , "average_use_interface_retire_"+toString(i), toString(_param->_nb_inst_retire [i]), toString(_("Percent usage of retire interface (rename_unit %d)"),i));71 72 sum_nb_inst_insert = "+ nb_inst_insert_"+ toString(i) + " " +sum_nb_inst_insert;73 sum_nb_inst_retire = "+ nb_inst_retire_"+ toString(i) + " " +sum_nb_inst_retire;74 }75 76 _stat->create_expr_average_by_cycle("average_inst_insert" , sum_nb_inst_insert , "", _("Average instruction insert by cycle"));77 _stat->create_expr_average_by_cycle("average_inst_retire" , sum_nb_inst_retire , "", _("Average instruction retire by cycle"));78 }79 55 80 56 { … … 163 139 } 164 140 } 165 166 _stat_nb_inst_commit = _stat->create_variable("nb_inst_commit");167 _stat->create_expr_average_by_cycle("average_use_interface_commit","nb_inst_commit", "", _("Average instruction by cycle on commit interface"));168 _stat->create_expr_percent ("percent_use_interface_commit", "average_use_interface_commit", toString(_param->_nb_inst_commit), _("Percent usage of commit interface"));169 170 _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access");171 _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface"));172 _stat->create_expr_percent ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", "average_use_interface_commit", _("Percent access conflit on commit interface"));173 141 174 142 // bank/queue occupation … … 192 160 } 193 161 162 _stat_nb_inst_insert = new counters_t * [_param->_nb_rename_unit]; 163 _stat_nb_inst_retire = new counters_t * [_param->_nb_rename_unit]; 164 _stat_nb_inst_commit = new counters_t * [_param->_nb_rename_unit]; 165 166 std::string average_nb_inst_commit = "0"; 167 168 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 169 { 170 _stat_nb_inst_insert [i] = _stat->create_counters("nb_inst_insert_"+toString(i),_param->_nb_inst_insert[i],"", 171 _("Cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 172 _("Percent of cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 173 _("Average of instruction(s) included ")+toString(_("(rename_unit %d)."),i) 174 ); 175 176 _stat_nb_inst_retire [i] = _stat->create_counters("nb_inst_retire_"+toString(i),_param->_nb_inst_retire[i],"", 177 _("Cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 178 _("Percent of cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 179 _("Average of instruction(s) removed ")+toString(_("(rename_unit %d)."),i) 180 ); 181 182 _stat_nb_inst_commit [i] = _stat->create_counters("nb_inst_commit_"+toString(i),_param->_nb_inst_commit,"", 183 _("Cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 184 _("Percent of cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 185 _("Average of instruction(s) commited "+toString(_("(rename_unit %d)."),i)) 186 ); 187 188 average_nb_inst_commit = "+ average_nb_inst_commit_"+toString(i) + " " + average_nb_inst_commit; 189 } 190 191 _stat_nb_inst_commit_conflit_access = _stat->create_variable("nb_inst_commit_conflit_access"); 192 _stat->create_expr_average_by_cycle("average_use_interface_commit_conflit_access","nb_inst_commit_conflit_access", "", _("Average access conflit by cycle on commit interface")); 193 _stat->create_expr_percent ("percent_use_interface_commit_conflit_access","average_use_interface_commit_conflit_access", average_nb_inst_commit, _("Percent access conflit on commit interface")); 194 194 195 195 log_end(Commit_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_deallocation.cpp
r137 r141 27 27 delete _stat; 28 28 29 delete [] _stat_nb_inst_insert;30 delete [] _stat_nb_inst_retire;31 29 delete [] _stat_nb_inst_retire_ok; 32 30 delete [] _stat_nb_inst_retire_ko; … … 40 38 delete [] _stat_nb_cycle_state_wait_end ; 41 39 42 40 delete [] _stat_nb_inst_insert; 41 delete [] _stat_nb_inst_retire; 42 delete [] _stat_nb_inst_commit; 43 43 44 log_end(Commit_unit,FUNCTION); 44 45 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r139 r141 89 89 else 90 90 { 91 #ifdef STATISTICS 92 uint32_t stat_nb_inst_insert [_param->_nb_rename_unit]; 93 uint32_t stat_nb_inst_retire [_param->_nb_rename_unit]; 94 uint32_t stat_nb_inst_commit [_param->_nb_rename_unit]; 95 96 if (usage_is_set(_usage,USE_STATISTICS)) 97 for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) 98 { 99 stat_nb_inst_insert [i] = 0; 100 stat_nb_inst_retire [i] = 0; 101 stat_nb_inst_commit [i] = 0; 102 } 103 #endif 104 91 105 // Increase number idle cycle 92 106 for (uint32_t i=0; i<_param->_nb_front_end; i++) … … 354 368 #ifdef STATISTICS 355 369 if (usage_is_set(_usage,USE_STATISTICS)) 356 (*_stat_nb_inst_insert [x])++;370 stat_nb_inst_insert [x] ++; 357 371 #endif 358 372 … … 433 447 { 434 448 log_printf(TRACE,Commit_unit,FUNCTION," * COMMIT [%d]",x); 449 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank : %d",i); 450 451 // find the good entry !!! 452 entry_t * entry = internal_BANK_COMMIT_ENTRY [i][j]; 435 453 436 454 #ifdef STATISTICS 437 455 if (usage_is_set(_usage,USE_STATISTICS)) 438 (*_stat_nb_inst_commit)++;456 stat_nb_inst_commit [entry->rename_unit_id] ++; 439 457 #endif 440 441 log_printf(TRACE,Commit_unit,FUNCTION," * num_bank : %d",i);442 443 // find the good entry !!!444 entry_t * entry = internal_BANK_COMMIT_ENTRY [i][j];445 458 446 459 log_printf(TRACE,Commit_unit,FUNCTION," * ptr : %d",entry->ptr); … … 720 733 #ifdef STATISTICS 721 734 if (usage_is_set(_usage,USE_STATISTICS)) 722 (*_stat_nb_inst_retire [x])++;735 stat_nb_inst_retire [x] ++; 723 736 #endif 724 737 … … 1290 1303 } 1291 1304 } 1305 1306 for (uint32_t i=0; i<_param->_nb_rename_unit; ++i) 1307 { 1308 (*_stat_nb_inst_insert [i]) += stat_nb_inst_insert [i]; 1309 (*_stat_nb_inst_retire [i]) += stat_nb_inst_retire [i]; 1310 (*_stat_nb_inst_commit [i]) += stat_nb_inst_commit [i]; 1311 } 1292 1312 } 1293 1313 #endif
Note: See TracChangeset
for help on using the changeset viewer.