Changeset 136 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Timestamp:
- Oct 20, 2009, 8:52:15 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_multi_fifo_transition.cpp
r124 r136 51 51 { 52 52 #ifdef STATISTICS 53 bool find = false; 54 #endif 53 uint32_t nb_decod_in = 0; 54 #endif 55 55 56 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 56 57 if (PORT_READ(in_DECOD_IN_VAL [i]) and internal_DECOD_IN_ACK[i]) 57 58 { 58 59 log_printf(TRACE,Decod_queue,FUNCTION,_(" * DECOD_IN [%d]"),i); 59 60 61 #ifdef STATISTICS 62 nb_decod_in ++; 63 #endif 64 60 65 // Create entry 61 66 decod_queue_entry_t * entry = new decod_queue_entry_t (1); 62 67 reg_QUEUE[reg_NUM_BANK_TAIL].push_back(entry); 63 68 64 #ifdef STATISTICS65 find = true;66 if (usage_is_set(_usage,USE_STATISTICS))67 (*_stat_sum_inst_enable) ++;68 #endif69 70 69 Tcontext_t context = (_param->_have_port_context_id)?PORT_READ(in_DECOD_IN_CONTEXT_ID [i]):0; 71 70 … … 107 106 108 107 #ifdef STATISTICS 109 if (usage_is_set(_usage,USE_STATISTICS)) 110 if (find) 111 (*_stat_sum_transaction_decod_in) ++; 108 if (usage_is_set(_usage,USE_STATISTICS)) 109 { 110 if (nb_decod_in > 0) 111 { 112 if (nb_decod_in == _param->_nb_inst_decod) 113 (*_stat_decode_in_full) ++; 114 else 115 (*_stat_decode_in_average) += nb_decod_in; 116 } 117 else 118 { 119 (*_stat_decode_in_empty) ++; 120 } 121 } 112 122 #endif 113 123 } … … 208 218 { 209 219 for (uint32_t i=0; i<_param->_nb_bank; ++i) 210 *(_stat_use_queue) += reg_QUEUE[i].size();220 (*_stat_use_queue) += reg_QUEUE[i].size(); 211 221 for (uint32_t i=0; i<_param->_nb_context; i++) 212 *(_stat_nb_inst [i]) += reg_NB_INST [i];222 (*_stat_nb_inst [i]) += reg_NB_INST [i]; 213 223 } 214 224 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_function_one_fifo_transition.cpp
r123 r136 46 46 //-----[ DECOD_IN ]--------------------------------------------------- 47 47 //-------------------------------------------------------------------- 48 { 48 49 decod_queue_entry_t * entry = NULL; 50 51 #ifdef STATISTICS 52 uint32_t nb_decod_in = 0; 53 #endif 54 49 55 for (uint32_t i=0; i<_param->_nb_inst_decod; i++) 50 56 { … … 58 64 entry = new decod_queue_entry_t (_param->_nb_inst_decod); 59 65 reg_QUEUE->push_back(entry); 60 61 #ifdef STATISTICS62 if (usage_is_set(_usage,USE_STATISTICS))63 (*_stat_sum_transaction_decod_in) ++;64 #endif65 66 } 66 67 67 68 #ifdef STATISTICS 68 if (usage_is_set(_usage,USE_STATISTICS)) 69 (*_stat_sum_inst_enable) ++; 69 nb_decod_in ++; 70 70 #endif 71 71 … … 106 106 } 107 107 } 108 109 #ifdef STATISTICS 110 if (usage_is_set(_usage,USE_STATISTICS)) 111 { 112 if (nb_decod_in > 0) 113 { 114 if (nb_decod_in == _param->_nb_inst_decod) 115 (*_stat_decode_in_full) ++; 116 else 117 (*_stat_decode_in_average) += nb_decod_in; 118 } 119 else 120 { 121 (*_stat_decode_in_empty) ++; 122 } 123 } 124 #endif 125 } 108 126 109 127 //-------------------------------------------------------------------- … … 217 235 if (usage_is_set(_usage,USE_STATISTICS)) 218 236 { 219 *(_stat_use_queue) += reg_QUEUE->size();237 (*_stat_use_queue) += reg_QUEUE->size(); 220 238 for (uint32_t i=0; i<_param->_nb_context; i++) 221 *(_stat_nb_inst [i]) += reg_NB_INST [i];239 (*_stat_nb_inst [i]) += reg_NB_INST [i]; 222 240 } 223 241 #endif -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_Front_end/Front_end/Decod_unit/Decod_queue/src/Decod_queue_statistics_allocation.cpp
r110 r136 17 17 namespace decod_queue { 18 18 19 20 19 #undef FUNCTION 21 20 #define FUNCTION "Decod_queue::statistics_allocation" … … 29 28 param_statistics); 30 29 31 _stat_ sum_transaction_decod_in = _stat->create_variable("sum_transaction_decod_in");32 _stat_ sum_inst_enable = _stat->create_variable("sum_inst_enable");33 _stat_ average_occupation_bundle= _stat->create_counter ("average_occupation_bundle", "", "Occupation average of instruction's bundle.");30 _stat_decode_in_empty = _stat->create_counter ("decode_in_empty" , "", "Number cycle with no input instruction."); 31 _stat_decode_in_full = _stat->create_counter ("decode_in_full" , "", toString("Number cycle with full input instruction (%d).",_param->_nb_inst_decod)); 32 _stat_decode_in_average = _stat->create_counter ("decode_in_average", "", "Average decod instruction."); 34 33 35 _stat->create_expr ("average_occupation_bundle" ,"/ sum_inst_enable sum_transaction_decod_in");36 _stat->create_expr_percent ("percent_ occupation_bundle" ,"average_occupation_bundle", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation.");34 _stat->create_expr_average_by_cycle("average_decod_in", toString("+ * decode_in_full %d decode_in_average",_param->_nb_inst_decod), "", "Average instruction from decode unit"); 35 _stat->create_expr_percent ("percent_decod_in" ,"average_decod_in", toString(_param->_nb_inst_decod),"Percent of instruction's bundle occupation."); 37 36 38 37 _stat_use_queue = _stat->create_variable ("use_queue");
Note: See TracChangeset
for help on using the changeset viewer.