Changeset 138 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic
- Timestamp:
- May 12, 2010, 7:34:01 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/include/RegisterFile_Monolithic.h
r131 r138 50 50 public : Stat * _stat; 51 51 52 private : counter_t * _stat_nb_read; 53 private : counter_t * _stat_nb_write; 52 // private : counter_t * _stat_nb_read; 53 // private : counter_t * _stat_nb_write; 54 private : counters_t * _stat_port_read; 55 private : counters_t * _stat_port_write; 56 private : counters_t * _stat_port_read_write; 54 57 #endif 55 58 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_statistics_declaration.cpp
r84 r138 21 21 param_statistics); 22 22 23 _stat_nb_read = _stat->create_variable("nb_read" ); 24 _stat_nb_write = _stat->create_variable("nb_write"); 23 if (_param->_nb_port_read>0) 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.") 28 ); 25 29 26 _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); 27 _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); 30 if (_param->_nb_port_write>0) 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.") 35 ); 36 if (_param->_nb_port_read_write>0) 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.") 41 ); 28 42 29 _stat->create_expr_percent ("percent_use_read" , "average_read" , toString(_param->_nb_port_read +_param->_nb_port_read_write), _("Percent read by cycle" )); 30 _stat->create_expr_percent ("percent_use_write", "average_write", toString(_param->_nb_port_write+_param->_nb_port_read_write), _("Percent write by cycle")); 43 // _stat_nb_read = _stat->create_variable("nb_read" ); 44 // _stat_nb_write = _stat->create_variable("nb_write"); 45 46 // _stat->create_expr_average_by_cycle("average_read" , "nb_read" , "", _("Average read by cycle" )); 47 // _stat->create_expr_average_by_cycle("average_write", "nb_write", "", _("Average write by cycle")); 48 49 // _stat->create_expr_percent ("percent_use_read" , "average_read" , toString(_param->_nb_port_read +_param->_nb_port_read_write), _("Percent read by cycle" )); 50 // _stat->create_expr_percent ("percent_use_write", "average_write", toString(_param->_nb_port_write+_param->_nb_port_read_write), _("Percent write by cycle")); 31 51 32 52 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Generic/RegisterFile/RegisterFile_Monolithic/src/RegisterFile_Monolithic_transition.cpp
r131 r138 37 37 else 38 38 { 39 #ifdef STATISTICS 40 uint32_t stat_nb_read =0; 41 uint32_t stat_nb_write =0; 42 uint32_t stat_nb_read_write=0; 43 #endif 39 44 for (uint32_t i=0; i<_param->_nb_port_write; i++) 40 45 { … … 45 50 { 46 51 #ifdef STATISTICS 47 if (usage_is_set(_usage,USE_STATISTICS)) 48 (*_stat_nb_write) ++; 49 #endif 52 stat_nb_write++; 53 #endif 54 55 // #ifdef STATISTICS 56 // if (usage_is_set(_usage,USE_STATISTICS)) 57 // (*_stat_nb_write) ++; 58 // #endif 50 59 51 60 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_WRITE_ADDRESS[i]):0; … … 74 83 if (PORT_READ(in_READ_WRITE_VAL[i]) == true) 75 84 { 85 #ifdef STATISTICS 86 stat_nb_read_write++; 87 #endif 88 76 89 if (PORT_READ(in_READ_WRITE_RW [i]) == RW_WRITE) 77 90 { 78 #ifdef STATISTICS79 if (usage_is_set(_usage,USE_STATISTICS))80 (*_stat_nb_write) ++;81 #endif91 // #ifdef STATISTICS 92 // if (usage_is_set(_usage,USE_STATISTICS)) 93 // (*_stat_nb_write) ++; 94 // #endif 82 95 83 96 Taddress_t address = (_param->_have_port_address)?PORT_READ(in_READ_WRITE_ADDRESS[i]):0; … … 95 108 reg_DATA[address] = data; 96 109 } 97 #ifdef STATISTICS98 else99 {100 if (usage_is_set(_usage,USE_STATISTICS))101 (*_stat_nb_read) ++;102 }103 #endif110 // #ifdef STATISTICS 111 // else 112 // { 113 // if (usage_is_set(_usage,USE_STATISTICS)) 114 // (*_stat_nb_read) ++; 115 // } 116 // #endif 104 117 } 105 118 } 119 120 121 #ifdef STATISTICS 122 if (usage_is_set(_usage,USE_STATISTICS)) 123 { 124 for (uint32_t i=0; i<_param->_nb_port_read; i++) 125 if ( PORT_READ(in_READ_VAL [i]) == 1) 126 { 127 stat_nb_read ++; 128 // (*_stat_nb_read) ++; 129 } 130 131 if (_param->_nb_port_read>0) 132 (*_stat_port_read ) += stat_nb_read; 133 if (_param->_nb_port_write>0) 134 (*_stat_port_write ) += stat_nb_write; 135 if (_param->_nb_port_read_write>0) 136 (*_stat_port_read_write) += stat_nb_read_write; 137 } 138 #endif 106 139 } 107 108 #ifdef STATISTICS109 if (usage_is_set(_usage,USE_STATISTICS))110 for (uint32_t i=0; i<_param->_nb_port_read; i++)111 if ( PORT_READ(in_READ_VAL [i]) == 1)112 (*_stat_nb_read) ++;113 #endif114 140 115 141 #if defined(DEBUG_RegisterFile_Monolithic) and DEBUG_RegisterFile_Monolithic and (DEBUG >= DEBUG_TRACE)
Note: See TracChangeset
for help on using the changeset viewer.