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

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

?? fetch.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. *//* * @file * Defines the portions of CPU relating to the fetch stages. */#include <fstream>#include <iostream>#include <iomanip>#include <set>#include <sstream>#include <string>#include <vector>#include "base/cprintf.hh"#include "base/loader/symtab.hh"#include "base/range.hh"#include "encumbered/cpu/full/bpred.hh"#include "encumbered/cpu/full/cpu.hh"#include "encumbered/cpu/full/dd_queue.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/issue.hh"#include "encumbered/cpu/full/spec_state.hh"#include "encumbered/cpu/full/thread.hh"#include "mem/functional/memory_control.hh"#include "mem/mem_interface.hh"#include "sim/param.hh"#include "sim/sim_exit.hh"#include "sim/stats.hh"#if FULL_SYSTEM#include "sim/system.hh"#include "targetarch/vtophys.hh" // can get rid of this when we fix translation#endifusing namespace std;/* *  Local function prototypes */static int rr_compare(const void *first, const void *second);static int icount_compare(const void *first, const void *second);// ==========================================================================////     FetchQueue Implementation////voidFetchQueue::init(FullCPU *cpu, int _size, int _num_threads){    instrs = new fetch_instr_rec_t[_size];    head = tail = 0;    size = _size;    index_mask = _size - 1;    // size must be power of two    if ((_size & index_mask) != 0)	fatal("fetch_queue: size %d not a power of two!\n",	      _size);    num_threads = _num_threads;    mt_frontend = cpu->mt_frontend;    num_valid =	num_reserved =	num_squashed = 0;    for (int i = 0; i < SMT_MAX_THREADS; ++i) {	num_reserved_thread[i] = 0;	num_valid_thread[i] = 0;	num_squashed_thread[i] = 0;    }    for (int i = 0; i < _size; ++i)	instrs[i].inst = NULL;}voidFetchQueue::reserve(int thread){    assert(mt_frontend && thread == num_threads ||	   !mt_frontend && thread >= 0 && thread <= num_threads);    assert(num_total() < size);    num_reserved++;    num_reserved_thread[thread]++;}// append an instruction from an IcacheOutputBuffer to the ifq.// a slot should already have been reserved by incrementing the// num_reserved and num_reserved_thread[] countersvoidFetchQueue::append(DynInst *inst){    int thread_number = inst->thread_number;    fetch_instr_rec_t *frec = &instrs[tail];    tail = incr(tail);    frec->inst = inst;    frec->thread_number = thread_number;    frec->squashed = false;    frec->contents_valid = true;    --num_reserved;    --num_reserved_thread[thread_number];    ++num_valid;    ++num_valid_thread[thread_number];    assert(num_reserved >= 0);    // don't need to increment num_valid or num_valid_thread[]    // since these counts already include reserved slots}DynInst *FetchQueue::pull(){    DynInst *rv = instrs[head].inst;    if (!instrs[head].squashed) {	//	//  instruction was not squashed...	//	--num_valid;	--num_valid_thread[rv->thread_number];	instrs[head].inst = 0;	head = incr(head);    } else {	//	//  instruction WAS squashed...	//	--num_squashed;	--num_squashed_thread[instrs[head].thread_number];	head = incr(head);    }    return rv;}////   Overloaded Function ! ! !////    This version squashes everything in this queuevoidFetchQueue::squash(){    assert(mt_frontend);    if (num_valid) {	int idx = head;	do {	    if (!instrs[idx].squashed) {		unsigned t = instrs[idx].thread_number;		assert(mt_frontend && t == num_threads);		--num_valid;		--num_valid_thread[t];		++num_squashed;		++num_squashed_thread[t];		instrs[idx].squash();	    }	    idx = incr(idx);	} while (idx != tail);	assert(num_valid == 0);    }    num_reserved = 0;    assert(num_valid_thread[num_threads] == 0);    num_reserved_thread[num_threads] = 0;}//// This version squashes instructions from the specified thread in this queue////  should only be used in the non-MT frontend case//voidFetchQueue::squash(int t){    assert(!mt_frontend && t >= 0 && t <= num_threads);    if (num_valid) {	int idx = head;	do {	    if (!instrs[idx].squashed && (instrs[idx].thread_number == t)) {		instrs[idx].squash();		--num_valid;		--num_valid_thread[t];		++num_squashed;		++num_squashed_thread[t];	    }	    idx = incr(idx);	} while (idx != tail);	assert(num_valid_thread[t] == 0);    }    num_reserved -= num_reserved_thread[t];    num_reserved_thread[t] = 0;}voidFetchQueue::dump(const string &str){    cprintf("=======================================================\n");    cprintf("Contents Of Fetch Queue%s:\n", str);    cprintf("fetch_num: %d (%d valid)(%d reserved)(%d squashed)\n",	    num_total(), num_valid, num_reserved, num_squashed);    cprintf("-------------------------------------------------------\n");    cprintf("fetch_head: %d, fetch_tail: %d\n", head, tail);    cprintf("-------------------------------------------------------\n");    for (int i = 0, idx = head; i < num_total(); i++, idx = incr(idx)) {        fetch_instr_rec_t *frec = &(instrs[idx]);        DynInst *inst = frec->inst;	if (frec->squashed) {	    cprintf("%2d:             <squashed>\n", idx);	} else {	    cprintf("%2d: (Thread %d) ", idx, frec->thread_number);	    if (inst)		inst->dump();	    else		cprintf("RESERVED\n");	}    }    cprintf("=======================================================\n\n");}// ==========================================================================/* * The icache_output_buffer structures are per-thread structures that * serve as the destination for outstanding icache accesses.  We read * the actual instructions from memory when we initiate the fetch (in * order to have perfect prediction information); these buffers hold * those instructions while we wait for the actual icache access * delay.  We can't have the ifetch queue serve this purpose, since * icache accesses from different threads may complete out of order, * and we want to put instructions in the ifq in the order they come * back from the icache.  The icache fetch completion event * (FetchCompleteEvent) copies the instructions from the * icache_output_buffer to the ifq when it is processed. */struct IcacheOutputBufferEntry{    DynInst *inst;    bool ready;    // constructor    IcacheOutputBufferEntry() {	inst = NULL;	ready = false;    }};struct IcacheOutputBuffer{    IcacheOutputBufferEntry *insts;    short head;    short tail;    short index_mask;    short num_insts;    short size;    int   thread;    // initialization    void init(int _size, int _thread) {	head = tail = 0;	num_insts = 0;	insts = new IcacheOutputBufferEntry[_size];	index_mask = _size - 1;	// size must be power of two	if ((_size & index_mask) != 0)	    fatal("icache_output_buffer: size %d not a power of two!\n",		  _size);	size = _size;        thread = _thread;    }    // number of available slots    int free_slots() {	return size - num_insts;    }    // increment tail pointer & return tail entry    IcacheOutputBufferEntry *new_tail() {	IcacheOutputBufferEntry *entryp = &insts[tail];	tail = (tail + 1) & index_mask;	num_insts++;	return entryp;    }    // increment a queue index (with wrap)    int incr(int index) {	return ((index + 1) & index_mask);    }    // squash all instructions    void squash(int thread_number);    void dump();};//void fetch_squash_inst(DynInst *inst);voidIcacheOutputBuffer::dump(){    ccprintf(cerr,	     "=========================================================\n"	     "I-Cache Output Buffer (Thread %d)\n"	     "---------------------------------------------------------\n"	     "Head=%d, Tail=%d\n"	     "---------------------------------------------------------\n",	     thread, head, tail);    for (int i = 0, idx = head; i < num_insts; ++i, idx = incr(idx)) {	DynInst *inst = insts[idx].inst;        ccprintf(cerr, "%2d: PC %#08x, Pred_PC %#08x: ",		 idx, inst->PC, inst->Pred_PC);        cerr << inst->staticInst->disassemble(inst->PC);        cerr << "\n";    }    cerr << "=========================================================\n";}voidIcacheOutputBuffer::squash(int thread_number){    for (int i = 0, idx = head; i < num_insts; ++i, idx = incr(idx)) {	IcacheOutputBufferEntry *entryp = &insts[idx];	entryp->inst->squash();	delete entryp->inst;	entryp->inst = NULL;	entryp->ready = false;    }    // buffer is now empty    head = tail;    num_insts = 0;}// ==========================================================================////  This routine does double-duty...//    (1)  Complete initialization of the fetch-list and thread_info structs//    (2)  Re-initilizes the fetch-list on a state change//voidFullCPU::initialize_fetch_list(int initial){    int active_list[SMT_MAX_THREADS];    int inactive_list[SMT_MAX_THREADS];    ThreadListElement temp_list[SMT_MAX_THREADS];    //    //  Initialize the state of the fetch-list & thread_info struct    //    for (int i = 0; i < SMT_MAX_THREADS; i++) {	if (initial) {	    fetch_list[i].thread_number = i;	    fetch_list[i].sort_key = 0;	    fetch_list[i].blocked = 0;	    fetch_list[i].priority = 0;	    fetch_list[i].last_fetch = 0;	    thread_info[i].last_fetch = 0;	    thread_info[i].blocked = false;	    thread_info[i].active = false;	    thread_info[i].fetch_counter = 0;	    thread_info[i].commit_counter = 0;	    thread_info[i].base_commit_count = 0;	    thread_info[i].fetch_average = 0;	    thread_info[i].current_icount = 0;	    thread_info[i].cum_icount = 0;            thread_info[i].recovery_event_pending = false;            thread_info[i].recovery_spec_level = 0;	}	else {	    // only need to initialize these for the non-initial case	    active_list[i] = -1;	    inactive_list[i] = -1;	}    }    //    //  This section of code manipulates the fetch-list such that active    //  threads are at the front of the list, inactive threads are at the    //  bottom of the list.  If the fetch-policy is RR, then the active    //  threads are also sorted by thread priority    //    if (!initial) {	int active_index = 0;	int inactive_index = 0;	int templist_index = 0;	//	//  Place each thread into either the active or inactive list	//	for (int thread = 0; thread < SMT_MAX_THREADS; thread++) {	    if (thread_info[thread].active)		active_list[active_index++] = thread;	    else		inactive_list[inactive_index++] = thread;	}	/*	 *  We make a copy of the current fetch_list in temp_list	 *  => The orderering from the fetch_list MUST be maintianed!!!	 */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91福利国产精品| 国产精品一区二区你懂的| 偷窥少妇高潮呻吟av久久免费| 美腿丝袜亚洲综合| 日韩欧美你懂的| 欧美综合一区二区三区| 亚洲成av人影院| 国产成人福利片| 欧美嫩在线观看| 亚洲免费视频成人| 成人av电影在线网| 久久久久久久精| 免费观看一级欧美片| 欧美亚洲国产一区二区三区va | 在线亚洲精品福利网址导航| 欧美va亚洲va国产综合| 亚洲chinese男男1069| 99精品视频在线观看| 国产视频不卡一区| 看国产成人h片视频| 欧美丰满美乳xxx高潮www| 亚洲一线二线三线视频| 91丨九色丨蝌蚪丨老版| 国产精品高潮呻吟久久| 国产精品一卡二| 久久久久久免费毛片精品| 污片在线观看一区二区| 欧美日韩视频一区二区| 亚洲亚洲精品在线观看| 欧洲激情一区二区| 亚洲午夜在线视频| 欧美性猛片aaaaaaa做受| 欧美日韩一区二区不卡| 国产成人无遮挡在线视频| 欧美一区二区三区色| 亚洲成人免费av| 欧美日韩1234| 视频一区欧美日韩| 欧美一级生活片| 狠狠色狠狠色综合日日91app| 日韩一区二区三区高清免费看看| 性做久久久久久久久| 欧美日韩国产高清一区二区三区 | 日韩精品91亚洲二区在线观看| 欧美性做爰猛烈叫床潮| 亚洲无线码一区二区三区| 欧美日韩一区二区不卡| 免费一级片91| 久久亚洲二区三区| 懂色av一区二区三区免费看| 精品国产在天天线2019| 国产综合色产在线精品| 国产午夜精品久久久久久免费视| 国产福利91精品一区| 国产精品家庭影院| 欧美视频日韩视频在线观看| 日本aⅴ亚洲精品中文乱码| 欧美精品一区二区三区蜜桃| 成人黄色网址在线观看| 一区二区高清免费观看影视大全| 欧美高清激情brazzers| 精品在线一区二区三区| 国产精品国产馆在线真实露脸| 欧美综合一区二区三区| 美女精品一区二区| 亚洲视频在线一区| 欧美一卡2卡3卡4卡| 国产成人亚洲综合a∨猫咪| 亚洲色图欧美在线| 精品少妇一区二区三区日产乱码| 岛国av在线一区| 日韩精品国产精品| 国产精品理论在线观看| 日韩一区二区三区免费观看| 在线观看一区日韩| 亚洲欧美一区二区久久| 欧美日韩不卡在线| 国产精品一区免费视频| 亚洲不卡av一区二区三区| 久久久蜜臀国产一区二区| 在线看国产一区| 国产成人在线网站| 午夜亚洲国产au精品一区二区| 国产欧美日韩在线| 在线播放日韩导航| 91啪九色porn原创视频在线观看| 麻豆一区二区三| 亚洲一区二区三区在线| 久久精品视频在线免费观看| 欧美精品三级在线观看| 97se狠狠狠综合亚洲狠狠| 国内精品国产成人国产三级粉色| 亚洲国产乱码最新视频| 一色屋精品亚洲香蕉网站| 久久精品综合网| 成人高清免费观看| 成人网页在线观看| 日韩电影在线免费观看| 亚洲精品综合在线| 国产精品理伦片| 国产色产综合色产在线视频| 欧美一区二区视频在线观看2020| 在线精品视频免费播放| proumb性欧美在线观看| 国产麻豆精品在线观看| 久久不见久久见免费视频7| 亚洲成人777| 亚洲国产精品久久久男人的天堂| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆 | 偷拍自拍另类欧美| 一区二区在线看| 日韩毛片一二三区| 国产精品无圣光一区二区| 国产日韩v精品一区二区| 久久久亚洲精品一区二区三区| 精品剧情在线观看| 欧美精品一区二区三区一线天视频 | 美国三级日本三级久久99| 石原莉奈在线亚洲二区| 亚洲最新视频在线观看| 一区二区三区中文字幕在线观看| 亚洲激情成人在线| 一区二区三区欧美在线观看| 亚洲一区二区三区视频在线播放| 亚洲最新在线观看| 婷婷国产在线综合| 老司机免费视频一区二区| 国产一区二区在线视频| 丁香六月综合激情| 色综合久久中文字幕综合网 | 欧美嫩在线观看| 欧美一区二区三区公司| 欧美电影免费观看高清完整版 | 精品毛片乱码1区2区3区| 欧美片网站yy| 日韩免费电影网站| 欧美激情一区在线| 国产精品另类一区| 亚洲一区在线观看视频| 日日夜夜精品免费视频| 精久久久久久久久久久| 懂色av一区二区在线播放| 91在线视频免费91| 欧美精品久久天天躁| 久久亚洲春色中文字幕久久久| 国产精品久久久久久久岛一牛影视| 一区二区三区在线视频免费| 日韩成人精品在线观看| 国产91综合一区在线观看| 色乱码一区二区三区88| 欧美成人一区二区| 中文字幕一区二区在线观看| 午夜精品福利久久久| 国产精品18久久久久| 欧美优质美女网站| 亚洲精品一线二线三线| 亚洲美女精品一区| 久久久久久久久伊人| 久久久精品蜜桃| 成人欧美一区二区三区1314| 亚洲图片有声小说| 国产一区二区三区在线观看免费| fc2成人免费人成在线观看播放 | 精品动漫一区二区三区在线观看| 欧美激情一区二区三区| 视频在线观看91| av一区二区久久| 日韩免费成人网| 亚洲综合无码一区二区| 国产乱码精品一区二区三区av | 欧美一区日韩一区| 国产精品美女久久久久久| 麻豆精品国产传媒mv男同| 一本到不卡精品视频在线观看| 久久蜜桃av一区二区天堂| 午夜精品免费在线观看| 99久免费精品视频在线观看| 久久综合九色综合久久久精品综合 | 国产精品伦理一区二区| 日韩一区精品字幕| 91久久人澡人人添人人爽欧美| 久久久99免费| 久久精品国产77777蜜臀| 欧美性色aⅴ视频一区日韩精品| 国产日韩av一区| 国产乱人伦偷精品视频不卡| 日韩一区二区在线观看| 午夜精品久久久久影视| 91精品91久久久中77777| 国产精品久久久久久久久图文区| 国产一区二区三区免费看| 日韩一级片在线观看| 夜夜亚洲天天久久| 在线精品视频一区二区三四| 亚洲精选一二三| 91美女在线看| 日本一二三不卡| 国产suv精品一区二区三区| 国产亚洲欧美激情| 韩国成人在线视频|