//================================================================================================= uint32_t eve::thr::thread::run_once(void) { set_running(); job_->execute(); set_stopped(); // No error occurred, return 0 (zero). return 0; }
//Stop simulation (may receive exit status) void mips1::stop(int status) { cerr << "ArchC: -------------------- Simulation Finished --------------------" << endl; ISA._behavior_end(); ac_stop_flag = 1; ac_exit_status = status; #ifndef AC_COMPSIM set_stopped(); #endif }
//Stop simulation (may receive exit status) void mips1::stop(int status) { cerr << "ArchC: -------------------- Simulation Finished --------------------" << endl; ISA._behavior_end(); ac_stop_flag = 1; ac_exit_status = status; #ifndef AC_COMPSIM set_stopped(); #endif cout << "Number of hazards: " << hazard_count << endl; cout << "| Data hazards: " << hazard_count_by_type[DATA_HAZARD] << endl; cout << "| Data hazards (without forwarding): " << hazard_count_by_type[DATA_HAZARD_NO_FW] << endl; cout << "| Control hazards: " << hazard_count_by_type[CONTROL_HAZARD] << endl; cout << "| DATA CACHE HIT: " << dcount_hit << endl; cout << "| DATA CACHE MISS: " << dcount_miss << endl; cout << "| TOTAL STORE INSTR: " << st_instr << endl; cout << "| DATA WRITE BACK: " << d_writeback << endl; cout << "| INSTR CACHE HIT: " << icount_hit << endl; cout << "| INSTR CACHE MISS: " << icount_miss << endl; }
//================================================================================================= uint32_t eve::thr::thread::run_loop(void) { set_running(); // Thread local initialization. job_->execute_init(); // Thread run loop. do { job_->execute_run(); } while (::WaitForSingleObject( event_shutdown_, run_wait_) == WAIT_TIMEOUT); // Thread local deinit. job_->execute_deinit(); set_stopped(); // No error occurred, return 0 (zero). return 0; }