Changeset 110 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.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_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r109 r110 28 28 29 29 _stat_nb_inst_insert = new counter_t * [_param->_nb_rename_unit]; 30 _stat_nb_inst_retire_ok = new counter_t * [_param->_nb_rename_unit]; 31 _stat_nb_inst_retire_ko = new counter_t * [_param->_nb_rename_unit]; 30 _stat_nb_inst_retire = new counter_t * [_param->_nb_rename_unit]; 31 _stat_nb_inst_retire_ok = new counter_t * [_param->_nb_thread]; 32 _stat_nb_inst_retire_ko = new counter_t * [_param->_nb_thread]; 33 _stat_nb_inst_type = new counter_t * [_param->_nb_type]; 32 34 _stat_bank_nb_inst = new counter_t * [_param->_nb_bank]; 33 35 34 36 { 35 37 std::string sum_nb_inst_insert = "0"; 36 std::string sum_nb_inst_retire_ok = "0"; 37 std::string sum_nb_inst_retire_ko = "0"; 38 std::string sum_nb_inst_retire = "0"; 38 39 39 40 for (uint32_t i=0; i<_param->_nb_rename_unit; i++) 40 41 { 41 42 _stat_nb_inst_insert [i] = _stat->create_variable("nb_inst_insert_" +toString(i)); 42 _stat_nb_inst_retire_ok [i] = _stat->create_variable("nb_inst_retire_ok_"+toString(i)); 43 _stat_nb_inst_retire_ko [i] = _stat->create_variable("nb_inst_retire_ko_"+toString(i)); 43 _stat_nb_inst_retire [i] = _stat->create_variable("nb_inst_retire_" +toString(i)); 44 44 45 45 _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)); 46 _stat->create_expr_average_by_cycle("average_use_interface_retire_"+toString(i), " + nb_inst_retire_ok_"+toString(i)+" nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction by cycle on retire interface (rename_unit %d)"),i));46 _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)); 47 47 _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)); 48 48 _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)); 49 49 50 50 sum_nb_inst_insert = "+ nb_inst_insert_"+ toString(i) + " " +sum_nb_inst_insert; 51 sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok; 52 sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko; 53 } 51 sum_nb_inst_retire = "+ nb_inst_retire_"+ toString(i) + " " +sum_nb_inst_retire; 52 } 54 53 55 54 _stat->create_expr_average_by_cycle("average_inst_insert" , sum_nb_inst_insert , "", _("Average instruction insert by cycle")); 56 _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (IPC)")); 57 _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle")); 58 _stat->create_expr_average_by_cycle("average_inst_retire" , "+ "+sum_nb_inst_retire_ok+" "+sum_nb_inst_retire_ko, "", _("Average instruction retire by cycle")); 55 _stat->create_expr_average_by_cycle("average_inst_retire" , sum_nb_inst_retire , "", _("Average instruction retire by cycle")); 56 } 59 57 60 _stat->create_expr ("IPC_ok" , "average_inst_retire_ok", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)"); 58 { 59 std::string sum_nb_inst_retire_ok = "0"; 60 std::string sum_nb_inst_retire_ko = "0"; 61 62 for (uint32_t i=0; i<_param->_nb_thread; i++) 63 if (_param->_have_thread [i]) 64 { 65 _stat_nb_inst_retire_ok [i] = _stat->create_variable("nb_inst_retire_ok_"+toString(i)); 66 _stat_nb_inst_retire_ko [i] = _stat->create_variable("nb_inst_retire_ko_"+toString(i)); 67 68 sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok; 69 sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko; 70 71 _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i), sum_nb_inst_retire_ok, "", toString(_("Average instruction retire ok by cycle (IPC) (thread %d)"),i)); 72 _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i), sum_nb_inst_retire_ko, "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i)); 73 74 _stat->create_expr ("IPC_ok_"+toString(i) , "average_inst_retire_ok_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok) (thread %d)",i)); 75 _stat->create_expr ("CPI_ok_"+toString(i) , "/ 1 IPC_ok_"+toString(i) , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok) (thread %d)",i)); 76 77 _stat->create_expr ("IPC_ko_"+toString(i) , "average_inst_retire_ko_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ko) (thread %d)",i)); 78 _stat->create_expr ("CPI_ko_"+toString(i) , "/ 1 IPC_ko_"+toString(i) , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ko) (thread %d)",i)); 79 80 _stat->create_expr ("IPC_all_"+toString(i), "+ IPC_ok_"+toString(i)+" IPC_ko_"+toString(i), TYPE_COUNTER, "inst/cycle", toString("Instruction Per Cycle (Instruction Ok and Ko) (thread %d)",i)); 81 _stat->create_expr ("CPI_all_"+toString(i), "/ 1 IPC_all_"+toString(i) , TYPE_COUNTER, "cycle/inst", toString("Cycle Per Instruction (Instruction Ok and Ko) (thread %d)",i)); 82 } 83 84 _stat->create_expr ("IPC_ok" , "/ "+sum_nb_inst_retire_ok+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)"); 61 85 _stat->create_expr ("CPI_ok" , "/ 1 IPC_ok" , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)"); 62 86 63 _stat->create_expr ("IPC_ko" , " average_inst_retire_ko", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ko)");87 _stat->create_expr ("IPC_ko" , "/ "+sum_nb_inst_retire_ko+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ko)"); 64 88 _stat->create_expr ("CPI_ko" , "/ 1 IPC_ko" , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ko)"); 65 89 66 _stat->create_expr ("IPC_all", " average_inst_retire", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok and Ko)");90 _stat->create_expr ("IPC_all", "+ IPC_ok IPC_ko" , TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok and Ko)"); 67 91 _stat->create_expr ("CPI_all", "/ 1 IPC_all" , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok and Ko)"); 68 92 } 93 94 { 95 std::string sum_nb_inst_type = "0"; 96 97 for (uint32_t i=0; i<_param->_nb_type; i++) 98 if (is_type_valid(i)) 99 { 100 _stat_nb_inst_type [i] = _stat->create_variable("nb_inst_type_"+toString(i)); 101 102 sum_nb_inst_type = "+ nb_inst_type_"+toString(i) + " " +sum_nb_inst_type; 103 } 104 105 for (uint32_t i=0; i<_param->_nb_type; i++) 106 if (is_type_valid(i)) 107 { 108 std::string name = toString(static_cast<type_t>(i)).c_str(); 109 // _stat->create_expr_average_by_cycle("average_inst_type_"+toString(name), "nb_inst_type_"+toString(i), "", toString(_("Average instruction retire ok by cycle (type %s)"),name.c_str())); 110 _stat->create_expr_percent ("percent_inst_type_"+toString(name), "nb_inst_type_"+toString(i), sum_nb_inst_type, toString(_("Percent instruction retire ok by cycle (type %s)"),name.c_str())); 111 } 112 } 113 69 114 70 115 _stat_nb_inst_commit = _stat->create_variable("nb_inst_commit");
Note: See TracChangeset
for help on using the changeset viewer.