Changeset 141 for trunk/IPs/systemC/processor
- Timestamp:
- Aug 2, 2010, 8:56:05 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/include/Decod.h
r139 r141 56 56 #ifdef STATISTICS 57 57 public : Stat * _stat; 58 public : counter _t * _stat_sum_inst_decod;58 public : counters_t * _stat_nb_inst_decod; 59 59 #endif 60 60 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_statistics_allocation.cpp
r110 r141 28 28 param_statistics); 29 29 30 _stat_ sum_inst_decod = _stat->create_variable("sum_inst_decod");31 32 33 _stat->create_expr_average_by_cycle ("average_nb_inst_decod","sum_inst_decod","","Average of decod instruction by cycle");34 _stat->create_expr_percent ("percent_nb_inst_decod","average_nb_inst_decod", toString(_param->_nb_inst_decod), "Percent of decod instruction by cycle");30 _stat_nb_inst_decod = _stat->create_counters("nb_inst_decod",_param->_nb_inst_decod,"", 31 _("Cycle number with %d decoded instruction(s)."), 32 _("Percent of cycle number with %d decoded instruction(s)."), 33 _("Average of decoded instructions.") 34 ); 35 35 36 36 log_printf(FUNC,Decod,FUNCTION,"End"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod/src/Decod_transition.cpp
r139 r141 53 53 #ifdef STATISTICS 54 54 if (usage_is_set(_usage,USE_STATISTICS)) 55 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 56 if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i])) 57 (*_stat_sum_inst_decod) ++; 55 { 56 uint32_t stat_nb_inst_decod = 0; 57 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 58 if (internal_DECOD_VAL [i] and PORT_READ(in_DECOD_ACK[i])) 59 stat_nb_inst_decod ++; 60 (*_stat_nb_inst_decod) += stat_nb_inst_decod; 61 } 58 62 #endif 59 63 } -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/include/Ifetch_queue.h
r136 r141 55 55 private : counter_t * _sum_use_queue_error_wait_rsp; 56 56 57 private : counter_t * _sum_inst_enable;58 57 private : counter_t * _sum_transaction_address; 59 58 60 private : counter_t * _average_occupation_bundle; 59 private : counters_t * _stat_nb_inst_fetch; 60 61 61 #endif 62 62 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_full_assoc_transition.cpp
r136 r141 51 51 // =====[ ADDRESS ]========================================== 52 52 // ========================================================== 53 #ifdef STATISTICS 54 uint32_t stat_nb_inst_fetch=0; 55 #endif 56 53 57 if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK) 54 58 { … … 70 74 Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]); 71 75 #ifdef STATISTICS 72 if (usage_is_set(_usage,USE_STATISTICS)) 73 (*_sum_inst_enable) += enable; 76 stat_nb_inst_fetch+=enable; 74 77 #endif 75 78 _queue[reg_PTR_WRITE]->_instruction_enable [i] = enable; … … 83 86 reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue; 84 87 } 88 89 #ifdef STATISTICS 90 if (usage_is_set(_usage,USE_STATISTICS)) 91 (*_stat_nb_inst_fetch)+=stat_nb_inst_fetch; 92 #endif 93 85 94 86 95 // ========================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_function_no_assoc_transition.cpp
r136 r141 51 51 // =====[ ADDRESS ]========================================== 52 52 // ========================================================== 53 #ifdef STATISTICS 54 uint32_t stat_nb_inst_fetch=0; 55 #endif 56 53 57 if (PORT_READ(in_ADDRESS_VAL) and internal_ADDRESS_ACK) 54 58 { … … 70 74 Tcontrol_t enable = PORT_READ(in_ADDRESS_INSTRUCTION_ENABLE [i]); 71 75 #ifdef STATISTICS 72 if (usage_is_set(_usage,USE_STATISTICS)) 73 (*_sum_inst_enable) += enable; 76 stat_nb_inst_fetch += enable; 74 77 #endif 75 78 _queue[reg_PTR_WRITE]->_instruction_enable [i] = enable; … … 83 86 reg_PTR_WRITE = (reg_PTR_WRITE+1)%_param->_size_queue; 84 87 } 88 #ifdef STATISTICS 89 if (usage_is_set(_usage,USE_STATISTICS)) 90 (*_stat_nb_inst_fetch) += stat_nb_inst_fetch; 91 #endif 85 92 86 93 // ========================================================== -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Ifetch_unit/Ifetch_queue/src/Ifetch_queue_statistics_allocation.cpp
r110 r141 34 34 _sum_use_queue_have_rsp = _stat->create_variable("sum_use_queue_have_rsp"); 35 35 _sum_use_queue_error_wait_rsp = _stat->create_variable("sum_use_queue_error_wait_rsp"); 36 _sum_inst_enable = _stat->create_variable("sum_inst_enable");37 36 38 _average_occupation_bundle = _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");39 40 _stat->create_expr ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_address");41 _stat->create_expr_percent ("percent_occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_instruction),"Percent of instruction's bundle occupation.");42 37 _stat->create_expr ("sum_use_queue" ,"+ + sum_use_queue_wait_rsp sum_use_queue_have_rsp sum_use_queue_error_wait_rsp"); 43 38 _stat->create_expr_average_by_cycle("average_use_queue" ,"sum_use_queue" ,"","Average occupation of ifetch queue"); … … 48 43 49 44 _stat->create_expr_average ("average_miss_icache" ,"+ sum_use_queue_wait_rsp sum_use_queue_error_wait_rsp", "sum_transaction_address", "", "Average Miss Instruction Cache"); 45 46 _stat_nb_inst_fetch = _stat->create_counters("nb_inst_fetch",_param->_nb_instruction,"", 47 _("Number bundle with %d instruction(s)."), 48 _("Percent of bundle with %d instruction(s)."), 49 _("Average instruction in a bundle.") 50 ); 50 51 51 52 log_printf(FUNC,Ifetch_queue,FUNCTION,"End"); -
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 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp
r138 r141 23 23 if (_param->_nb_port_read>0) 24 24 _stat_port_read = _stat->create_counters("port_read",_param->_nb_port_read,"", 25 _(" Usage of read port %d."),26 _("Percent of usage read port %d."),27 _("Average of usage read port.")25 _("Cycle number cycle with %d read(s)."), 26 _("Percent of cycle number cycle with %d read(s)."), 27 _("Average of read per cycle.") 28 28 ); 29 29 30 30 if (_param->_nb_port_write>0) 31 31 _stat_port_write = _stat->create_counters("port_write",_param->_nb_port_write,"", 32 _(" Usage of write port %d."),33 _("Percent of usage write port %d."),34 _("Average of usage write port.")32 _("Cycle number cycle with %d write(s)."), 33 _("Percent of cycle number cycle with %d write(s)."), 34 _("Average of write per cycle.") 35 35 ); 36 36 if (_param->_nb_port_read_write>0) 37 37 _stat_port_read_write = _stat->create_counters("port_read_write",_param->_nb_port_read_write,"", 38 _(" Usage of read_write port."),39 _("Percent of usage read_write port %d."),40 _("Average of usage read_write port.")38 _("Cycle number cycle with %d read_write(s)."), 39 _("Percent of cycle number cycle with %d read_write(s)."), 40 _("Average of read_write per cycle.") 41 41 ); 42 42 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/include/Operation.h
r88 r141 12 12 namespace behavioural { 13 13 14 #define neg(size,data) (~(data)+1) 15 #define sign(size,data) ((data)>>(size-1)) 16 #define unsigned(size,data) (data) 17 #define signed(size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 #define ovf(size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 19 #define carry(size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 20 #define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 21 #define get_flag(data,flag) (((data)&(flag))!=0) 22 #define concatenation_bool(a,b) (((a)<<1) | (b)) 14 # define neg( size,data) (~(data)+1) 15 # define sign( size,data) ((data)>>(size-1)) 16 # define unsigned(size,data) (data) 17 # define signed( size,data) ((sign(size,data)==0)?(data):neg(size,data)) 18 //#define ovf( size,op1, op2, c_in) ((op2^(op1+op2+c_in))&~(op1^op2))>>(size-1); 19 # define ovf( size,op1, op2, res) ((sign(size,op1) == sign(size,op2))?(sign(size,op1) xor sign(size,res)):0) 20 # define carry( size,op1, op2, res) (((res)<(op1)) or ((res)<(op2))) 21 # define set_flag(data,flag,is_set) (((is_set)==1)?((data)|(flag)):((data)&~(flag))) 22 # define get_flag(data,flag) (((data)&(flag))!=0) 23 # define concatenation_bool(a,b) (((a)<<1) | (b)) 23 24 24 25 }; // end namespace behavioural
Note: See TracChangeset
for help on using the changeset viewer.