亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产盗摄一区二区三区| 精品伊人久久久久7777人| 884aa四虎影成人精品一区| 久久99精品久久久| 亚洲精品国产精华液| 56国语精品自产拍在线观看| 丁香一区二区三区| 视频在线在亚洲| 最近日韩中文字幕| 26uuuu精品一区二区| 91福利国产精品| 久久99精品国产| 亚洲国产综合人成综合网站| 国产无遮挡一区二区三区毛片日本| 欧美在线视频全部完| 国产suv一区二区三区88区| 天天综合天天综合色| 最新不卡av在线| 久久久综合视频| 欧美肥妇毛茸茸| 日本高清不卡在线观看| 国产丶欧美丶日本不卡视频| 免费人成在线不卡| 亚洲电影视频在线| 亚洲免费在线视频一区 二区| 精品国产一区二区亚洲人成毛片 | 成人欧美一区二区三区白人| 欧美老年两性高潮| 色婷婷综合久久久久中文| 国产福利精品一区二区| 麻豆国产精品官网| 视频一区在线播放| 亚洲主播在线观看| 亚洲免费观看高清完整版在线观看熊| 精品欧美一区二区在线观看| 欧美日韩高清一区二区不卡 | 免费观看一级特黄欧美大片| 亚洲欧美另类小说| 国产精品电影一区二区三区| 久久久不卡影院| 久久亚洲综合色一区二区三区| 911国产精品| 欧美伦理电影网| 精品视频999| 欧美日韩一区二区欧美激情| 91搞黄在线观看| 91久久奴性调教| 91在线视频播放地址| 99热精品一区二区| 99麻豆久久久国产精品免费优播| 国产成人av一区二区三区在线观看| 激情综合五月婷婷| 国内久久精品视频| 国产精品羞羞答答xxdd| 国产精品影视网| 国产盗摄女厕一区二区三区| 国产精品123区| 成人免费电影视频| 不卡一区二区三区四区| 成人av网在线| 日本道精品一区二区三区| 在线视频一区二区三| 欧美午夜电影一区| 欧美肥妇free| 26uuu国产在线精品一区二区| 精品va天堂亚洲国产| 欧美国产在线观看| 亚洲乱码中文字幕综合| 亚洲综合在线五月| 日韩高清在线观看| 国内精品第一页| 成人福利视频网站| 欧美综合久久久| 91精品国产色综合久久不卡电影 | 国产精品久久久久久久蜜臀 | 日韩免费电影一区| 国产欧美日韩久久| 一区二区三区中文在线| 日韩国产欧美一区二区三区| 国产在线国偷精品免费看| 成人福利视频在线看| 一本色道亚洲精品aⅴ| 3d成人动漫网站| 国产无一区二区| 国产馆精品极品| 91在线视频播放| 日韩一区二区在线播放| 国产欧美一区二区精品久导航| 综合自拍亚洲综合图不卡区| 日本sm残虐另类| 床上的激情91.| 欧美欧美欧美欧美| 久久久精品人体av艺术| 一区二区三区四区乱视频| 久久精品国产成人一区二区三区 | 国产精品一级黄| 日本久久精品电影| 亚洲精品在线免费播放| 伊人开心综合网| 国产一区二区三区在线观看免费视频| 色综合久久天天综合网| 精品理论电影在线观看| 亚洲狠狠丁香婷婷综合久久久| 看片的网站亚洲| 欧洲激情一区二区| 久久精品人人做人人爽97| 亚洲午夜av在线| 成人精品视频一区| 精品久久久久久最新网址| 亚洲永久精品国产| 成人高清免费在线播放| 宅男噜噜噜66一区二区66| 成人欧美一区二区三区黑人麻豆| 久久精工是国产品牌吗| 日本道色综合久久| 中文字幕一区二区三区在线观看| 精品一区二区免费| 欧美色老头old∨ideo| 国产精品久久二区二区| 国精产品一区一区三区mba桃花 | 亚洲乱码国产乱码精品精98午夜| 精品午夜久久福利影院| 6080国产精品一区二区| 亚洲午夜影视影院在线观看| 9i看片成人免费高清| 久久精品一区二区三区不卡| 日韩和欧美的一区| 欧美日韩亚洲国产综合| 亚洲人成网站精品片在线观看| 国产精品一品二品| ww亚洲ww在线观看国产| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美专区日韩专区| 亚洲欧美日韩成人高清在线一区| 国产精品原创巨作av| 精品国产伦一区二区三区观看方式 | 亚洲精品一线二线三线无人区| 亚洲成人av一区二区三区| 在线亚洲一区观看| 亚洲精品国产无套在线观| 一本久久综合亚洲鲁鲁五月天 | 色偷偷久久一区二区三区| 国产精品美女久久久久av爽李琼 | 丁香婷婷深情五月亚洲| 久久久久九九视频| 国产精品一级黄| 亚洲国产高清在线观看视频| 九一九一国产精品| 久久综合久久久久88| 国模无码大尺度一区二区三区| 日韩一区二区三区视频在线| 美腿丝袜在线亚洲一区| 日韩欧美精品三级| 精品夜夜嗨av一区二区三区| 亚洲精品一区二区三区香蕉 | 国产一区二区三区免费看| 久久蜜桃香蕉精品一区二区三区| 精彩视频一区二区三区| 久久久精品黄色| 成人不卡免费av| 亚洲日本护士毛茸茸| 在线一区二区三区| 日韩精品五月天| 久久综合九色综合欧美98| 国产乱码精品一区二区三区忘忧草 | 欧美国产日韩a欧美在线观看| 国产成人精品aa毛片| 国产精品高清亚洲| 欧美自拍偷拍一区| 蜜臀av一级做a爰片久久| 欧美精品一区二| yourporn久久国产精品| 亚洲男女毛片无遮挡| 欧美精品久久久久久久多人混战| 青娱乐精品在线视频| 日本一区二区三区电影| 一本久道中文字幕精品亚洲嫩| 香蕉久久一区二区不卡无毒影院 | 国产精品久久久爽爽爽麻豆色哟哟| 懂色一区二区三区免费观看| 亚洲综合精品自拍| 精品裸体舞一区二区三区| 成人av第一页| 日韩综合在线视频| 国产欧美日韩精品一区| 色妞www精品视频| 久久er精品视频| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 欧美性大战久久久久久久蜜臀| 麻豆国产欧美日韩综合精品二区| 中文字幕一区在线观看视频| 在线不卡中文字幕播放| 高清不卡一二三区| 视频一区中文字幕| 国产精品久久久久久久久免费桃花 | 日韩欧美国产三级| 91免费版在线| 国精产品一区一区三区mba桃花| 亚洲精品视频一区二区| 精品国产不卡一区二区三区|