Changeset 111 for trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Timestamp:
- Feb 27, 2009, 7:37:40 PM (15 years ago)
- Location:
- trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Commit_unit.h
r110 r111 31 31 32 32 #include <iostream> 33 #include <fstream> 33 34 34 35 namespace morpheo { … … 275 276 #endif 276 277 278 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 279 private : std::ofstream * instruction_log_file; 280 #endif 281 277 282 // -----[ Methods ]--------------------------------------------------- 278 283 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/include/Types.h
r108 r111 96 96 #endif 97 97 public : Taddress_t address_next ; 98 #ifdef DEBUG 99 public : double cycle_rob_in ; 100 public : double cycle_commit ; 101 #endif 98 102 99 // public : entry_t (uint32_t ptr ,100 // Tcontext_t front_end_id ,101 // Tcontext_t context_id ,102 // Tcontext_t rename_unit_id ,103 // Tdepth_t depth ,104 // Ttype_t type ,105 // Toperation_t operation ,106 // Tcontrol_t is_delay_slot ,107 // Tgeneral_data_t address ,108 // Texception_t exception ,109 // Texception_t exception_use ,110 // Tlsq_ptr_t store_queue_ptr_write ,111 // Tlsq_ptr_t load_queue_ptr_write ,112 // Tcontrol_t read_ra ,113 // Tgeneral_address_t num_reg_ra_log ,114 // Tgeneral_address_t num_reg_ra_phy ,115 // Tcontrol_t read_rb ,116 // Tgeneral_address_t num_reg_rb_log ,117 // Tgeneral_address_t num_reg_rb_phy ,118 // Tcontrol_t read_rc ,119 // Tspecial_address_t num_reg_rc_log ,120 // Tspecial_address_t num_reg_rc_phy ,121 // Tcontrol_t write_rd ,122 // Tgeneral_address_t num_reg_rd_log ,123 // Tgeneral_address_t num_reg_rd_phy_old ,124 // Tgeneral_address_t num_reg_rd_phy_new ,125 // Tcontrol_t write_re ,126 // Tspecial_address_t num_reg_re_log ,127 // Tspecial_address_t num_reg_re_phy_old ,128 // Tspecial_address_t num_reg_re_phy_new )129 // {130 // this->ptr = ptr ;131 // this->front_end_id = front_end_id ;132 // this->context_id = context_id ;133 // this->rename_unit_id = rename_unit_id ;134 // this->depth = depth ;135 // this->type = type ;136 // this->operation = operation ;137 // this->is_delay_slot = is_delay_slot ;138 // this->address = address ;139 // this->exception = exception ;140 // this->exception_use = exception_use ;141 // this->store_queue_ptr_write = store_queue_ptr_write ;142 // this->load_queue_ptr_write = load_queue_ptr_write ;143 // this->read_ra = read_ra ;144 // this->num_reg_ra_log = num_reg_ra_log ;145 // this->num_reg_ra_phy = num_reg_ra_phy ;146 // this->read_rb = read_rb ;147 // this->num_reg_rb_log = num_reg_rb_log ;148 // this->num_reg_rb_phy = num_reg_rb_phy ;149 // this->read_rc = read_rc ;150 // this->num_reg_rc_log = num_reg_rc_log ;151 // this->num_reg_rc_phy = num_reg_rc_phy ;152 // this->write_rd = write_rd ;153 // this->num_reg_rd_log = num_reg_rd_log ;154 // this->num_reg_rd_phy_old = num_reg_rd_phy_old ;155 // this->num_reg_rd_phy_new = num_reg_rd_phy_new ;156 // this->write_re = write_re ;157 // this->num_reg_re_log = num_reg_re_log ;158 // this->num_reg_re_phy_old = num_reg_re_phy_old ;159 // this->num_reg_re_phy_new = num_reg_re_phy_new ;160 // }161 103 }; 162 104 -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_allocation.cpp
r109 r111 310 310 #endif 311 311 312 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 313 instruction_log_file = new std::ofstream [_param->_nb_thread]; 314 for (uint32_t i=0; i<_param->_nb_thread; ++i) 315 if (_param->_have_thread [i]) 316 { 317 std::string filename = "Instruction_flow-thread_" + toString(i) + ".log"; 318 319 instruction_log_file [i] .open(filename.c_str() ,std::ios::out | std::ios::trunc); 320 } 321 #endif 322 312 323 log_end(Commit_unit,FUNCTION); 313 324 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_deallocation.cpp
r109 r111 207 207 delete _component; 208 208 209 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 210 for (uint32_t i=0; i<_param->_nb_thread; ++i) 211 if (_param->_have_thread [i]) 212 { 213 instruction_log_file [i].close(); 214 } 215 #endif 216 209 217 log_end(Commit_unit,FUNCTION); 210 218 }; -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_statistics_allocation.cpp
r110 r111 59 59 std::string sum_nb_inst_retire_ok = "0"; 60 60 std::string sum_nb_inst_retire_ko = "0"; 61 61 std::string sum_average; 62 62 for (uint32_t i=0; i<_param->_nb_thread; i++) 63 63 if (_param->_have_thread [i]) … … 68 68 sum_nb_inst_retire_ok = "+ nb_inst_retire_ok_"+toString(i) + " " +sum_nb_inst_retire_ok; 69 69 sum_nb_inst_retire_ko = "+ nb_inst_retire_ko_"+toString(i) + " " +sum_nb_inst_retire_ko; 70 sum_average = "+ average_inst_retire_ok_"+toString(i)+" average_inst_retire_ko_"+toString(i); 71 72 _stat->create_expr_average_by_cycle("average_inst_retire_ok_"+toString(i),"nb_inst_retire_ok_"+toString(i), "", toString(_("Average instruction retire ok by cycle (thread %d)"),i)); 73 _stat->create_expr_average_by_cycle("average_inst_retire_ko_"+toString(i),"nb_inst_retire_ko_"+toString(i), "", toString(_("Average instruction retire ko (event, miss) by cycle (thread %d)"),i)); 70 74 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 75 _stat->create_expr_percent ("percent_inst_retire_ok_"+toString(i),"average_inst_retire_ok_"+toString(i), sum_average, toString(_("Percent instruction retire ok by cycle (thread %d)"),i)); 76 _stat->create_expr_percent ("percent_inst_retire_ko_"+toString(i),"average_inst_retire_ko_"+toString(i), sum_average, toString(_("Percent instruction retire ko by cycle (thread %d)"),i)); 77 74 78 _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 79 _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)); … … 82 86 } 83 87 88 _stat->create_expr_average_by_cycle("average_inst_retire_ok", sum_nb_inst_retire_ok, "", _("Average instruction retire ok by cycle (all thread)")); 89 _stat->create_expr_average_by_cycle("average_inst_retire_ko", sum_nb_inst_retire_ko, "", _("Average instruction retire ko (event, miss) by cycle (all thread)")); 90 91 sum_average = "+ average_inst_retire_ok average_inst_retire_ko"; 92 93 _stat->create_expr_percent ("percent_inst_retire_ok","average_inst_retire_ok", sum_average, _("Percent instruction retire ok by cycle (all thread)")); 94 _stat->create_expr_percent ("percent_inst_retire_ko","average_inst_retire_ko", sum_average, _("Percent instruction retire ko by cycle (all thread)")); 95 84 96 _stat->create_expr ("IPC_ok" , "/ "+sum_nb_inst_retire_ok+" cycle", TYPE_COUNTER, "inst/cycle", "Instruction Per Cycle (Instruction Ok)"); 85 97 _stat->create_expr ("CPI_ok" , "/ 1 IPC_ok" , TYPE_COUNTER, "cycle/inst", "Cycle Per Instruction (Instruction Ok)"); -
trunk/IPs/systemC/processor/Morpheo/Behavioural/Core/Multi_OOO_Engine/OOO_Engine/Commit_unit/src/Commit_unit_transition.cpp
r110 r111 172 172 #endif 173 173 entry->address_next = PORT_READ(in_INSERT_ADDRESS_NEXT [x][y]); 174 #ifdef DEBUG 175 entry->cycle_rob_in = sc_simulation_time(); 176 entry->cycle_commit = sc_simulation_time(); 177 #endif 174 178 175 179 // Test if exception : … … 340 344 (entry->read_rb)) 341 345 entry->address_next = PORT_READ(in_COMMIT_ADDRESS [x]); 346 347 #ifdef DEBUG 348 entry->cycle_commit = sc_simulation_time(); 349 #endif 342 350 } 343 351 } … … 406 414 } 407 415 416 #if defined(DEBUG) and defined(DEBUG_Commit_unit) and (DEBUG_Commit_unit == true) 417 // log file 418 instruction_log_file [num_thread] 419 << "[" << sc_simulation_time() << "] " 420 << "{" << ((retire_ok)?" OK ":"!KO!") << "} " 421 << std::hex 422 << "0x" << entry->address << " (0x" << (entry->address<<2) << ") " 423 << std::dec 424 << "[" << entry->cycle_rob_in << ", " << entry->cycle_commit << "] " 425 << std::endl; 426 #endif 427 408 428 // Update nb_inst 409 429 reg_NB_INST_COMMIT_ALL [front_end_id][context_id] --;
Note: See TracChangeset
for help on using the changeset viewer.