亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? commit.cc

?? linux下基于c++的處理器仿真平臺。具有處理器流水線
?? CC
?? 第 1 頁 / 共 2 頁
字號:
/* * Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005 * The Regents of The University of Michigan * All Rights Reserved * * This code is part of the M5 simulator, developed by Nathan Binkert, * Erik Hallnor, Steve Raasch, and Steve Reinhardt, with contributions * from Ron Dreslinski, Dave Greene, Lisa Hsu, Kevin Lim, Ali Saidi, * and Andrew Schultz. * * Permission is granted to use, copy, create derivative works and * redistribute this software and such derivative works for any * purpose, so long as the copyright notice above, this grant of * permission, and the disclaimer below appear in all copies made; and * so long as the name of The University of Michigan is not used in * any advertising or publicity pertaining to the use or distribution * of this software without specific, written prior authorization. * * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION FROM THE * UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY PURPOSE, AND * WITHOUT WARRANTY BY THE UNIVERSITY OF MICHIGAN OF ANY KIND, EITHER * EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE. THE REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE * LIABLE FOR ANY DAMAGES, INCLUDING DIRECT, SPECIAL, INDIRECT, * INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM * ARISING OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF SUCH * DAMAGES. */#include "base/cprintf.hh"#include "base/statistics.hh"#include "cpu/exetrace.hh"#include "cpu/smt.hh"#include "encumbered/cpu/full/bpred.hh"#include "encumbered/cpu/full/floss_reasons.hh"#include "encumbered/cpu/full/cpu.hh"#include "encumbered/cpu/full/iq/iqueue.hh"#include "encumbered/cpu/full/rob_station.hh"#include "encumbered/cpu/full/storebuffer.hh"#include "encumbered/cpu/full/thread.hh"#include "encumbered/cpu/full/writeback.hh"#include "mem/mem_interface.hh"#include "sim/sim_events.hh"#include "sim/stats.hh"using namespace std;/*======================================================================*//* *  IQ_COMMIT() - instruction retirement pipeline stage * *//*  Number of cycles we are allowed to go without committing an instruction  */#define CRASH_COUNT 100000class FaultHandlerDelayEvent : public Event{    FullCPU *cpu;    int thread;  public:    FaultHandlerDelayEvent(FullCPU *_cpu, int _thread, Tick tick)	: Event(&mainEventQueue), cpu(_cpu), thread(_thread)    {	setFlags(AutoDelete);	schedule(tick);    }    ~FaultHandlerDelayEvent() {}    virtual void process()    {	cpu->fetch_fault_count[thread]--;    }};/* this function commits the results of the oldest completed entries from the   IQ and LSQ to the architected reg file, stores in the LSQ will commit   their store data to the data cache at this point as well */voidFullCPU::commit(){    static int crash_counter = 0;    unsigned committed = 0;    unsigned committed_thread[SMT_MAX_THREADS];    int finished_thread[SMT_MAX_THREADS];    int num_finished_threads;    CommitEndCause reason;    CommitEndCause reason_overall = COMMIT_CAUSE_NOT_SET;;    CommitEndCause reason_thread[SMT_MAX_THREADS];    int detail;    int detail_overall = 0;    int detail_thread[SMT_MAX_THREADS];    // in case there are NO unfinished instructions    InstSeqNum seq_overall = InstSeqNum(-1);    InstSeqNum seq_thread[SMT_MAX_THREADS];    unsigned blame = 0;   // thread numbers    unsigned blame_overall = 0;    //    //  This code causes the simulator to halt if it doesn't commit    //  an instruction in CRACH_COUNT cycles    //    if (++crash_counter > CRASH_COUNT) {	ccprintf(cerr, "DEADLOCK!\n");	dumpIQ();	LSQ->dump();	ROB.dump();	panic("We stopped committing instructions!!!");    }    //    //  Determine which threads we don't need to worry about    //    num_finished_threads = 0;    int num_inactive_threads = 0;    for (int i = 0; i < number_of_threads; i++) {	// if thread has no instructions in ROB then we can skip it	if (!thread_info[i].active || ROB.num_thread(i) == 0) {	    finished_thread[i] = true;	    num_finished_threads++;	    if (!thread_info[i].active		|| execContexts[i]->status() != ExecContext::Active) {		num_inactive_threads++;	    }	} else {	    finished_thread[i] = false;	}    }    if (num_finished_threads == number_of_threads) {	// If we're not committing because all the threads are	// inactive, don't consider this a microarchitectural	// deadlock... it can happen e.g. in an MP where there is only	// one runnable thread.	if (num_inactive_threads == number_of_threads) {	    crash_counter = 0;	}	return;    }    //    //  Initialize & allocate per-thread data structs...    //    //  FIXME:  we don't really want to do all this allocation every cycle    //    ROBStation **commit_list[SMT_MAX_THREADS];    unsigned clist_num[SMT_MAX_THREADS];    unsigned clist_idx[SMT_MAX_THREADS];    bool list_done[SMT_MAX_THREADS];    unsigned num_list_done = num_finished_threads;    unsigned completed[SMT_MAX_THREADS];    unsigned total_completed = 0;    for (int i = 0; i < number_of_threads; ++i) {	clist_num[i] = 0;	list_done[i] = finished_thread[i];	clist_idx[i] = 0;	reason_thread[i] = COMMIT_CAUSE_NOT_SET;	detail_thread[i] = 0;	seq_thread[i] = 0;	completed[i] = 0;	committed_thread[i] = 0;	if (!finished_thread[i]) {	    // allocate storage for the max number of insts we could	    // commit in a cycle	    commit_list[i] = new ROBStation *[commit_width];	} else {	    commit_list[i] = 0;	}    }    unsigned num_eligible = 0;    //    //  put commitable instructions into the lists...    //    //  We walk the ROB, filling each per-thread list    //    //  We also keep track of the first non-commitable inst for each thread    //  and overall, and also squash instructions we encounter along the way    //    bool done = false;    for (ROBStation *rs = ROB.head(); (rs != NULL) && !done;	 rs = ROB.next(rs))    {	unsigned thread = rs->thread_number;	//	//  count the number of instruction ready to commit	//	if (!finished_thread[thread] && rs->completed) {	    ++completed[thread];	    ++total_completed;	}	reason = COMMIT_CAUSE_NOT_SET;	//	//  ignore instructions from threads that we're done listing...	//	if (!list_done[thread]) {	    //	    //  If we're still looking at a thread and run across a squashed	    //  instruction, then blow it away...	    //	    if (rs->squashed) {		if (ptrace)		    ptrace->deleteInst(rs->inst);		remove_ROB_element(rs);		// go look at next instruction		continue;	    }	    //	    //  Add potentially-eligible instructions to the list	    //  because things change as we commit, we'll double-check each	    //  instruction as it comes up...	    //	    if (eligible_to_commit(rs, &reason)) {		commit_list[thread][clist_num[thread]++] = rs;		++num_eligible;		if (clist_num[thread] == commit_width) {		    list_done[thread] = true;		    ++num_list_done;		    if (num_list_done == number_of_threads)			done = true;		}	    } else {		DynInst *inst = rs->inst;		//		//  An ineligible instruction means that we're done		//  looking at this thread... determine the commit-end		//  cause for _this_thread_ in case we need it later		//		if (rs->completed) {		    //		    //  For completed but not eligible instructions,		    //  we'll use the "reason" determined by the		    //  eligible_to_commit() function		    //		    reason_thread[thread] = reason;		} else if (inst->isLoad() && !rs->eaCompPending			   && rs->issued) {		    // It's a load that's been issued from the LSQ,		    // so it's a memory stall... (not necessarily a miss,		    // despite the name)		    reason_thread[thread] = COMMIT_DMISS;		    detail_thread[thread] = rs->mem_result;		} else if (inst->isMemBarrier()) {		    reason_thread[thread] = COMMIT_MEMBAR;		} else {		    // anything else: blame it on the function unit		    reason_thread[thread] = COMMIT_FU;		    detail_thread[thread] = inst->opClass();		}		if (clist_num[thread] == 0) {		    // Special checks when the oldest instruction on		    // the thread is not committable: it might be an		    // instruction that has to wait until this point		    // to issue.		    // Uncached loads must wait to guarantee they're		    // non-speculative.  Memory barriers must wait to		    // guarantee that all previous loads have		    // completed.  (MBs also must wait for the store		    // buffer to empty to guarantee all previous		    // stores have completed as well.)		    bool uc_load = (inst->isLoad()				    && (inst->mem_req_flags & UNCACHEABLE));		    bool ready_mb = (inst->isMemBarrier()				     && storebuffer->count(thread) == 0);		    if ((uc_load || ready_mb)			&& rs->lsq_entry.notnull()			&& !rs->lsq_entry->queued			&& rs->lsq_entry->ops_ready()) {			LSQ->ready_list_enqueue(rs->lsq_entry);		    }		}		//		//  Make a note of the first uncommitable inst...		//		if ((seq_overall == 0) || (seq_overall > rs->seq)) {		    seq_overall = rs->seq;		    reason_overall = reason_thread[thread];		    blame_overall  = thread;		    detail_overall = detail_thread[thread];		}		list_done[thread] = true;		++num_list_done;		if (clist_num[thread] == 0) {		    finished_thread[thread] = true;		    ++num_finished_threads;		}		if (num_list_done == number_of_threads)		    done = true;	    }	}    }    //    //  We'll blame the oldest uncommitted instruction by default    //    reason = reason_overall;    blame  = blame_overall;    detail = detail_overall;    if (num_eligible == 0) {	//	//  Assign blame	//	switch(reason) {	  case COMMIT_BW:	  case COMMIT_NO_INSN:	  case COMMIT_STOREBUF:	  case COMMIT_MEMBAR:	    break;	  case COMMIT_FU:	    floss_state.commit_fu[0][0] = OpClass(detail);	    break;	  case COMMIT_DMISS:	    floss_state.commit_mem_result[0] = MemAccessResult(detail);	    break;	  case COMMIT_CAUSE_NOT_SET:	    done = true;  // dummy	    break;	  default:	    fatal("commit causes screwed up");	}	floss_state.commit_end_cause[0] = reason;	//	//  De-allocate memory	//	for (int i = 0; i < number_of_threads; ++i)	    if (commit_list[i])		delete [] commit_list[i];	return;    }    //    //    //    if (prioritized_commit) {	//	//  Choose the order of threads to commit	//	fatal("prioritized commit isn't implemented, yet...");    }    //    //  Prepare to enter the commit loop...    //    //  ... do commit-model specific tasks    //    //    //  Choose the thread we're commiting by looking at the oldest    //  eligible instruction    //    unsigned pt_thread = 0;    if (commit_model == COMMIT_MODEL_PERTHREAD)	pt_thread = oldest_inst(commit_list, clist_num, clist_idx);    //    //  Increment the RR value, looking for a thread we can commit from    //    if (commit_model == COMMIT_MODEL_RR) {	do {	    rr_commit_last_thread		= (rr_commit_last_thread +1) % number_of_threads;	} while (finished_thread[rr_commit_last_thread]);	//	//  Mark all remaining threads as done...	//	for (int i = 0; i < number_of_threads; ++i)	    finished_thread[i] = true;	num_finished_threads = number_of_threads - 1;	finished_thread[rr_commit_last_thread] = false;    }    //    //  Main commit loop    //    done = false;    do {	ROBStation *rs = 0;	unsigned thread = 0;	//	//  Choose the instruction to commit	//	switch(commit_model) {	  case COMMIT_MODEL_SMT:	    thread = oldest_inst(commit_list, clist_num, clist_idx);	    rs = commit_list[thread][clist_idx[thread]++];	    break;	  case COMMIT_MODEL_SSCALAR:	    thread = oldest_inst(commit_list, clist_num, clist_idx);	    rs = commit_list[thread][clist_idx[thread]++];	    // if this inst is younger than the oldest non-commitable	    // inst, we are done.	    if (rs->seq > seq_overall) {		rs = 0;		done = true;		reason_thread[thread] = COMMIT_NO_INSN;	    }	    break;	  case COMMIT_MODEL_PERTHREAD:	    thread = pt_thread;	    if (clist_num[thread] - clist_idx[thread]) {		rs = commit_list[thread][clist_idx[thread]++];	    } else {		rs = 0;		done = true;		reason_thread[thread] = COMMIT_NO_INSN;	    }	    break;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99麻豆久久久国产精品免费 | 久久网这里都是精品| 久久综合视频网| 国产精品一区在线| 91蜜桃网址入口| 国产亚洲一二三区| 日本aⅴ亚洲精品中文乱码| 91在线国产福利| 国产视频一区二区在线| 午夜精品久久久久久久久| 成人国产在线观看| 精品裸体舞一区二区三区| 亚洲妇熟xx妇色黄| 91丨porny丨蝌蚪视频| 国产无一区二区| 久久国产精品一区二区| 欧美日本一区二区在线观看| 国产精品狼人久久影院观看方式| 麻豆成人91精品二区三区| 欧美日韩极品在线观看一区| 自拍偷在线精品自拍偷无码专区| 国产自产v一区二区三区c| 91精品国产入口| 亚洲国产美国国产综合一区二区| 色婷婷综合久久久| 中文字幕不卡在线播放| 国产成人av在线影院| 精品久久一二三区| 久久国产视频网| 欧美一区二区三区喷汁尤物| 婷婷开心激情综合| 欧美另类videos死尸| 午夜精品福利一区二区蜜股av| 在线免费观看一区| 亚洲男女一区二区三区| 99久久99久久精品国产片果冻| 国产精品久久久久影视| 成年人国产精品| 亚洲欧美日韩一区二区三区在线观看| 不卡av免费在线观看| 中文字幕一区二区不卡| 92国产精品观看| 亚洲综合图片区| 欧美日韩电影一区| 毛片不卡一区二区| 久久免费电影网| 99这里只有精品| 亚洲一区欧美一区| 欧美一卡2卡3卡4卡| 久久不见久久见中文字幕免费| 精品国产乱码久久久久久夜甘婷婷| 久久成人免费网| 国产亲近乱来精品视频| av一区二区三区| 亚洲福中文字幕伊人影院| 欧美乱熟臀69xxxxxx| 精品亚洲国内自在自线福利| 国产欧美日韩麻豆91| 色婷婷综合五月| 美女国产一区二区三区| 国产性色一区二区| 在线观看精品一区| 麻豆极品一区二区三区| 国产欧美视频在线观看| 在线免费av一区| 开心九九激情九九欧美日韩精美视频电影| 26uuu亚洲综合色| 91福利资源站| 国产在线日韩欧美| 亚洲欧美日韩在线播放| 欧美一区二区三区在线观看视频| 国产精品一区2区| 夜夜操天天操亚洲| 国产亚洲一区二区三区| 欧美在线观看一区| 国产在线播放一区三区四| 亚洲色图第一区| 精品日韩一区二区三区| 94色蜜桃网一区二区三区| 老色鬼精品视频在线观看播放| 亚洲婷婷综合色高清在线| 日韩一级精品视频在线观看| 99久久99久久精品国产片果冻| 日本午夜一本久久久综合| 国产精品久久久久国产精品日日 | 高清不卡在线观看| 五月婷婷色综合| 亚洲欧美自拍偷拍色图| 久久午夜电影网| 91精品国产综合久久蜜臀| 91啦中文在线观看| 国产成人亚洲精品狼色在线| 午夜电影网亚洲视频| 亚洲视频一二区| 国产人妖乱国产精品人妖| 日韩一级大片在线观看| 在线看国产一区| 日本精品视频一区二区| 成人白浆超碰人人人人| 国产福利精品一区| 久久99精品久久久久婷婷| 日韩高清不卡一区二区三区| 一区二区视频免费在线观看| 欧美国产欧美综合| 久久免费视频一区| 精品国产欧美一区二区| 91精品国产丝袜白色高跟鞋| 精品国产91久久久久久久妲己| 日本福利一区二区| 91香蕉视频污在线| 9i在线看片成人免费| 丁香婷婷综合激情五月色| 国产精品18久久久久久久久久久久| 免费视频最近日韩| 麻豆国产91在线播放| 日本三级韩国三级欧美三级| 亚洲成人www| 亚洲成人av在线电影| 五月天婷婷综合| 香蕉乱码成人久久天堂爱免费| 亚洲国产va精品久久久不卡综合| 亚洲一区二区三区在线看| 亚洲夂夂婷婷色拍ww47| 亚洲1区2区3区视频| 三级久久三级久久| 精品一区二区三区免费播放| 久久精品国产久精国产| 国产精品1区2区3区| 成人黄色网址在线观看| 972aa.com艺术欧美| 欧美性生活大片视频| 91精品国产色综合久久不卡蜜臀| 日韩精品一区二区三区在线观看| 26uuu精品一区二区| 中文字幕免费不卡在线| 亚洲人xxxx| 香蕉成人伊视频在线观看| 另类的小说在线视频另类成人小视频在线 | 欧美探花视频资源| 91精品欧美综合在线观看最新 | 在线视频国内一区二区| 在线观看91av| 久久女同性恋中文字幕| 国产精品久久久久久久浪潮网站 | 欧美高清一级片在线观看| 亚洲桃色在线一区| 日韩精品一区第一页| 国产一区二区三区久久久| 91香蕉视频黄| 制服丝袜国产精品| 国产精品色在线观看| 亚洲电影一区二区| 国产精品小仙女| 欧美亚洲一区二区在线观看| 欧美成人精品福利| 日韩理论片一区二区| 久久国产精品区| 色88888久久久久久影院按摩| 日韩欧美一区二区久久婷婷| 亚洲免费毛片网站| 久久99日本精品| 欧美在线免费观看亚洲| 国产欧美一区二区精品性| 亚洲一区av在线| 成人黄色免费短视频| 日韩精品中文字幕在线一区| 日韩毛片精品高清免费| 激情久久五月天| 欧美日韩国产不卡| 亚洲人妖av一区二区| 久久成人免费网| 欧美久久久影院| 亚洲精品乱码久久久久久日本蜜臀| 久久精品国产**网站演员| 欧美在线观看18| 国产精品卡一卡二卡三| 韩国av一区二区三区在线观看| 欧洲av在线精品| 一色桃子久久精品亚洲| 国产乱子伦视频一区二区三区 | 成人av网站免费观看| 欧美mv日韩mv国产网站app| 亚洲综合丝袜美腿| av一区二区不卡| 国产精品美女久久久久久久| 激情成人午夜视频| 日韩视频免费观看高清完整版 | 精品一区二区在线视频| 91精品婷婷国产综合久久性色| 亚洲卡通动漫在线| 99久久综合99久久综合网站| 国产欧美日韩综合| 丰满白嫩尤物一区二区| 国产亚洲精品超碰| 国产精品香蕉一区二区三区| 精品日韩欧美一区二区| 精品一区精品二区高清| 精品国产91久久久久久久妲己 | 日韩欧美卡一卡二| 久久99在线观看|