Changeset 142 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Timestamp:
- Aug 4, 2010, 10:09:03 PM (14 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/Makefile.deps
r88 r142 27 27 $(Behavioural_LIBRARY) 28 28 29 Commit_unit_DIR_LIBRARY = -L$(Commit_unit_DIR)/lib \30 $(Priority_DIR_LIBRARY) \31 $(Behavioural_DIR_LIBRARY)32 33 29 #-----[ Rules ]-------------------------------------------- 34 30 35 Commit_unit_library : 31 Commit_unit_library_only : 32 @\ 33 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile; 34 35 Commit_unit_library_clean_only : 36 @\ 37 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile clean; 38 39 Commit_unit_library : Commit_unit_library_only 36 40 @\ 37 41 $(MAKE) Behavioural_library; \ 38 $(MAKE) Priority_library; \ 39 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile; 42 $(MAKE) Priority_library; 40 43 41 Commit_unit_library_clean : 44 Commit_unit_library_clean : Commit_unit_library_clean_only 42 45 @\ 43 46 $(MAKE) Behavioural_library_clean; \ 44 $(MAKE) Priority_library_clean; \ 45 $(MAKE) --directory=$(Commit_unit_DIR) --makefile=Makefile clean; 47 $(MAKE) Priority_library_clean; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r141 r142 35 35 namespace morpheo { 36 36 namespace behavioural { 37 38 37 namespace core { 39 38 namespace multi_ooo_engine { … … 41 40 namespace commit_unit { 42 41 42 #ifdef STATISTICS 43 typedef std::map<uint32_t,uint32_t> stat_inst_fusion_t; 44 #endif 43 45 44 46 class Commit_unit … … 71 73 public : counter_t ** _stat_nb_cycle_state_event ;//[nb_thread] 72 74 public : counter_t ** _stat_nb_cycle_state_wait_end ;//[nb_thread] 75 76 // public : uint32_t * _stat_last_inst ;//[nb_thread] 77 public : uint32_t * _stat_last_inst_type ;//[nb_thread] 78 public : uint32_t * _stat_last_inst_operation ;//[nb_thread] 79 public : stat_inst_fusion_t * _stat_inst_fusion ;//[nb_thread] 73 80 #endif 74 81 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r141 r142 8 8 9 9 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h" 10 #include "Behavioural/include/Allocation.h" 10 11 11 12 namespace morpheo { … … 169 170 { 170 171 _stat_nb_inst_insert [i] = _stat->create_counters("nb_inst_insert_"+toString(i),_param->_nb_inst_insert[i],"", 171 172 173 174 172 _("Cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 173 _("Percent of cycle number with %d instruction(s) included ")+toString(_("(rename_unit %d)."),i), 174 _("Average of instruction(s) included ")+toString(_("(rename_unit %d)."),i) 175 ); 175 176 176 177 _stat_nb_inst_retire [i] = _stat->create_counters("nb_inst_retire_"+toString(i),_param->_nb_inst_retire[i],"", 177 178 179 180 178 _("Cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 179 _("Percent of cycle number with %d instruction(s) removed ")+toString(_("(rename_unit %d)."),i), 180 _("Average of instruction(s) removed ")+toString(_("(rename_unit %d)."),i) 181 ); 181 182 182 183 _stat_nb_inst_commit [i] = _stat->create_counters("nb_inst_commit_"+toString(i),_param->_nb_inst_commit,"", 183 184 185 _("Average of instruction(s) commited "+toString(_("(rename_unit %d)."),i))186 184 _("Cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 185 _("Percent of cycle number with %d instruction(s) commited ")+toString(_("(rename_unit %d)."),i), 186 _("Average of instruction(s) commited ")+toString(_("(rename_unit %d)."),i) 187 ); 187 188 188 189 average_nb_inst_commit = "+ average_nb_inst_commit_"+toString(i) + " " + average_nb_inst_commit; … … 192 193 _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 194 _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")); 195 196 197 // ALLOC1(_stat_last_inst ,uint32_t ,_param->_nb_thread); 198 ALLOC1(_stat_last_inst_type ,uint32_t ,_param->_nb_thread); 199 ALLOC1(_stat_last_inst_operation,uint32_t ,_param->_nb_thread); 200 ALLOC1(_stat_inst_fusion ,stat_inst_fusion_t,_param->_nb_thread); 201 202 for (uint32_t i=0; i<_param->_nb_thread; ++i) 203 { 204 //_stat_last_inst [i] = INSTRUCTION_L_NOP; 205 _stat_last_inst_type [i] = instruction_information(INSTRUCTION_L_NOP)._type ; 206 _stat_last_inst_operation [i] = instruction_information(INSTRUCTION_L_NOP)._operation; 207 } 194 208 195 209 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
r141 r142 8 8 9 9 #include "Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h" 10 #include "Behavioural/include/Allocation.h" 11 #include "Common/include/BitManipulation.h" 10 12 11 13 namespace morpheo { … … 41 43 delete [] _stat_nb_inst_retire; 42 44 delete [] _stat_nb_inst_commit; 45 46 // uint32_t mask_inst = gen_mask<uint32_t>(SIZE_INSTRUCTION); 47 uint32_t mask_type = gen_mask<uint32_t>(SIZE_TYPE ); 48 uint32_t mask_operation = gen_mask<uint32_t>(SIZE_OPERATION ); 49 50 for (uint32_t i=0; i<_param->_nb_thread; ++i) 51 for(stat_inst_fusion_t::iterator it = _stat_inst_fusion [i].begin(); 52 it != _stat_inst_fusion [i].end(); 53 ++it) 54 { 55 uint32_t value = it->second; 56 57 if (value != 0) 58 { 59 uint32_t inst = it->first; 60 61 type_t type_0 = static_cast<type_t>((inst>>(SIZE_TYPE+2*SIZE_OPERATION))&mask_type ); 62 uint32_t operation_0 = (inst>>(SIZE_TYPE+ SIZE_OPERATION))&mask_operation ; 63 type_t type_1 = static_cast<type_t>((inst>>( SIZE_OPERATION))&mask_type ); 64 uint32_t operation_1 = inst &mask_operation ; 65 66 // log_printf(STAT,Commit_unit,FUNCTION, 67 msgInformation( 68 //" * %s - %s : %d\n" 69 //,toString_instruction((inst>>SIZE_INSTRUCTION)&mask_inst).c_str() 70 //,toString_instruction( inst &mask_inst).c_str(),value 71 " * %s.%s - %s.%s : %d\n" 72 ,toString (type_0 ).c_str() 73 ,toString_operation(type_0,operation_0).c_str() 74 ,toString (type_1 ).c_str() 75 ,toString_operation(type_1,operation_1).c_str() 76 ,value 77 ); 78 } 79 } 80 81 // DELETE1(_stat_last_inst ,_param->_nb_thread); 82 DELETE1(_stat_last_inst_type ,_param->_nb_thread); 83 DELETE1(_stat_last_inst_operation,_param->_nb_thread); 84 DELETE1(_stat_inst_fusion ,_param->_nb_thread); 43 85 44 86 log_end(Commit_unit,FUNCTION); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r141 r142 770 770 can_continue = true; 771 771 772 Tcontext_t front_end_id = entry->front_end_id; 773 Tcontext_t context_id = entry->context_id ; 774 uint32_t num_thread = _param->_translate_num_context_to_num_thread [front_end_id][context_id]; 775 rob_state_t state = entry->state_old; 776 Ttype_t type = entry->type ; 777 bool retire_ok = false; 778 uint32_t packet_id = ((entry->ptr << _param->_shift_num_slot) | num_bank); 772 Tcontext_t front_end_id = entry->front_end_id; 773 Tcontext_t context_id = entry->context_id ; 774 uint32_t num_thread = _param->_translate_num_context_to_num_thread [front_end_id][context_id]; 775 rob_state_t state = entry->state_old; 776 Ttype_t type = entry->type ; 777 Toperation_t operation = entry->operation ; 778 bool retire_ok = false; 779 uint32_t packet_id = ((entry->ptr << _param->_shift_num_slot) | num_bank); 779 780 780 781 log_printf(TRACE,Commit_unit,FUNCTION," * front_end_id : %d",front_end_id ); … … 875 876 (*_stat_nb_inst_instruction [instruction]) ++; 876 877 (*_stat_nb_inst_type [type] ) ++; 878 879 //uint32_t index = (_stat_last_inst [num_thread] << SIZE_INSTRUCTION) | instruction; 880 uint32_t index = ((_stat_last_inst_type [num_thread] << (SIZE_TYPE+2*SIZE_OPERATION)) | 881 (_stat_last_inst_operation [num_thread] << (SIZE_TYPE+ SIZE_OPERATION)) | 882 ( type << ( SIZE_OPERATION)) | 883 ( operation )); 884 885 _stat_inst_fusion [num_thread][index] ++; 886 887 //_stat_last_inst [num_thread] = instruction; 888 _stat_last_inst_type [num_thread] = type ; 889 _stat_last_inst_operation [num_thread] = operation ; 877 890 } 878 891 else … … 893 906 << "{" << ((retire_ok)?"OK":"KO") << "} "; 894 907 895 if ((type == TYPE_MEMORY) and is_operation_memory_load( entry->operation))908 if ((type == TYPE_MEMORY) and is_operation_memory_load(operation)) 896 909 instruction_log_file [num_thread] << std::hex << entry->load_data << std::dec; 897 910
Note: See TracChangeset
for help on using the changeset viewer.