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

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

?? dispatch.cc

?? linux下基于c++的處理器仿真平臺。具有處理器流水線
?? CC
?? 第 1 頁 / 共 4 頁
字號:
/* * 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 <algorithm>#include "base/cprintf.hh"#include "base/predictor.hh"#include "base/statistics.hh"#include "encumbered/cpu/full/cpu.hh"#include "encumbered/cpu/full/create_vector.hh"#include "encumbered/cpu/full/dd_queue.hh"#include "encumbered/cpu/full/dep_link.hh"#include "encumbered/cpu/full/dyn_inst.hh"#include "encumbered/cpu/full/fetch.hh"#include "encumbered/cpu/full/floss_reasons.hh"#include "encumbered/cpu/full/iq/iqueue.hh"#include "encumbered/cpu/full/iq/segmented/chain_info.hh"#include "encumbered/cpu/full/iq/segmented/chain_wire.hh"#include "encumbered/cpu/full/readyq.hh"#include "encumbered/cpu/full/reg_info.hh"#include "encumbered/cpu/full/rob_station.hh"#include "encumbered/cpu/full/spec_state.hh"#include "sim/stats.hh"using namespace std;extern const char *dispatch_policy_strings[];////  Debugging break point//InstSeqNum dispatch_break = 0;voiddispatch_breakpoint(){    cprintf("got to the DISP break_point!\n");}#define MODULO_VAL 4//  Setting this to 1 will cause instructions w/ no pending ideps//  to become chain heads (only if it produces a result)#define CHAIN_HEAD_IND_INSTS 0#define DUMP_CHAIN_INFO 0//  Setting this will cause the contents of IQ[0] to be dumped every dispatch cycle#define DUMP_IQ 0////  For statistics...//const char *chain_cr_class_desc[] = {    "     Inst has no outstanding IDEPS",    "      IDEP chain reached max depth",    "                    Inst is a load",    "  Chain has multiple chained IDEPS"};enum DispatchInstClass{    INSN_CLASS_ALL_RDY=0,       // All operands ready    INSN_CLASS_ONE_NOT_RDY,     // All but one operand ready    INSN_CLASS_MULT_CHAINS,     // None ready    INSN_CLASS_ONE_CHAINED,     // None ready    INSN_CLASS_ALL_SELF_TIMED,  // None ready    NUM_INSN_CLASSES};const char *dispatchInstClassDesc[] = {    "             All ops ready",    "          One op not ready",    "     None rdy, mult chains",    "     None rdy, one chained",    "  None rdy, all self-timed"};////  THE BIG PICTURE:////  Move instructions from the fetch queue into the decode/dispatch queue.//  Operation of the decodeQueue is "backwards" ("dispatch" end of pipe first)//  so that we can grab instructions out of the tail end (dispatch end) of the//  pipe during the same cycle we place insts into the head (decode end) of//  the pipe.///*Notes regarding dispatch stage operation:---For the MULTI-THREADED Front-End: (1) Pick a destination IQ for each thread. If a thread can not dispatch     to that IQ, then it can't dispatch.       - Static allocation:   dest_iq = thread_number % numIQueues       - Modulo-N allocation: dest_iq = ++dest_iq % numIQueues                              (Only if dispatch_count % N is zero)			      ==> Switch to the next IQ every N instructions,			          but stop dispatch if select IQ is full. (2) Develop a "score" for each thread. The thread with the *largest* score     will be selected for dispatch. The following situations can block     dispatch for a thread. This is indicated to the final choice code by     setting the score to INT_MIN (from <limits.h>):       - IQ has met it's cap       - ROB has met it's cap       - Insufficient IQ slots       - Insufficient LSQ slots       - Insufficient ROB slots       - Insufficient physical registers (3) Depending upon fetch policy, the following modifications are made:       ICOUNT: the sum of the count of instructions in the IQ plus any               bias value is *subtracted* from the score       All Others: the number of cycles since a thread's last dispatch is                   *added* to the score (4) Select the thread with the smallest score to dispatch.For the SINGLE-THREADED Front-End:  This is the same as for the MT Front-End, except we skip step (1).---Once a thread is chosen for dispatch, we know it is _possible_ for allinstructions in the packet to dispatch. But we also know that individualinstructions may not dispatch due to "objections" from the IQ, LSQ, or ROB.==> If any of the instructions in the packet do not dispatch, then that pipe-    stage DOES NOT advance (since there is still an inst in the last stage).NOP's and squashed instructions are dropped, but do count against the dispatchbandwidth.Since it is possible that an instruction will not dispatch, we need to peekinto the dec_disp_queue, do the dispatch, and if the dispatch succeeds, onlythen remove the instruction from the queue.*///////////////////////////////////////////////////////////////////  Determine which IQ this instruction should use////////////////////////////////////////////////////////////////intFullCPU::choose_iqueue(unsigned thread){    int iq_idx = 0;    if (numIQueues > 1) {	//	//  Initial choice of IQ for this instruction	//	switch (dispatch_policy) {	  case DEPENDENCE:	    //	    //  Access the register-info file and choose the destination	    //  cluster based on dependence information for each instruction	    //	    //  that means that doing it here (by thread) makes no sense	    //	    break;	  case MODULO_N:	    //  MODULO-N algorithm puts 'n' inst blocks into the same	    //  queue.	    //	    //  if the "correct" queue doesn't have enough spots, stall	    //	    iq_idx = mod_n_queue_idx;	    break;	  case THREAD_PER_QUEUE:	    //  Allocate one thread per queue (wrap if there aren't	    //  enough queues) --> static partitioning	    iq_idx = thread % numIQueues;	    break;	  default:	    panic("dispatch stage misconfigured");	    break;	}    }    return iq_idx;}////  This structure holds the information we need for each thread to//  rank them for dispatching//struct ThreadList{    Tick score;    Tick lastDispatchTime;    unsigned thread_number;    unsigned iq_idx;    unsigned disp_insts;    bool eligable;    ThreadList() {	score = 0;	eligable = false;    }};class ThreadListSortComp{  public:    bool operator()(const ThreadList &l1, const ThreadList &l2) const {	if (l1.eligable && !l2.eligable)	    return true;  // we want l1 to go before (lower) than l2	if (!l1.eligable && l2.eligable)	    return false;   // we want l1 to go after (highter) than l2	if (l1.score == l2.score) {	    //  RR operation for these two threads...	    return l1.lastDispatchTime < l2.lastDispatchTime;	}	return l1.score > l2.score;  // hopefully an ASCENDING sort    }};////  Returns true if this cluster is good for dispatch//boolFullCPU::checkClusterForDispatch(unsigned clust, bool chainHead) {    bool rv = (IQ[clust]->free_slots() != 0);    if (rv && chainHead)	rv = (chainWires->freeWires(clust) != 0);    return rv;}DispatchEndCauseFullCPU::checkThreadForDispatch(unsigned t, unsigned idx, unsigned needSlots){    //  Check for free slots in the IQ    if (IQ[idx]->free_slots() < needSlots) {	IQ[idx]->markFull();	return FLOSS_DIS_IQ_FULL;    }    //  Check for IQ cap    if (IQ[idx]->cap_met(t)) {	iq_cap_events[t]++;	iq_cap_inst_count[t] += ifq[t].num_total();	//  Indicate to fetch stage that the cap is active	iq_cap_active[t] = true;	return FLOSS_DIS_IQ_CAP;    }    //  Check for ROB Caps    if ((rob_cap[t] < ROB_size) && (ROB.num_thread(t) >= rob_cap[t])) {	rob_cap_events[t]++;	rob_cap_inst_count[t] += ifq[t].num_total();	//  Indicate to fetch stage that the cap is active	rob_cap_active[t] = true;	return FLOSS_DIS_ROB_CAP;    }    //    //  Check for available IQ bandwidth    //    if (IQ[idx]->add_bw() < needSlots)	return FLOSS_DIS_BW;    DispatchEndCause c = checkGlobalResourcesForDispatch(needSlots);    if (c != FLOSS_DIS_CAUSE_NOT_SET)	return c;    return FLOSS_DIS_CAUSE_NOT_SET;}DispatchEndCauseFullCPU::checkGlobalResourcesForDispatch(unsigned needSlots){    //  Check for free slots in the LSQ    if (LSQ->free_slots() < needSlots) {	++lsq_fcount;	return FLOSS_DIS_LSQ_FULL;    }    //  Check for free slots in the ROB    if (ROB.num_free() < needSlots) {	++ROB_fcount;	return FLOSS_DIS_ROB_FULL;    }    //  Check for sufficient INT physical registers    if (free_int_physical_regs < needSlots) {	++reg_int_full;	return FLOSS_DIS_IREG_FULL;    }    //  Check for sufficient FP physical registers    if (free_fp_physical_regs < needSlots) {	++reg_fp_full;	return FLOSS_DIS_FPREG_FULL;    }    return FLOSS_DIS_CAUSE_NOT_SET;}//============================================================================////  This dispatch stage itself://    - Determine the (first) IQ that each thread should dispatch to//    - Calculate a score for each thread//    - Sort by score -- high score gets a chance to dispatch first//    - Dispatch thread(s) to IQ(s) as appropriate for IQ configuration and//         dispatch policy//voidFullCPU::dispatch(){    DispatchEndCause &endCause = floss_state.dispatch_end_cause;    endCause = FLOSS_DIS_CAUSE_NOT_SET;    //  We will sort this vector to determine which thread to attempt    //  to dispatch first, second, etc...    vector<ThreadList> tlist(SMT_MAX_THREADS);    //    //  bail early if no instructions to dispatch    //    if (decodeQueue->instsAvailable() == 0) {	endCause = FLOSS_DIS_NO_INSN;	return;    }    endCause = checkGlobalResourcesForDispatch(1);    if (endCause != FLOSS_DIS_CAUSE_NOT_SET)	return;    m5_assert(chainWires == 0 || chainWires->sanityCheckOK());    m5_assert(clusterSharedInfo->ci_table == 0 ||	      clusterSharedInfo->ci_table->sanityCheckOK());    //    //  For each thread:    //    - Populate ThreadList entry    //    - Check for dispatch-able instrucitons    //    - Calculate score    //    for (int t = 0; t < SMT_MAX_THREADS; ++t) {	int idx = choose_iqueue(t);	if (idx < 0) {	    //  no available clusters	    tlist[t].eligable = false;	    SET_FIRST_FLOSS_CAUSE(endCause, FLOSS_DIS_POLICY);	    continue;   // try next thread	}	tlist[t].iq_idx = idx;	tlist[t].thread_number = t;	tlist[t].lastDispatchTime = lastDispatchTime[t];	//  how many insturctions can we possibly dispatch?	tlist[t].disp_insts = decodeQueue->instsAvailable(t);	if (tlist[t].disp_insts > dispatch_width)	    tlist[t].disp_insts = dispatch_width;	if (tlist[t].disp_insts == 0) {	    tlist[t].eligable = false;	    SET_FIRST_FLOSS_CAUSE(endCause, FLOSS_DIS_NO_INSN);	    continue;   // try next thread	}	//	//  modify the score based on the fetch policy	//	unsigned adj = 0;	switch (fetch_policy) {	  case IC:	    //  The number of slots available to this thread without regard	    //  to the cap...	    tlist[t].score += IQNumSlots;	    //	    //  adjust the score by the number of instructions in the IQ	    //  ==> Be careful not to underflow the unsigned score value	    //	    adj = IQNumInstructions(t) + static_icount_bias[t];	    if (adj > tlist[t].score)		tlist[t].score = 0;	    else		tlist[t].score -= adj;	    break;	  default:	    //  The number of cycles since this thread last dispatched	    tlist[t].score += (curTick - lastDispatchTime[t]);	    break;	}	tlist[t].eligable = true;    }    //    //  Now that the scores have been calculated... sort threads...    //    sort(tlist.begin(), tlist.end(), ThreadListSortComp());    //    //  If the first element isn't going to dispatch, none are...    //  --> bail out early    //    if (tlist[0].eligable) {	//  reset the end cause... we've got something to dispatch...	endCause = FLOSS_DIS_CAUSE_NOT_SET;    } else {	// The only possible floss cause here is NO_INSN	return;    }    //---------------------------------------------------------------------    //    //  We're finally ready to start dispatching. If there is only one    //  IQ, then we simply dispatch the thread with the highest score to    //  the sole IQ.    //    //  The clustered architecture is slightly more interesting...    //    unsigned dispatched_this_cycle = 0;    if (numIQueues == 1) {	//	//  Non-clustered architecture:	//	for (int i = 0; i < number_of_threads; ++i) {	    //  early exit...	    if (!tlist[i].eligable)		break;	    unsigned thread = tlist[i].thread_number;	    unsigned count = dispatch_thread(thread, 0, 0, endCause);	    if (endCause == FLOSS_DIS_CAUSE_NOT_SET && count == dispatch_width)		endCause = FLOSS_DIS_BW;	    if (count) {		lastDispatchTime[thread] = curTick;		// exit after we dispatch from a thread		break;	    }	}#if DUMP_IQ	IQ[0]->dump();#endif	return;    }    //------------------------------------------------------------------------    //    //  Clustered machine...    //    //   Dispatch behavior depends on dispatch policy    //    unsigned iq_idx = tlist[0].iq_idx;    unsigned thread = tlist[0].thread_number;    bool done = false;    switch (dispatch_policy) {      case DEPENDENCE:	//	//  We dispatch A SINGLE thread to as many IQ's as necessary.	//	//  rotate through all the IQ's until:	//    (1) We run out of instructions to dispatch	//    (2) We try to dispatch to an IQ, and fail	//	//  ==> This means that we have to check each IQ for caps, etc	//      as we rotate through...	//	lastDispatchTime[thread] = curTick;	do {	    DispatchEndCause queue_endCause = FLOSS_DIS_CAUSE_NOT_SET;	    //	    //  Logic internal to dispatch_thread() will direct instructions	    //  to the appropriate instruction queues	    //	    unsigned dispatched_this_queue =		dispatch_thread(thread, iq_idx, dispatch_width,				queue_endCause);	    dispatched_this_cycle += dispatched_this_queue;	    switch( queue_endCause ) {		//		// The following end-causes indicate that we can't dispatch		// any more instructions this cycle		//	      case FLOSS_DIS_ROB_FULL:	      case FLOSS_DIS_LSQ_FULL:	      case FLOSS_DIS_IREG_FULL:	      case FLOSS_DIS_FPREG_FULL:		done = true;		endCause = queue_endCause;		break;		//		// The following end-causes indicate that we can't continue		// dispatching this thread this cycle		//	      case FLOSS_DIS_ROB_CAP:	      case FLOSS_DIS_NO_INSN:		done = true;		endCause = queue_endCause;		break;		//		// The following end-causes indicate that we can't dispatch		// the next instruction, so we should give up now...		//	      case FLOSS_DIS_IQ_FULL:	      case FLOSS_DIS_IQ_CAP:	      case FLOSS_DIS_BW:		done = true;		break;		//

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久美女艺术照精彩视频福利播放| 国产精品不卡一区| 国产精品久久久久天堂| 亚洲成人综合在线| 国产成人午夜99999| 欧美人与性动xxxx| 中文字幕中文字幕在线一区| 日韩av电影免费观看高清完整版 | 国产老肥熟一区二区三区| 欧美影院一区二区| 欧美国产日韩精品免费观看| 免费精品视频在线| 日本道在线观看一区二区| 亚洲福利视频三区| 成人午夜av在线| 欧美本精品男人aⅴ天堂| 亚洲卡通欧美制服中文| 成人精品免费看| 久久综合色天天久久综合图片| 亚洲成人在线免费| 色美美综合视频| 国产精品人成在线观看免费| 韩国理伦片一区二区三区在线播放| 欧美日韩一区国产| 亚洲激情av在线| 99久久婷婷国产精品综合| 久久精品人人做人人爽人人| 国产91丝袜在线观看| 555夜色666亚洲国产免| 亚洲第一成年网| 欧美三级一区二区| 亚洲一区中文日韩| 日本大香伊一区二区三区| 亚洲视频在线一区二区| 97久久超碰国产精品电影| 欧美激情一区二区三区四区| 国产福利精品一区| 国产女人aaa级久久久级 | 欧美日韩一区三区| 亚洲一区二区三区三| 欧美在线观看视频一区二区 | 成人在线视频首页| 国产精品久久久久永久免费观看| 国产精品伊人色| 国产精品久久久久久久久免费桃花 | 国产超碰在线一区| 久久老女人爱爱| 福利电影一区二区三区| 国产精品久久久久久久岛一牛影视| 国产高清精品在线| 欧美精彩视频一区二区三区| av不卡免费电影| 亚洲国产中文字幕| 欧美一二区视频| 国产寡妇亲子伦一区二区| 中文字幕一区三区| 欧美日韩在线不卡| 极品瑜伽女神91| 国产精品蜜臀在线观看| 色狠狠桃花综合| 蜜臀a∨国产成人精品| 国产三级精品视频| 在线观看视频一区二区| 秋霞影院一区二区| 欧美国产一区二区| 欧美三区免费完整视频在线观看| 免费在线观看一区| 国产精品天干天干在线综合| 在线视频综合导航| 狠狠色丁香久久婷婷综| 亚洲欧美日韩人成在线播放| 91精品国产色综合久久久蜜香臀| 国产一区二区看久久| 一区二区三区成人在线视频| 日韩免费电影一区| www.成人网.com| 毛片基地黄久久久久久天堂| 国产精品国产三级国产有无不卡| 欧美老年两性高潮| 成人短视频下载| 伦理电影国产精品| 一区二区三区欧美日| 久久精品在这里| 欧美高清www午色夜在线视频| 国产成人日日夜夜| 日韩精品亚洲一区| 亚洲欧美自拍偷拍| 欧美精品一区二区高清在线观看| 一区二区国产视频| 久久网站热最新地址| 欧美丝袜丝nylons| k8久久久一区二区三区| 久久99精品久久久久婷婷| 亚洲色图视频网站| 国产欧美中文在线| 欧美tickling网站挠脚心| 欧美在线观看一区二区| 成人福利视频在线| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲美女少妇撒尿| 26uuu国产电影一区二区| 欧美男女性生活在线直播观看| 不卡的av网站| 成人精品视频网站| 国产精品18久久久久久久久久久久| 亚洲第一激情av| 亚洲男人天堂av网| 中文字幕中文字幕一区二区| 久久久久国产精品麻豆ai换脸| 8v天堂国产在线一区二区| 欧美中文字幕一二三区视频| 成年人国产精品| 国产一区视频在线看| 另类小说一区二区三区| 免费观看日韩电影| 日韩国产成人精品| 热久久免费视频| 麻豆精品国产91久久久久久| 日本伊人午夜精品| 国产乱码精品1区2区3区| 午夜精品久久久久久久| 亚洲一区二区精品视频| 亚洲一区二区三区在线播放| 亚洲黄色尤物视频| 亚洲一区在线观看视频| 亚洲一区二区视频在线| 亚洲第一福利视频在线| 五月天激情综合| 奇米影视一区二区三区| 麻豆精品精品国产自在97香蕉| 美女视频黄免费的久久 | 国产精品久久久一本精品| 中文字幕一区二区三区乱码在线| 国产片一区二区| 自拍偷拍亚洲激情| 亚洲在线一区二区三区| 午夜电影久久久| 精品在线播放午夜| 成人动漫一区二区| 在线观看亚洲a| 精品少妇一区二区三区免费观看| 久久精品亚洲一区二区三区浴池 | 在线视频国产一区| 91麻豆精品国产自产在线观看一区| 欧美一区二区三区色| 久久综合九色综合97_久久久| 日本一区二区三区在线观看| 亚洲激情自拍偷拍| 免费在线观看不卡| 成人av在线资源网| 欧美日韩精品福利| 久久久亚洲欧洲日产国码αv| 亚洲欧美一区二区在线观看| 午夜视频在线观看一区二区三区| 老司机精品视频在线| 波多野洁衣一区| 91精品国产欧美日韩| 欧美韩国日本不卡| 亚洲狠狠爱一区二区三区| 国产精品一区三区| 欧美影片第一页| 欧美激情中文字幕| 日韩av午夜在线观看| 91欧美一区二区| 精品国产乱子伦一区| 亚洲精品久久嫩草网站秘色| 激情小说欧美图片| 精品污污网站免费看| 国产日韩欧美a| 青草国产精品久久久久久| 99久久久国产精品| 久久伊人蜜桃av一区二区| 亚洲国产aⅴ成人精品无吗| 高清成人在线观看| 日韩欧美成人一区二区| 夜夜嗨av一区二区三区网页 | 欧美在线观看视频在线| 国产日产欧美一区二区视频| 日日夜夜免费精品| 色综合久久久久久久| 国产日产欧产精品推荐色| 视频在线观看国产精品| 91久久精品网| 中文字幕在线观看一区二区| 久久99精品久久久久久动态图| 色噜噜狠狠成人中文综合| 国产精品久久久久一区| 国产精品99久| 亚洲精品一区二区三区99| 日韩av二区在线播放| 欧美性三三影院| 亚洲精品成人悠悠色影视| 不卡av免费在线观看| 国产欧美精品一区| 国产一区二区精品久久91| 精品久久久久香蕉网| 久久爱www久久做| 日韩一区二区三免费高清| 日韩专区一卡二卡| 欧美精品xxxxbbbb|