iew.hh revision 10333
11689SN/A/* 210333Smitch.hayenga@arm.com * Copyright (c) 2010-2012, 2014 ARM Limited 37782Sminkyu.jeong@arm.com * All rights reserved 47782Sminkyu.jeong@arm.com * 57782Sminkyu.jeong@arm.com * The license below extends only to copyright in the software and shall 67782Sminkyu.jeong@arm.com * not be construed as granting a license to any other intellectual 77782Sminkyu.jeong@arm.com * property including but not limited to intellectual property relating 87782Sminkyu.jeong@arm.com * to a hardware implementation of the functionality of the software 97782Sminkyu.jeong@arm.com * licensed hereunder. You may use the software subject to the license 107782Sminkyu.jeong@arm.com * terms below provided that you ensure that this notice is replicated 117782Sminkyu.jeong@arm.com * unmodified and in its entirety in all distributions of the software, 127782Sminkyu.jeong@arm.com * modified or unmodified, in source code or in binary form. 137782Sminkyu.jeong@arm.com * 142326SN/A * Copyright (c) 2004-2006 The Regents of The University of Michigan 151689SN/A * All rights reserved. 161689SN/A * 171689SN/A * Redistribution and use in source and binary forms, with or without 181689SN/A * modification, are permitted provided that the following conditions are 191689SN/A * met: redistributions of source code must retain the above copyright 201689SN/A * notice, this list of conditions and the following disclaimer; 211689SN/A * redistributions in binary form must reproduce the above copyright 221689SN/A * notice, this list of conditions and the following disclaimer in the 231689SN/A * documentation and/or other materials provided with the distribution; 241689SN/A * neither the name of the copyright holders nor the names of its 251689SN/A * contributors may be used to endorse or promote products derived from 261689SN/A * this software without specific prior written permission. 271689SN/A * 281689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 291689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 301689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 311689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 321689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 331689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 341689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 351689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 361689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 371689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 381689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 392665Ssaidi@eecs.umich.edu * 402665Ssaidi@eecs.umich.edu * Authors: Kevin Lim 411689SN/A */ 421689SN/A 432292SN/A#ifndef __CPU_O3_IEW_HH__ 442292SN/A#define __CPU_O3_IEW_HH__ 451060SN/A 461060SN/A#include <queue> 478230Snate@binkert.org#include <set> 481060SN/A 491461SN/A#include "base/statistics.hh" 501717SN/A#include "cpu/o3/comm.hh" 518229Snate@binkert.org#include "cpu/o3/lsq.hh" 522292SN/A#include "cpu/o3/scoreboard.hh" 538229Snate@binkert.org#include "cpu/timebuf.hh" 548232Snate@binkert.org#include "debug/IEW.hh" 5510023Smatt.horsnell@ARM.com#include "sim/probe/probe.hh" 561060SN/A 578737Skoansin.tan@gmail.comstruct DerivO3CPUParams; 582292SN/Aclass FUPool; 592292SN/A 602292SN/A/** 612326SN/A * DefaultIEW handles both single threaded and SMT IEW 622326SN/A * (issue/execute/writeback). It handles the dispatching of 632326SN/A * instructions to the LSQ/IQ as part of the issue stage, and has the 642326SN/A * IQ try to issue instructions each cycle. The execute latency is 652326SN/A * actually tied into the issue latency to allow the IQ to be able to 662292SN/A * do back-to-back scheduling without having to speculatively schedule 672326SN/A * instructions. This happens by having the IQ have access to the 682326SN/A * functional units, and the IQ gets the execution latencies from the 692326SN/A * FUs when it issues instructions. Instructions reach the execute 702326SN/A * stage on the last cycle of their execution, which is when the IQ 712326SN/A * knows to wake up any dependent instructions, allowing back to back 722326SN/A * scheduling. The execute portion of IEW separates memory 732326SN/A * instructions from non-memory instructions, either telling the LSQ 742326SN/A * to execute the instruction, or executing the instruction directly. 752326SN/A * The writeback portion of IEW completes the instructions by waking 762326SN/A * up any dependents, and marking the register ready on the 772326SN/A * scoreboard. 782292SN/A */ 791681SN/Atemplate<class Impl> 802292SN/Aclass DefaultIEW 811060SN/A{ 821060SN/A private: 831060SN/A //Typedefs from Impl 841061SN/A typedef typename Impl::CPUPol CPUPol; 851061SN/A typedef typename Impl::DynInstPtr DynInstPtr; 862733Sktlim@umich.edu typedef typename Impl::O3CPU O3CPU; 871060SN/A 881681SN/A typedef typename CPUPol::IQ IQ; 891061SN/A typedef typename CPUPol::RenameMap RenameMap; 902292SN/A typedef typename CPUPol::LSQ LSQ; 911060SN/A 921061SN/A typedef typename CPUPol::TimeStruct TimeStruct; 931061SN/A typedef typename CPUPol::IEWStruct IEWStruct; 941061SN/A typedef typename CPUPol::RenameStruct RenameStruct; 951061SN/A typedef typename CPUPol::IssueStruct IssueStruct; 961060SN/A 971060SN/A public: 982292SN/A /** Overall IEW stage status. Used to determine if the CPU can 992292SN/A * deschedule itself due to a lack of activity. 1002292SN/A */ 1011060SN/A enum Status { 1022292SN/A Active, 1032292SN/A Inactive 1042292SN/A }; 1052292SN/A 1062292SN/A /** Status for Issue, Execute, and Writeback stages. */ 1072292SN/A enum StageStatus { 1081060SN/A Running, 1091060SN/A Blocked, 1101060SN/A Idle, 1112292SN/A StartSquash, 1121060SN/A Squashing, 1131060SN/A Unblocking 1141060SN/A }; 1151060SN/A 1161060SN/A private: 1172292SN/A /** Overall stage status. */ 1181060SN/A Status _status; 1192292SN/A /** Dispatch status. */ 1202292SN/A StageStatus dispatchStatus[Impl::MaxThreads]; 1212292SN/A /** Execute status. */ 1222292SN/A StageStatus exeStatus; 1232292SN/A /** Writeback status. */ 1242292SN/A StageStatus wbStatus; 1251060SN/A 12610023Smatt.horsnell@ARM.com /** Probe points. */ 12710023Smatt.horsnell@ARM.com ProbePointArg<DynInstPtr> *ppMispredict; 12810023Smatt.horsnell@ARM.com ProbePointArg<DynInstPtr> *ppDispatch; 12910023Smatt.horsnell@ARM.com 1301060SN/A public: 1312292SN/A /** Constructs a DefaultIEW with the given parameters. */ 1325529Snate@binkert.org DefaultIEW(O3CPU *_cpu, DerivO3CPUParams *params); 1331060SN/A 1342292SN/A /** Returns the name of the DefaultIEW stage. */ 1352292SN/A std::string name() const; 1361062SN/A 1372292SN/A /** Registers statistics. */ 1382632Sstever@eecs.umich.edu void regStats(); 1392632Sstever@eecs.umich.edu 14010023Smatt.horsnell@ARM.com /** Registers probes. */ 14110023Smatt.horsnell@ARM.com void regProbePoints(); 14210023Smatt.horsnell@ARM.com 1432292SN/A /** Initializes stage; sends back the number of free IQ and LSQ entries. */ 1449427SAndreas.Sandberg@ARM.com void startupStage(); 1452292SN/A 1462292SN/A /** Sets main time buffer used for backwards communication. */ 1472632Sstever@eecs.umich.edu void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr); 1482632Sstever@eecs.umich.edu 1492292SN/A /** Sets time buffer for getting instructions coming from rename. */ 1502632Sstever@eecs.umich.edu void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr); 1512632Sstever@eecs.umich.edu 1522292SN/A /** Sets time buffer to pass on instructions to commit. */ 1532632Sstever@eecs.umich.edu void setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr); 1542632Sstever@eecs.umich.edu 1552292SN/A /** Sets pointer to list of active threads. */ 1566221Snate@binkert.org void setActiveThreads(std::list<ThreadID> *at_ptr); 1572632Sstever@eecs.umich.edu 1582292SN/A /** Sets pointer to the scoreboard. */ 1592292SN/A void setScoreboard(Scoreboard *sb_ptr); 1602632Sstever@eecs.umich.edu 1619444SAndreas.Sandberg@ARM.com /** Perform sanity checks after a drain. */ 1629444SAndreas.Sandberg@ARM.com void drainSanityCheck() const; 1632843Sktlim@umich.edu 1649444SAndreas.Sandberg@ARM.com /** Has the stage drained? */ 1659444SAndreas.Sandberg@ARM.com bool isDrained() const; 1662632Sstever@eecs.umich.edu 1672348SN/A /** Takes over from another CPU's thread. */ 1682307SN/A void takeOverFrom(); 1692632Sstever@eecs.umich.edu 1702292SN/A /** Squashes instructions in IEW for a specific thread. */ 1716221Snate@binkert.org void squash(ThreadID tid); 1722107SN/A 1732292SN/A /** Wakes all dependents of a completed instruction. */ 1742632Sstever@eecs.umich.edu void wakeDependents(DynInstPtr &inst); 1752632Sstever@eecs.umich.edu 1762292SN/A /** Tells memory dependence unit that a memory instruction needs to be 1772292SN/A * rescheduled. It will re-execute once replayMemInst() is called. 1782292SN/A */ 1792292SN/A void rescheduleMemInst(DynInstPtr &inst); 1802292SN/A 1812292SN/A /** Re-executes all rescheduled memory instructions. */ 1822292SN/A void replayMemInst(DynInstPtr &inst); 1832292SN/A 18410333Smitch.hayenga@arm.com /** Moves memory instruction onto the list of cache blocked instructions */ 18510333Smitch.hayenga@arm.com void blockMemInst(DynInstPtr &inst); 18610333Smitch.hayenga@arm.com 18710333Smitch.hayenga@arm.com /** Notifies that the cache has become unblocked */ 18810333Smitch.hayenga@arm.com void cacheUnblocked(); 18910333Smitch.hayenga@arm.com 1902292SN/A /** Sends an instruction to commit through the time buffer. */ 1912632Sstever@eecs.umich.edu void instToCommit(DynInstPtr &inst); 1922632Sstever@eecs.umich.edu 1932292SN/A /** Inserts unused instructions of a thread into the skid buffer. */ 1946221Snate@binkert.org void skidInsert(ThreadID tid); 1952292SN/A 1962292SN/A /** Returns the max of the number of entries in all of the skid buffers. */ 1972292SN/A int skidCount(); 1982292SN/A 1992292SN/A /** Returns if all of the skid buffers are empty. */ 2002292SN/A bool skidsEmpty(); 2012292SN/A 2022292SN/A /** Updates overall IEW status based on all of the stages' statuses. */ 2032292SN/A void updateStatus(); 2042292SN/A 2052292SN/A /** Resets entries of the IQ and the LSQ. */ 2062292SN/A void resetEntries(); 2072292SN/A 2082292SN/A /** Tells the CPU to wakeup if it has descheduled itself due to no 2092292SN/A * activity. Used mainly by the LdWritebackEvent. 2102292SN/A */ 2112292SN/A void wakeCPU(); 2122292SN/A 2132292SN/A /** Reports to the CPU that there is activity this cycle. */ 2142292SN/A void activityThisCycle(); 2152292SN/A 2162292SN/A /** Tells CPU that the IEW stage is active and running. */ 2172292SN/A inline void activateStage(); 2182292SN/A 2192292SN/A /** Tells CPU that the IEW stage is inactive and idle. */ 2202292SN/A inline void deactivateStage(); 2212292SN/A 2222292SN/A /** Returns if the LSQ has any stores to writeback. */ 2232292SN/A bool hasStoresToWB() { return ldstQueue.hasStoresToWB(); } 2242292SN/A 2255557Sktlim@umich.edu /** Returns if the LSQ has any stores to writeback. */ 2266221Snate@binkert.org bool hasStoresToWB(ThreadID tid) { return ldstQueue.hasStoresToWB(tid); } 2275557Sktlim@umich.edu 2287598Sminkyu.jeong@arm.com /** Check misprediction */ 2297598Sminkyu.jeong@arm.com void checkMisprediction(DynInstPtr &inst); 2307598Sminkyu.jeong@arm.com 2312632Sstever@eecs.umich.edu private: 2322292SN/A /** Sends commit proper information for a squash due to a branch 2332292SN/A * mispredict. 2342292SN/A */ 2356221Snate@binkert.org void squashDueToBranch(DynInstPtr &inst, ThreadID tid); 2362632Sstever@eecs.umich.edu 2372292SN/A /** Sends commit proper information for a squash due to a memory order 2382292SN/A * violation. 2392292SN/A */ 2406221Snate@binkert.org void squashDueToMemOrder(DynInstPtr &inst, ThreadID tid); 2412292SN/A 2422292SN/A /** Sets Dispatch to blocked, and signals back to other stages to block. */ 2436221Snate@binkert.org void block(ThreadID tid); 2442292SN/A 2452292SN/A /** Unblocks Dispatch if the skid buffer is empty, and signals back to 2462292SN/A * other stages to unblock. 2472292SN/A */ 2486221Snate@binkert.org void unblock(ThreadID tid); 2492292SN/A 2502292SN/A /** Determines proper actions to take given Dispatch's status. */ 2516221Snate@binkert.org void dispatch(ThreadID tid); 2522292SN/A 2532292SN/A /** Dispatches instructions to IQ and LSQ. */ 2546221Snate@binkert.org void dispatchInsts(ThreadID tid); 2552292SN/A 2562292SN/A /** Executes instructions. In the case of memory operations, it informs the 2572292SN/A * LSQ to execute the instructions. Also handles any redirects that occur 2582292SN/A * due to the executed instructions. 2592292SN/A */ 2602632Sstever@eecs.umich.edu void executeInsts(); 2612632Sstever@eecs.umich.edu 2622292SN/A /** Writebacks instructions. In our model, the instruction's execute() 2632292SN/A * function atomically reads registers, executes, and writes registers. 2642292SN/A * Thus this writeback only wakes up dependent instructions, and informs 2652292SN/A * the scoreboard of registers becoming ready. 2662292SN/A */ 2672292SN/A void writebackInsts(); 2682292SN/A 2692292SN/A /** Returns the number of valid, non-squashed instructions coming from 2702292SN/A * rename to dispatch. 2712292SN/A */ 2722292SN/A unsigned validInstsFromRename(); 2732292SN/A 2742292SN/A /** Checks if any of the stall conditions are currently true. */ 2756221Snate@binkert.org bool checkStall(ThreadID tid); 2762292SN/A 2772292SN/A /** Processes inputs and changes state accordingly. */ 2786221Snate@binkert.org void checkSignalsAndUpdate(ThreadID tid); 2792292SN/A 2802702Sktlim@umich.edu /** Removes instructions from rename from a thread's instruction list. */ 2816221Snate@binkert.org void emptyRenameInsts(ThreadID tid); 2822702Sktlim@umich.edu 2832292SN/A /** Sorts instructions coming from rename into lists separated by thread. */ 2842292SN/A void sortInsts(); 2851060SN/A 2861060SN/A public: 2872292SN/A /** Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and 2882292SN/A * Writeback to run for one cycle. 2892292SN/A */ 2902632Sstever@eecs.umich.edu void tick(); 2911060SN/A 2921060SN/A private: 2932348SN/A /** Updates execution stats based on the instruction. */ 2942301SN/A void updateExeInstStats(DynInstPtr &inst); 2951062SN/A 2962292SN/A /** Pointer to main time buffer used for backwards communication. */ 2972632Sstever@eecs.umich.edu TimeBuffer<TimeStruct> *timeBuffer; 2981062SN/A 2992292SN/A /** Wire to write information heading to previous stages. */ 3002292SN/A typename TimeBuffer<TimeStruct>::wire toFetch; 3011060SN/A 3021060SN/A /** Wire to get commit's output from backwards time buffer. */ 3031060SN/A typename TimeBuffer<TimeStruct>::wire fromCommit; 3041060SN/A 3051060SN/A /** Wire to write information heading to previous stages. */ 3061060SN/A typename TimeBuffer<TimeStruct>::wire toRename; 3071060SN/A 3081060SN/A /** Rename instruction queue interface. */ 3091060SN/A TimeBuffer<RenameStruct> *renameQueue; 3101060SN/A 3111060SN/A /** Wire to get rename's output from rename queue. */ 3121060SN/A typename TimeBuffer<RenameStruct>::wire fromRename; 3131060SN/A 3141060SN/A /** Issue stage queue. */ 3151060SN/A TimeBuffer<IssueStruct> issueToExecQueue; 3161060SN/A 3171060SN/A /** Wire to read information from the issue stage time queue. */ 3181060SN/A typename TimeBuffer<IssueStruct>::wire fromIssue; 3191060SN/A 3201060SN/A /** 3211060SN/A * IEW stage time buffer. Holds ROB indices of instructions that 3221060SN/A * can be marked as completed. 3231060SN/A */ 3241060SN/A TimeBuffer<IEWStruct> *iewQueue; 3251060SN/A 3261060SN/A /** Wire to write infromation heading to commit. */ 3271060SN/A typename TimeBuffer<IEWStruct>::wire toCommit; 3281060SN/A 3292292SN/A /** Queue of all instructions coming from rename this cycle. */ 3302292SN/A std::queue<DynInstPtr> insts[Impl::MaxThreads]; 3312292SN/A 3321060SN/A /** Skid buffer between rename and IEW. */ 3332292SN/A std::queue<DynInstPtr> skidBuffer[Impl::MaxThreads]; 3341060SN/A 3352292SN/A /** Scoreboard pointer. */ 3362292SN/A Scoreboard* scoreboard; 3372292SN/A 3381681SN/A private: 3392292SN/A /** CPU pointer. */ 3402733Sktlim@umich.edu O3CPU *cpu; 3411060SN/A 3422292SN/A /** Records if IEW has written to the time buffer this cycle, so that the 3432292SN/A * CPU can deschedule itself if there is no activity. 3442292SN/A */ 3452292SN/A bool wroteToTimeBuffer; 3462292SN/A 3472292SN/A /** Debug function to print instructions that are issued this cycle. */ 3482292SN/A void printAvailableInsts(); 3492292SN/A 3502292SN/A public: 3514329Sktlim@umich.edu /** Instruction queue. */ 3524329Sktlim@umich.edu IQ instQueue; 3534329Sktlim@umich.edu 3544329Sktlim@umich.edu /** Load / store queue. */ 3554329Sktlim@umich.edu LSQ ldstQueue; 3564329Sktlim@umich.edu 3574329Sktlim@umich.edu /** Pointer to the functional unit pool. */ 3584329Sktlim@umich.edu FUPool *fuPool; 3592292SN/A /** Records if the LSQ needs to be updated on the next cycle, so that 3602292SN/A * IEW knows if there will be activity on the next cycle. 3612292SN/A */ 3622292SN/A bool updateLSQNextCycle; 3632292SN/A 3641060SN/A private: 3652292SN/A /** Records if there is a fetch redirect on this cycle for each thread. */ 3662292SN/A bool fetchRedirect[Impl::MaxThreads]; 3672292SN/A 3682292SN/A /** Records if the queues have been changed (inserted or issued insts), 3692292SN/A * so that IEW knows to broadcast the updated amount of free entries. 3702292SN/A */ 3712292SN/A bool updatedQueues; 3722292SN/A 3739184Sandreas.hansson@arm.com /** Commit to IEW delay. */ 3749184Sandreas.hansson@arm.com Cycles commitToIEWDelay; 3751060SN/A 3769184Sandreas.hansson@arm.com /** Rename to IEW delay. */ 3779184Sandreas.hansson@arm.com Cycles renameToIEWDelay; 3781060SN/A 3791060SN/A /** 3809184Sandreas.hansson@arm.com * Issue to execute delay. What this actually represents is 3811060SN/A * the amount of time it takes for an instruction to wake up, be 3821060SN/A * scheduled, and sent to a FU for execution. 3831060SN/A */ 3849184Sandreas.hansson@arm.com Cycles issueToExecuteDelay; 3851060SN/A 3862820Sktlim@umich.edu /** Width of dispatch, in instructions. */ 3872820Sktlim@umich.edu unsigned dispatchWidth; 3881060SN/A 3891060SN/A /** Width of issue, in instructions. */ 3901060SN/A unsigned issueWidth; 3911060SN/A 3922292SN/A /** Index into queue of instructions being written back. */ 3932292SN/A unsigned wbNumInst; 3942292SN/A 3952292SN/A /** Cycle number within the queue of instructions being written back. 3962292SN/A * Used in case there are too many instructions writing back at the current 3972292SN/A * cycle and writesbacks need to be scheduled for the future. See comments 3982292SN/A * in instToCommit(). 3991060SN/A */ 4002292SN/A unsigned wbCycle; 4011060SN/A 4022820Sktlim@umich.edu /** Writeback width. */ 4032820Sktlim@umich.edu unsigned wbWidth; 4042820Sktlim@umich.edu 4052292SN/A /** Number of active threads. */ 4066221Snate@binkert.org ThreadID numThreads; 4072292SN/A 4082292SN/A /** Pointer to list of active threads. */ 4096221Snate@binkert.org std::list<ThreadID> *activeThreads; 4102292SN/A 4112292SN/A /** Maximum size of the skid buffer. */ 4122292SN/A unsigned skidBufferMax; 4132292SN/A 4142292SN/A /** Stat for total number of idle cycles. */ 4155999Snate@binkert.org Stats::Scalar iewIdleCycles; 4162292SN/A /** Stat for total number of squashing cycles. */ 4175999Snate@binkert.org Stats::Scalar iewSquashCycles; 4182292SN/A /** Stat for total number of blocking cycles. */ 4195999Snate@binkert.org Stats::Scalar iewBlockCycles; 4202292SN/A /** Stat for total number of unblocking cycles. */ 4215999Snate@binkert.org Stats::Scalar iewUnblockCycles; 4222292SN/A /** Stat for total number of instructions dispatched. */ 4235999Snate@binkert.org Stats::Scalar iewDispatchedInsts; 4242292SN/A /** Stat for total number of squashed instructions dispatch skips. */ 4255999Snate@binkert.org Stats::Scalar iewDispSquashedInsts; 4262292SN/A /** Stat for total number of dispatched load instructions. */ 4275999Snate@binkert.org Stats::Scalar iewDispLoadInsts; 4282292SN/A /** Stat for total number of dispatched store instructions. */ 4295999Snate@binkert.org Stats::Scalar iewDispStoreInsts; 4302292SN/A /** Stat for total number of dispatched non speculative instructions. */ 4315999Snate@binkert.org Stats::Scalar iewDispNonSpecInsts; 4322292SN/A /** Stat for number of times the IQ becomes full. */ 4335999Snate@binkert.org Stats::Scalar iewIQFullEvents; 4342292SN/A /** Stat for number of times the LSQ becomes full. */ 4355999Snate@binkert.org Stats::Scalar iewLSQFullEvents; 4362292SN/A /** Stat for total number of memory ordering violation events. */ 4375999Snate@binkert.org Stats::Scalar memOrderViolationEvents; 4382292SN/A /** Stat for total number of incorrect predicted taken branches. */ 4395999Snate@binkert.org Stats::Scalar predictedTakenIncorrect; 4402292SN/A /** Stat for total number of incorrect predicted not taken branches. */ 4415999Snate@binkert.org Stats::Scalar predictedNotTakenIncorrect; 4422292SN/A /** Stat for total number of mispredicted branches detected at execute. */ 4432292SN/A Stats::Formula branchMispredicts; 4442301SN/A 4452727Sktlim@umich.edu /** Stat for total number of executed instructions. */ 4465999Snate@binkert.org Stats::Scalar iewExecutedInsts; 4472727Sktlim@umich.edu /** Stat for total number of executed load instructions. */ 4485999Snate@binkert.org Stats::Vector iewExecLoadInsts; 4492353SN/A /** Stat for total number of executed store instructions. */ 4505999Snate@binkert.org// Stats::Scalar iewExecStoreInsts; 4512727Sktlim@umich.edu /** Stat for total number of squashed instructions skipped at execute. */ 4525999Snate@binkert.org Stats::Scalar iewExecSquashedInsts; 4532348SN/A /** Number of executed software prefetches. */ 4545999Snate@binkert.org Stats::Vector iewExecutedSwp; 4552348SN/A /** Number of executed nops. */ 4565999Snate@binkert.org Stats::Vector iewExecutedNop; 4572348SN/A /** Number of executed meomory references. */ 4585999Snate@binkert.org Stats::Vector iewExecutedRefs; 4592348SN/A /** Number of executed branches. */ 4605999Snate@binkert.org Stats::Vector iewExecutedBranches; 4612348SN/A /** Number of executed store instructions. */ 4622301SN/A Stats::Formula iewExecStoreInsts; 4632727Sktlim@umich.edu /** Number of instructions executed per cycle. */ 4642727Sktlim@umich.edu Stats::Formula iewExecRate; 4652727Sktlim@umich.edu 4662348SN/A /** Number of instructions sent to commit. */ 4675999Snate@binkert.org Stats::Vector iewInstsToCommit; 4682348SN/A /** Number of instructions that writeback. */ 4695999Snate@binkert.org Stats::Vector writebackCount; 4702348SN/A /** Number of instructions that wake consumers. */ 4715999Snate@binkert.org Stats::Vector producerInst; 4722348SN/A /** Number of instructions that wake up from producers. */ 4735999Snate@binkert.org Stats::Vector consumerInst; 4742348SN/A /** Number of instructions that were delayed in writing back due 4752348SN/A * to resource contention. 4762348SN/A */ 4775999Snate@binkert.org Stats::Vector wbPenalized; 4782348SN/A /** Number of instructions per cycle written back. */ 4792326SN/A Stats::Formula wbRate; 4802348SN/A /** Average number of woken instructions per writeback. */ 4812326SN/A Stats::Formula wbFanout; 4822348SN/A /** Number of instructions per cycle delayed in writing back . */ 4832326SN/A Stats::Formula wbPenalizedRate; 4841060SN/A}; 4851060SN/A 4862292SN/A#endif // __CPU_O3_IEW_HH__ 487