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

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

?? decode_impl.hh

?? linux下基于c++的處理器仿真平臺。具有處理器流水線
?? HH
字號:
/* * Copyright (c) 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 "cpu/o3/decode.hh"template<class Impl>SimpleDecode<Impl>::SimpleDecode(Params &params)    : renameToDecodeDelay(params.renameToDecodeDelay),      iewToDecodeDelay(params.iewToDecodeDelay),      commitToDecodeDelay(params.commitToDecodeDelay),      fetchToDecodeDelay(params.fetchToDecodeDelay),      decodeWidth(params.decodeWidth),      numInst(0){    DPRINTF(Decode, "Decode: decodeWidth=%i.\n", decodeWidth);    _status = Idle;}template <class Impl>voidSimpleDecode<Impl>::regStats(){    decodeIdleCycles        .name(name() + ".decodeIdleCycles")        .desc("Number of cycles decode is idle")        .prereq(decodeIdleCycles);    decodeBlockedCycles        .name(name() + ".decodeBlockedCycles")        .desc("Number of cycles decode is blocked")        .prereq(decodeBlockedCycles);    decodeUnblockCycles        .name(name() + ".decodeUnblockCycles")        .desc("Number of cycles decode is unblocking")        .prereq(decodeUnblockCycles);    decodeSquashCycles        .name(name() + ".decodeSquashCycles")        .desc("Number of cycles decode is squashing")        .prereq(decodeSquashCycles);    decodeBranchMispred        .name(name() + ".decodeBranchMispred")        .desc("Number of times decode detected a branch misprediction")        .prereq(decodeBranchMispred);    decodeControlMispred        .name(name() + ".decodeControlMispred")        .desc("Number of times decode detected an instruction incorrectly"              " predicted as a control")        .prereq(decodeControlMispred);    decodeDecodedInsts        .name(name() + ".decodeDecodedInsts")        .desc("Number of instructions handled by decode")        .prereq(decodeDecodedInsts);    decodeSquashedInsts        .name(name() + ".decodeSquashedInsts")        .desc("Number of squashed instructions handled by decode")        .prereq(decodeSquashedInsts);}template<class Impl>voidSimpleDecode<Impl>::setCPU(FullCPU *cpu_ptr){    DPRINTF(Decode, "Decode: Setting CPU pointer.\n");    cpu = cpu_ptr;}template<class Impl>voidSimpleDecode<Impl>::setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr){    DPRINTF(Decode, "Decode: Setting time buffer pointer.\n");    timeBuffer = tb_ptr;    // Setup wire to write information back to fetch.    toFetch = timeBuffer->getWire(0);        // Create wires to get information from proper places in time buffer.    fromRename = timeBuffer->getWire(-renameToDecodeDelay);    fromIEW = timeBuffer->getWire(-iewToDecodeDelay);    fromCommit = timeBuffer->getWire(-commitToDecodeDelay);}template<class Impl>voidSimpleDecode<Impl>::setDecodeQueue(TimeBuffer<DecodeStruct> *dq_ptr){    DPRINTF(Decode, "Decode: Setting decode queue pointer.\n");    decodeQueue = dq_ptr;    // Setup wire to write information to proper place in decode queue.    toRename = decodeQueue->getWire(0);}template<class Impl>voidSimpleDecode<Impl>::setFetchQueue(TimeBuffer<FetchStruct> *fq_ptr){    DPRINTF(Decode, "Decode: Setting fetch queue pointer.\n");    fetchQueue = fq_ptr;    // Setup wire to read information from fetch queue.    fromFetch = fetchQueue->getWire(-fetchToDecodeDelay);}template<class Impl>inline boolSimpleDecode<Impl>::fetchInstsValid(){    return fromFetch->size > 0;}template<class Impl>voidSimpleDecode<Impl>::block(){    DPRINTF(Decode, "Decode: Blocking.\n");    // Set the status to Blocked.    _status = Blocked;    // Add the current inputs to the skid buffer so they can be     // reprocessed when this stage unblocks.    skidBuffer.push(*fromFetch);        // Note that this stage only signals previous stages to stall when    // it is the cause of the stall originates at this stage.  Otherwise    // the previous stages are expected to check all possible stall signals.}template<class Impl>inline voidSimpleDecode<Impl>::unblock(){    DPRINTF(Decode, "Decode: Unblocking, going to remove "            "instructions from skid buffer.\n");    // Remove the now processed instructions from the skid buffer.    skidBuffer.pop();        // If there's still information in the skid buffer, then     // continue to tell previous stages to stall.  They will be     // able to restart once the skid buffer is empty.       if (!skidBuffer.empty()) {        toFetch->decodeInfo.stall = true;    } else {        DPRINTF(Decode, "Decode: Finished unblocking.\n");        _status = Running;    }}// This squash is specifically for when Decode detects a PC-relative branch// was predicted incorrectly.template<class Impl>voidSimpleDecode<Impl>::squash(DynInstPtr &inst){    DPRINTF(Decode, "Decode: Squashing due to incorrect branch prediction "                    "detected at decode.\n");    Addr new_PC = inst->readNextPC();        toFetch->decodeInfo.branchMispredict = true;    toFetch->decodeInfo.doneSeqNum = inst->seqNum;    toFetch->decodeInfo.predIncorrect = true;    toFetch->decodeInfo.squash = true;    toFetch->decodeInfo.nextPC = new_PC;    toFetch->decodeInfo.branchTaken = true;        // Set status to squashing.    _status = Squashing;    // Clear the skid buffer in case it has any data in it.    while (!skidBuffer.empty()) {        skidBuffer.pop();    }    // Squash instructions up until this one    // Slightly unrealistic!    cpu->removeInstsUntil(inst->seqNum);}template<class Impl>voidSimpleDecode<Impl>::squash(){    DPRINTF(Decode, "Decode: Squashing.\n");    // Set status to squashing.    _status = Squashing;    // Maybe advance the time buffer?  Not sure what to do in the normal     // case.        // Clear the skid buffer in case it has any data in it.    while (!skidBuffer.empty())    {        skidBuffer.pop();    }}template<class Impl>voidSimpleDecode<Impl>::tick(){    // Decode should try to execute as many instructions as its bandwidth    // will allow, as long as it is not currently blocked.    if (_status != Blocked && _status != Squashing) {        DPRINTF(Decode, "Decode: Not blocked, so attempting to run "                        "stage.\n");        // Make sure that the skid buffer has something in it if the        // status is unblocking.        assert(_status == Unblocking ? !skidBuffer.empty() : 1);        decode();                // If the status was unblocking, then instructions from the skid        // buffer were used.  Remove those instructions and handle        // the rest of unblocking.                if (_status == Unblocking) {            ++decodeUnblockCycles;            if (fetchInstsValid()) {                // Add the current inputs to the skid buffer so they can be                 // reprocessed when this stage unblocks.                skidBuffer.push(*fromFetch);            }             unblock();        }    } else if (_status == Blocked) {        ++decodeBlockedCycles;        if (fetchInstsValid()) {            block();        }         if (!fromRename->renameInfo.stall &&            !fromIEW->iewInfo.stall &&            !fromCommit->commitInfo.stall) {            DPRINTF(Decode, "Decode: Stall signals cleared, going to "                    "unblock.\n");            _status = Unblocking;            // Continue to tell previous stage to block until this            // stage is done unblocking.            toFetch->decodeInfo.stall = true;        } else {            DPRINTF(Decode, "Decode: Still blocked.\n");            toFetch->decodeInfo.stall = true;        }        if (fromCommit->commitInfo.squash ||            fromCommit->commitInfo.robSquashing) {            squash();        }    } else if (_status == Squashing) {        if (!fromCommit->commitInfo.squash &&            !fromCommit->commitInfo.robSquashing) {            _status = Running;        } else if (fromCommit->commitInfo.squash) {            ++decodeSquashCycles;            squash();        }    }}template<class Impl>voidSimpleDecode<Impl>::decode(){    // Check time buffer if being told to squash.    if (fromCommit->commitInfo.squash) {        squash();        return;    }    // Check time buffer if being told to stall.    if (fromRename->renameInfo.stall ||         fromIEW->iewInfo.stall ||        fromCommit->commitInfo.stall) {        block();        return;    }    // Check fetch queue to see if instructions are available.    // If no available instructions, do nothing, unless this stage is    // currently unblocking.    if (!fetchInstsValid() && _status != Unblocking) {        DPRINTF(Decode, "Decode: Nothing to do, breaking out early.\n");        // Should I change the status to idle?        ++decodeIdleCycles;        return;    }    // Might be better to use a base DynInst * instead?        DynInstPtr inst;    unsigned to_rename_index = 0;    int insts_available = _status == Unblocking ?         skidBuffer.front().size - numInst :        fromFetch->size;    // Debug block...#if 0    if (insts_available) {        DPRINTF(Decode, "Decode: Instructions available.\n");    } else {        if (_status == Unblocking && skidBuffer.empty()) {            DPRINTF(Decode, "Decode: No instructions available, skid buffer "                    "empty.\n");        } else if (_status != Unblocking &&                    !fromFetch->insts[0]) {            DPRINTF(Decode, "Decode: No instructions available, fetch queue "                    "empty.\n");        } else {            panic("Decode: No instructions available, unexpected condition!"                  "\n");        }                }#endif    while (insts_available > 0)    {        DPRINTF(Decode, "Decode: Sending instruction to rename.\n");        inst = _status == Unblocking ? skidBuffer.front().insts[numInst] :                fromFetch->insts[numInst];        DPRINTF(Decode, "Decode: Processing instruction %i with PC %#x\n",                inst->seqNum, inst->readPC());        if (inst->isSquashed()) {            DPRINTF(Decode, "Decode: Instruction %i with PC %#x is "                    "squashed, skipping.\n",                    inst->seqNum, inst->readPC());            ++decodeSquashedInsts;            ++numInst;            --insts_available;            continue;        }        // Also check if instructions have no source registers.  Mark        // them as ready to issue at any time.  Not sure if this check        // should exist here or at a later stage; however it doesn't matter         // too much for function correctness.        // Isn't this handled by the inst queue?        if (inst->numSrcRegs() == 0) {            inst->setCanIssue();        }        // This current instruction is valid, so add it into the decode        // queue.  The next instruction may not be valid, so check to        // see if branches were predicted correctly.        toRename->insts[to_rename_index] = inst;        ++(toRename->size);                // Ensure that if it was predicted as a branch, it really is a        // branch.        if (inst->predTaken() && !inst->isControl()) {            panic("Instruction predicted as a branch!");            ++decodeControlMispred;            // Might want to set some sort of boolean and just do            // a check at the end            squash(inst);            break;        }        // Go ahead and compute any PC-relative branches.        if (inst->isDirectCtrl() && inst->isUncondCtrl()) {            inst->setNextPC(inst->branchTarget());            if (inst->mispredicted()) {                ++decodeBranchMispred;                // Might want to set some sort of boolean and just do                // a check at the end                squash(inst);                break;            }        }        // Normally can check if a direct branch has the right target        // addr (either the immediate, or the branch PC + 4) and redirect        // fetch if it's incorrect.        // Increment which instruction we're looking at.        ++numInst;        ++to_rename_index;        ++decodeDecodedInsts;        --insts_available;    }     numInst = 0;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩女优毛片在线| 欧美精选午夜久久久乱码6080| 偷拍一区二区三区| 精品国产一区久久| 久久看人人爽人人| 99久久精品99国产精品 | 国产欧美一区二区三区沐欲| 宅男噜噜噜66一区二区66| 精品视频一区二区三区免费| 欧美艳星brazzers| 波多野结衣一区二区三区| 国产清纯美女被跳蛋高潮一区二区久久w| 国产日韩亚洲欧美综合| 三级欧美在线一区| 欧美视频在线一区| 国产精品久久久久aaaa樱花| 国产一区二区三区免费播放| 91精品国产综合久久香蕉的特点| 1024成人网| 国产成人免费视| 精品国产一区a| 蜜臀av一级做a爰片久久| 欧美性猛交一区二区三区精品| 中文字幕日韩一区| www.综合网.com| 国产精品天干天干在观线| 久久99国产精品成人| 欧美一区二区日韩| 日日夜夜免费精品| 欧美疯狂性受xxxxx喷水图片| 亚洲一区二区在线免费看| 色88888久久久久久影院按摩 | 欧美三级资源在线| 综合久久综合久久| 成人av综合一区| 中文字幕一区二区三区精华液| 成人久久久精品乱码一区二区三区| 久久久久久99久久久精品网站| 韩国成人精品a∨在线观看| 日韩女优av电影| 狠狠色丁香婷综合久久| 欧美精品一区在线观看| 国产91精品一区二区麻豆网站| 亚洲国产欧美日韩另类综合| 欧美综合天天夜夜久久| 一区二区欧美视频| 欧美视频日韩视频在线观看| 丝袜国产日韩另类美女| 精品少妇一区二区三区日产乱码 | 国产清纯美女被跳蛋高潮一区二区久久w | 亚洲影视在线播放| 555夜色666亚洲国产免| 久久激情五月激情| 国产精品萝li| 欧美体内she精高潮| 免费观看91视频大全| 久久综合久久综合亚洲| 成人99免费视频| 一区二区视频在线看| 欧美日韩一区国产| 国产一区二三区好的| 国产精品成人午夜| 欧美日韩精品一二三区| 麻豆一区二区三| 国产精品天美传媒| 4438亚洲最大| 成人午夜视频网站| 日精品一区二区| 中文一区二区在线观看| 欧美日韩dvd在线观看| 国产伦精品一区二区三区视频青涩 | 国内成人免费视频| 亚洲男人的天堂网| 精品国产乱码久久久久久影片| 成人avav在线| 久久99精品久久久久久国产越南| 日韩一区日韩二区| 日韩欧美高清一区| 欧美在线一二三| 国产精品18久久久久久久久久久久 | 2020国产精品自拍| 欧美性色欧美a在线播放| 国产一区二区三区精品欧美日韩一区二区三区 | 欧美三级视频在线观看| 国产一区二区久久| 日本亚洲天堂网| 亚洲少妇30p| 久久欧美一区二区| 欧美一区二区三区思思人| www.日韩在线| 国产精品香蕉一区二区三区| 天堂精品中文字幕在线| 亚洲蜜臀av乱码久久精品蜜桃| 精品久久久久久综合日本欧美 | 亚洲精品国产一区二区三区四区在线| 日韩欧美国产1| 欧美一区二区在线免费播放| 色999日韩国产欧美一区二区| 国产**成人网毛片九色 | 亚洲高清视频在线| 中文字幕一区二区三区av| 国产色一区二区| 日韩免费一区二区| 69堂亚洲精品首页| 777久久久精品| 欧美日韩一本到| 欧美日韩三级一区二区| 色先锋aa成人| 在线区一区二视频| 一本一本大道香蕉久在线精品| www.99精品| 99久久亚洲一区二区三区青草| 国产激情视频一区二区在线观看 | 国产成人免费在线观看不卡| 蜜臀av一区二区| 麻豆精品在线观看| 久草中文综合在线| 久久99精品久久久久久| 日韩高清电影一区| 免费在线观看视频一区| 久久精品国产澳门| 久久国产福利国产秒拍| 国产一区二区三区免费| 国产福利精品一区二区| 7777精品伊人久久久大香线蕉的 | 国产一区二区三区四区五区入口 | 91老师片黄在线观看| 91久久精品网| 欧美亚洲尤物久久| 欧美日韩五月天| 日韩免费一区二区| 欧美激情综合在线| 国产精品的网站| 亚洲国产成人91porn| 爽好多水快深点欧美视频| 久久精品国产亚洲aⅴ| 国产最新精品免费| k8久久久一区二区三区| 欧美体内she精高潮| 日韩欧美高清一区| 国产精品国产三级国产普通话三级| 亚洲欧洲国产专区| 午夜影院久久久| 国产精品综合av一区二区国产馆| 成人永久aaa| 欧美日韩国产在线播放网站| 日韩免费看的电影| 中文字幕亚洲视频| 日韩av中文在线观看| 国产精品亚洲а∨天堂免在线| 色综合中文综合网| 欧美一级搡bbbb搡bbbb| 国产农村妇女精品| 亚洲午夜久久久久久久久久久 | 一区二区三区日本| 美腿丝袜亚洲三区| 99精品视频在线免费观看| 欧美精品vⅰdeose4hd| 日本一区二区三区视频视频| 亚洲一二三四区不卡| 国产福利一区在线| 欧美精品丝袜中出| 国产精品久久三区| 久久不见久久见免费视频1| av电影天堂一区二区在线观看| 91精品国产综合久久久久久久| 国产欧美日韩精品一区| 日韩精品乱码免费| 91网站最新地址| 久久久www免费人成精品| 亚洲国产综合91精品麻豆| 丰满少妇久久久久久久| 精品日韩一区二区三区免费视频| 夜夜嗨av一区二区三区四季av| 国产激情视频一区二区在线观看 | 欧美精品v国产精品v日韩精品| 国产精品私人自拍| 激情综合五月婷婷| 欧美日韩极品在线观看一区| 中文字幕久久午夜不卡| 国产一区二区三区综合| 91精品久久久久久蜜臀| 亚洲一区二区三区精品在线| 成人av先锋影音| 久久久久97国产精华液好用吗| 日本三级韩国三级欧美三级| 色爱区综合激月婷婷| 国产精品精品国产色婷婷| 成熟亚洲日本毛茸茸凸凹| 26uuu国产日韩综合| 蜜臀久久99精品久久久久宅男| 欧美日韩久久久一区| 亚洲一区二区三区在线看| 色偷偷久久一区二区三区| 亚洲三级在线播放| av日韩在线网站| 中文字幕一区二区在线播放| 成人激情黄色小说| 国产精品免费av| 97久久超碰国产精品|