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

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

?? bpred.cc

?? linux下基于c++的處理器仿真平臺。具有處理器流水線
?? CC
?? 第 1 頁 / 共 3 頁
字號:
{    int ctr = *ctrp;    if (incr && ctr < 3) {	++(*ctrp);	return;    }    if (!incr && ctr > 0) {	--(*ctrp);	return;    }}// update the branch predictor, only useful for stateful predictors;// updates entry for instruction type OP at address BADDR.  BTB only// gets updated for branches which are taken.  Inst was determined to// jump to address BTARGET and was taken if TAKEN is non-zero.// Predictor statistics are updated with result of prediction,// indicated by CORRECT and PRED_TAKEN, predictor state to be updated// is indicated by *DIR_UPDATE_PTR (may be NULL for jumps, which// shouldn't modify state bits).  Note if bpred_update is done// speculatively, branch-prediction may get polluted.voidBranchPred::update( int thread,	/* thread ID */		    Addr baddr,	/* branch address */		    Addr btarget,	/* resolved branch target */		    int taken,		/* non-zero if branch was taken */		    int pred_taken,	/* non-zero if branch was pred taken */		    int correct,	/* was earlier addr prediction ok? */		    const StaticInstBasePtr &brInst, /* static instruction */		    BPredUpdateRec *brstate){				/* pred state pointer */    BTBEntry *pbtb = NULL;    BTBEntry *lruhead = NULL, *lruitem = NULL;    int index, i;    unsigned pred_state_idx;    /* For redundant lagging threads, we can optionally turn off     * some or all of the updates.  The following flags control     * this.  Assume we'll update everything unless we decide otherwise. */    bool update_local_hist = true;    bool update_counters = true;    bool update_btb = true;    /* if we didn't use the predictor on this branch (for     * leading-thread predictions) don't update */    if (!brstate->used_predictor)	return;    /* don't change bpred state for non-branch instructions */    if (!brInst->isControl())	return;#if BP_VERBOSE    ccprintf(cerr, "UP: %#08X (cycle %n) ", baddr, curTick);#endif    if (brInst->isCondCtrl()) {	/* conditional branch: update predictor & record statistics */	unsigned int bindex = baddr >> BranchPredAddrShiftAmt;#if BP_VERBOSE	ccprintf(cerr, "COND   ");#endif	cond_predicted[thread]++;	if (taken == pred_taken) {	    cond_correct[thread]++;#if BP_VERBOSE	    ccprintf(cerr, "C ");	} else {	    ccprintf(cerr, "I ");#endif	}	/*	 *  UPDATE LOCAL PREDICTOR	 *	 */	if (local_pred_table) {	    unsigned local_bindex = bindex;	    local_bindex &= (num_local_hist_regs - 1);	    /* update counter used for this branch */	    if (update_counters)		update_ctr(&local_pred_table[brstate->local_pidx], taken);	    /* update history shift register */	    if (update_local_hist)		local_hist_regs[local_bindex] =		    (((local_hist_regs[local_bindex] << 1) | taken)		     & NBIT_MASK(local_hist_bits));#if BP_VERBOSE	    ccprintf(cerr, "LH=%#08X IDX=%#08X CT=%1d ",		     local_hist_regs[local_bindex], brstate->local_pidx,		     local_pred_table[brstate->local_pidx]);#endif	}	/*	 *  UPDATE GLOBAL PREDICTOR	 *	 */	if (global_pred_table) {	    if (update_counters)		update_ctr(&global_pred_table[brstate->global_pidx],			   taken);#if BP_VERBOSE	    ccprintf(cerr, "GIDX=%#08X CT=%1d ", brstate->global_pidx,		    global_pred_table[brstate->global_pidx]);#endif	    /* shift reg was already updated speculatively in bpred_lookup() */	}	/*	 *  UPDATE META PREDICTOR	 *	 */	if (meta_pred_table) {	    bool local_pred = ((brstate->pred_state & 0x8) == 0x8);	    bool global_pred = ((brstate->pred_state & 0x2) == 0x2);	    /* update meta-predictor only if global & local disagreed */	    if (local_pred != global_pred && update_counters) {		/* increment if local predictor was correct, decrement if		 * global was correct */		update_ctr(&meta_pred_table[brstate->meta_pidx],			   local_pred == taken);#if BP_VERBOSE		ccprintf(cerr, "MIDX=%#08X CT=%1d ", brstate->meta_pidx,			 meta_pred_table[brstate->meta_pidx]);	    } else {		ccprintf(cerr, "No_Meta_Update         ");#endif	    }	}	/*	 *	 *  Update Confidence stuff	 *	 */	if (conf_pred_enable) {	    pred_state_idx = brstate->pred_state;	    if (conf_pred_table) {		uint8_t *conf_pred_ctr =		    &(conf_pred_table[brstate->conf_pidx]);		//  BPred was correct: Increment the counter if we		//                     haven't maxed out		//  BPred was wrong:   Reset the counter		if (taken == pred_taken) {		    corr_conf_dist.sample(brstate->conf_value);		    // correct prediction		    if (brstate->conf_result == CONF_HIGH)			conf_chc[thread]++;	// high confidence		    else			conf_clc[thread]++;	// low confidence		    if (*conf_pred_ctr < ((1 << conf_pred_ctr_bits) - 1))			(*conf_pred_ctr)++;		} else {		    incorr_conf_dist.sample(brstate->conf_value);		    // incorrect prediction		    if (brstate->conf_result == CONF_HIGH)			conf_ihc[thread]++;	// high confidence		    else			conf_ilc[thread]++;	// low confidence		    switch (conf_pred_ctr_type) {		    case CNT_RESET:			*conf_pred_ctr = 0;			break;		    case CNT_SAT:			if (*conf_pred_ctr > 0)			    (*conf_pred_ctr)--;			break;		    }		}	    } else {		//  Must be using small predictor...		if (taken == pred_taken) {		    // correct prediction		    if (brstate->conf_result == CONF_HIGH)			conf_chc[thread]++;	// high confidence		    else			conf_clc[thread]++;	// low confidence		} else {		    // incorrect prediction		    if (brstate->conf_result == CONF_HIGH)			conf_ihc[thread]++;	// high confidence		    else			conf_ilc[thread]++;	// low confidence		}		// first six bits are prediction state, last bit is		// correct/incorrect		if (conf_pred_ctr_thresh >= 0) {		    // using dynamic assignment		    if (taken == pred_taken) {			// correct prediction			if (conf_table[pred_state_idx] <			    ((1 << conf_pred_ctr_bits) - 1))			    conf_table[pred_state_idx]++;		    } else {			// incorrect prediction			if (conf_pred_ctr_type == CNT_SAT)			    if (conf_table[pred_state_idx] > 0)				conf_table[pred_state_idx]--;			else			    conf_table[pred_state_idx] = 0;		    }		}	    }	    /*	     *  Update the big predictor table for all cases	     */	    if (taken == pred_taken) {		//  correct prediction		pred_state[PS_CORRECT][pred_state_idx]++;		if (brstate->conf_result == CONF_HIGH)		    pred_state[PS_HC_COR][pred_state_idx]++;		if (brstate->conf_result == CONF_LOW)		    pred_state[PS_LC_COR][pred_state_idx]++;	    } else {		//  incorrect prediction		pred_state[PS_INCORRECT][pred_state_idx]++;		if (brstate->conf_result == CONF_HIGH)		    pred_state[PS_HC_INCOR][pred_state_idx]++;		if (brstate->conf_result == CONF_LOW)		    pred_state[PS_LC_INCOR][pred_state_idx]++;	    }	    if (brstate->conf_result == CONF_HIGH)		pred_state[PS_HIGH_CONF][pred_state_idx]++;	    if (brstate->conf_result == CONF_LOW)		pred_state[PS_LOW_CONF][pred_state_idx]++;	}#if BP_VERBOSE	ccprintf(cerr, "\n");    } else {	ccprintf(cerr, "UNCOND \n");#endif    }    if (taken) {	if (brstate->used_ras) {	    /* used RAS... */	    used_ras[thread]++;	    DPRINTF(BPredRAS, "RAS update br %#x tgt %#x %s\n", baddr, btarget,		     correct ? "correct" : "incorrect");	    if (correct)		ras_correct[thread]++;	    /* no need to update BTB */	    return;	}	if (brstate->used_btb) {	    used_btb[thread]++;	    if (correct)		btb_correct[thread]++;	}	/* update BTB */	if (update_btb) {	    index = (baddr >> BranchPredAddrShiftAmt) & (btb.sets - 1);	    if (btb.assoc > 1) {		index *= btb.assoc;		/* Now we know the set; look for a PC match; also identify		 * MRU and LRU items */		for (i = index; i < (index + btb.assoc); i++) {		    if (btb.btb_data[i].addr == baddr) {			/* match */			assert(!pbtb);			pbtb = &btb.btb_data[i];		    }		    dassert(btb.btb_data[i].prev			    != btb.btb_data[i].next);		    if (btb.btb_data[i].prev == NULL) {			/* this is the head of the lru list, ie			 * current MRU item */			dassert(lruhead == NULL);			lruhead = &btb.btb_data[i];		    }		    if (btb.btb_data[i].next == NULL) {			/* this is the tail of the lru list, ie the LRU item */			dassert(lruitem == NULL);			lruitem = &btb.btb_data[i];		    }		}		dassert(lruhead && lruitem);		if (!pbtb)		    /* missed in BTB; choose the LRU item in this set		     * as the victim */		    pbtb = lruitem;		/* else hit, and pbtb points to matching BTB entry */		/* Update LRU state: selected item, whether selected		 * because it matched or because it was LRU and		 * selected as a victim, becomes MRU */		if (pbtb != lruhead) {		    /* this splices out the matched entry... */		    if (pbtb->prev)			pbtb->prev->next = pbtb->next;		    if (pbtb->next)			pbtb->next->prev = pbtb->prev;		    /* ...and this puts the matched entry at the head */		    pbtb->next = lruhead;		    pbtb->prev = NULL;		    lruhead->prev = pbtb;		    dassert(pbtb->prev || pbtb->next);		    dassert(pbtb->prev != pbtb->next);		}		/* else pbtb is already MRU item; do nothing */	    } else {		/* direct-mapped BTB */		pbtb = &btb.btb_data[index];	    }	    if (pbtb) {		/* update current information */		if (pbtb->addr == baddr) {		    if (!correct)			pbtb->target = btarget;		} else {		    /* enter a new branch in the table */		    pbtb->addr = baddr;		    pbtb->target = btarget;		}	    }	}    }}/** * Pop top element off of return address stack.  Used to fix up RAS * after a SkipFuncEvent (see pc_event.cc). */voidBranchPred::popRAS(int thread){    ReturnAddrStack *ras = &retAddrStack[thread];#if TRACING_ON    int old_tos = ras->tos;#endif    ras->tos--;    if (ras->tos < 0)	ras->tos = ras_size - 1;    DPRINTF(BPredRAS, "RAS pop %d -> %d\n", old_tos, ras->tos);}BEGIN_DECLARE_SIM_OBJECT_PARAMS(BranchPred)    SimpleEnumParam<BPredClass> pred_class;    Param<unsigned> global_hist_bits;    Param<unsigned> global_index_bits;    Param<bool> global_xor;    Param<unsigned> local_hist_regs;    Param<unsigned> local_hist_bits;    Param<unsigned> local_index_bits;    Param<bool> local_xor;    Param<unsigned> choice_index_bits;    Param<bool> choice_xor;    Param<unsigned> btb_size;    Param<unsigned> btb_assoc;    Param<unsigned> ras_size;    Param<bool> conf_pred_enable;    Param<unsigned> conf_pred_index_bits;    Param<unsigned> conf_pred_ctr_bits;    Param<int> conf_pred_ctr_thresh;    Param<bool> conf_pred_xor;    SimpleEnumParam<ConfCounterType> conf_pred_ctr_type;END_DECLARE_SIM_OBJECT_PARAMS(BranchPred)// parameter strings for enum BPredClassconst char *bpred_class_strings[] ={    "hybrid", "global", "local"};// parameter strings for enum ConfCounterTypeconst char *conf_counter_type_strings[] ={    "resetting", "saturating"};BEGIN_INIT_SIM_OBJECT_PARAMS(BranchPred)    INIT_ENUM_PARAM(pred_class, "predictor class",		    bpred_class_strings),    INIT_PARAM(global_hist_bits, "global predictor history reg bits"),    INIT_PARAM(global_index_bits, "global predictor index bits"),    INIT_PARAM(global_xor, "XOR global hist w/PC (false: concatenate)"),    INIT_PARAM(local_hist_regs, "num. local predictor history regs"),    INIT_PARAM(local_hist_bits, "local predictor history reg bits"),    INIT_PARAM(local_index_bits, "local predictor index bits"),    INIT_PARAM(local_xor, "XOR local hist w/PC (false: concatenate)"),    INIT_PARAM(choice_index_bits, "choice predictor index bits"),    INIT_PARAM(choice_xor, "XOR choice hist w/PC (false: concatenate)"),    INIT_PARAM(btb_size, "number of entries in BTB"),    INIT_PARAM(btb_assoc, "BTB associativity"),    INIT_PARAM(ras_size, "return address stack size"),    INIT_PARAM_DFLT(conf_pred_enable, "enable confidence predictor", false),    INIT_PARAM(conf_pred_index_bits, "confidence predictor index bits"),    INIT_PARAM(conf_pred_ctr_bits, "confidence predictor counter bits"),    INIT_PARAM(conf_pred_ctr_thresh, "confidence predictor threshold"),    INIT_PARAM(conf_pred_xor, "XOR confidence predictor bits"),    INIT_ENUM_PARAM(conf_pred_ctr_type, "confidence predictor type",		    conf_counter_type_strings)END_INIT_SIM_OBJECT_PARAMS(BranchPred)CREATE_SIM_OBJECT(BranchPred){    // These flags are used to avoid evaluating parameters that have    // no meaning in a given context (like global predictor parameters    // when the selected predictor type is local).  It would be neater    // to have different subclasses for the different predictor types,    // but (1) it would be too big a rewrite of this old code, (2) we    // never really use anything but the hybrid predictor anyway, and    // (3) the performance hit from virtualizing all the BPred calls    // might be noticeable.    bool need_local  = pred_class == BPredComb || pred_class == BPredLocal;    bool need_global = pred_class == BPredComb || pred_class == BPredGlobal;    bool need_meta = pred_class == BPredComb;    bool need_conf = conf_pred_enable;    return new BranchPred(getInstanceName(),			  pred_class,			  need_global ? global_hist_bits : 0,			  need_global ? global_index_bits : 0,			  need_global ? global_xor : false,			  need_local ? local_hist_regs : 0,			  need_local ? local_hist_bits : 0,			  need_local ? local_index_bits : 0,			  need_local ? local_xor : false,			  need_meta ? choice_index_bits : 0,			  need_meta ? choice_xor : false,			  btb_size / btb_assoc, btb_assoc,			  ras_size,			  conf_pred_enable,			  need_conf ? conf_pred_index_bits : 0,			  need_conf ? conf_pred_ctr_bits : 0,			  need_conf ? conf_pred_ctr_thresh : 0,			  need_conf ? conf_pred_xor : false,			  need_conf ? conf_pred_ctr_type : CNT_RESET);}REGISTER_SIM_OBJECT("BranchPred", BranchPred)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
**欧美大码日韩| 日韩主播视频在线| 婷婷综合在线观看| 国产成人h网站| 欧美日韩久久久一区| 久久九九99视频| 免费精品视频在线| 日本乱码高清不卡字幕| 国产嫩草影院久久久久| 欧美aaaaa成人免费观看视频| 色综合久久九月婷婷色综合| 久久久久久久久久久久久夜| 日韩精品福利网| 色欧美乱欧美15图片| 国产欧美日韩中文久久| 麻豆国产欧美一区二区三区| 欧美日韩亚洲综合在线| 亚洲欧美日韩国产成人精品影院| 国产成人精品在线看| 精品噜噜噜噜久久久久久久久试看 | 欧美在线视频不卡| 亚洲欧美视频在线观看视频| 风间由美一区二区三区在线观看| 欧美一区二区三区喷汁尤物| 三级影片在线观看欧美日韩一区二区 | 欧美日韩你懂的| 亚洲最快最全在线视频| 日本韩国欧美国产| 亚洲日韩欧美一区二区在线| 波多野结衣视频一区| 国产三级精品视频| 极品少妇一区二区三区精品视频 | 蜜臀av一区二区在线免费观看| 色婷婷av一区二区三区大白胸 | 亚洲成在线观看| 欧美视频一区二区三区四区 | 亚洲婷婷国产精品电影人久久| 国产成人自拍高清视频在线免费播放| 精品久久久久久久久久久久包黑料| 蜜臀av国产精品久久久久| 777色狠狠一区二区三区| 日本亚洲视频在线| 日韩免费在线观看| 国内偷窥港台综合视频在线播放| 欧美成va人片在线观看| 国产一区欧美一区| 中文字幕免费不卡在线| a在线播放不卡| 一区二区三区高清不卡| 欧美日韩高清在线播放| 日韩av一区二区三区四区| 欧美一区二区三区四区五区| 麻豆91精品视频| 久久精品亚洲乱码伦伦中文| 9i看片成人免费高清| 亚洲一区二区欧美| 日韩欧美综合一区| 成人激情小说乱人伦| 亚洲一区二区三区四区在线观看 | 日韩精品中文字幕在线一区| 国产高清精品网站| 一级精品视频在线观看宜春院 | 欧美日韩亚洲不卡| 久久99精品国产麻豆不卡| 国产精品乱人伦| 欧美日韩精品一区二区三区蜜桃| 九九精品视频在线看| 中文字幕一区二区三区在线播放| 欧美性猛交xxxxxx富婆| 国产一区中文字幕| 亚洲免费观看视频| 精品国产制服丝袜高跟| 91麻豆福利精品推荐| 免费看黄色91| 亚洲精品视频免费看| 欧美成人精品3d动漫h| 成人免费毛片高清视频| 日韩福利电影在线| 国产精品理伦片| 91精品国产综合久久福利| 成人av免费在线播放| 视频在线观看91| 亚洲日本中文字幕区| 久久久欧美精品sm网站| 欧美日韩一级大片网址| 91色视频在线| 国产一区欧美日韩| 美女视频黄久久| 亚洲精品国产成人久久av盗摄| 久久久精品欧美丰满| 日韩三级中文字幕| 欧美视频中文字幕| 色综合天天性综合| 国产成人在线电影| 麻豆国产一区二区| 日韩精品一级中文字幕精品视频免费观看 | jlzzjlzz国产精品久久| 麻豆极品一区二区三区| 婷婷国产在线综合| 亚洲一区在线观看视频| 亚洲色图另类专区| 中文字幕一区二区三区在线不卡 | 日本网站在线观看一区二区三区| 国产a精品视频| 久久99国产精品免费网站| 欧美日本国产一区| 不卡视频一二三| 九色综合狠狠综合久久| 欧美一区二区二区| 精品国产123| 亚洲国产日韩一级| 亚洲乱码国产乱码精品精98午夜 | 在线观看亚洲专区| 成人国产精品视频| 成人污视频在线观看| 国产精品一线二线三线| 国产在线日韩欧美| 国产精品中文有码| 国产麻豆一精品一av一免费| 精品一区二区久久久| 久久精品国产77777蜜臀| 九九九精品视频| 国产精品自拍三区| 成人国产亚洲欧美成人综合网 | 亚洲综合精品自拍| 一区二区三区四区精品在线视频 | 欧美日韩精品高清| 91麻豆精品国产91久久久久| 欧美高清精品3d| 日韩欧美成人午夜| 国产精品嫩草影院av蜜臀| 国产精品情趣视频| 1区2区3区国产精品| 亚洲综合精品久久| 日本午夜一区二区| 国产永久精品大片wwwapp| 成人免费视频国产在线观看| 色香蕉久久蜜桃| 91精品国产色综合久久不卡电影| 日韩一级二级三级| 国产欧美一区二区精品性色超碰| 亚洲欧美日韩电影| 久久精品久久99精品久久| 国产成人精品三级麻豆| 在线观看日产精品| 精品少妇一区二区| 国产精品久久看| 日韩国产欧美在线观看| 国产不卡在线播放| 欧美另类变人与禽xxxxx| 精品国产一区二区三区久久影院| 国产精品系列在线| 五月婷婷久久综合| 国产99久久久精品| 欧美精品aⅴ在线视频| 久久精品人人做人人爽97| 亚洲成人av中文| 成人激情动漫在线观看| 欧美精品三级日韩久久| 国产精品免费免费| 麻豆精品视频在线观看免费| av不卡免费电影| 精品国产123| 无吗不卡中文字幕| 99久久99久久久精品齐齐| 在线电影欧美成精品| 国产精品久久久久久久久久久免费看| 丝袜美腿高跟呻吟高潮一区| 国产福利一区在线观看| 91精品久久久久久久91蜜桃| 中文字幕视频一区| 久久99国产精品成人| 欧美日韩精品综合在线| 中文字幕日韩一区| 国内精品久久久久影院色| 欧美日本韩国一区二区三区视频| 成人欧美一区二区三区视频网页 | 狠狠色丁香婷综合久久| 欧美视频在线观看一区| 亚洲人精品午夜| 成人一区二区三区视频在线观看 | 韩国成人福利片在线播放| 欧美午夜寂寞影院| 亚洲色图一区二区三区| 成人h动漫精品| 国产欧美一区二区精品性| 久久精品国产精品亚洲精品| 精品视频在线看| 亚洲影院久久精品| 91在线无精精品入口| 中文字幕二三区不卡| 国产成人综合亚洲网站| 一本久道中文字幕精品亚洲嫩| 喷白浆一区二区| 亚洲免费观看高清| 亚洲三级久久久| 国产亚洲精品资源在线26u| 精品国产乱码久久久久久老虎| 91性感美女视频| 亚洲女与黑人做爰|