iew.hh revision 2727
11689SN/A/*
22326SN/A * Copyright (c) 2004-2006 The Regents of The University of Michigan
31689SN/A * All rights reserved.
41689SN/A *
51689SN/A * Redistribution and use in source and binary forms, with or without
61689SN/A * modification, are permitted provided that the following conditions are
71689SN/A * met: redistributions of source code must retain the above copyright
81689SN/A * notice, this list of conditions and the following disclaimer;
91689SN/A * redistributions in binary form must reproduce the above copyright
101689SN/A * notice, this list of conditions and the following disclaimer in the
111689SN/A * documentation and/or other materials provided with the distribution;
121689SN/A * neither the name of the copyright holders nor the names of its
131689SN/A * contributors may be used to endorse or promote products derived from
141689SN/A * this software without specific prior written permission.
151689SN/A *
161689SN/A * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
171689SN/A * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
181689SN/A * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
191689SN/A * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
201689SN/A * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
211689SN/A * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
221689SN/A * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
231689SN/A * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
241689SN/A * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
251689SN/A * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
261689SN/A * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
272665Ssaidi@eecs.umich.edu *
282665Ssaidi@eecs.umich.edu * Authors: Kevin Lim
291689SN/A */
301689SN/A
312292SN/A#ifndef __CPU_O3_IEW_HH__
322292SN/A#define __CPU_O3_IEW_HH__
331060SN/A
341060SN/A#include <queue>
351060SN/A
361461SN/A#include "base/statistics.hh"
371060SN/A#include "base/timebuf.hh"
382292SN/A#include "config/full_system.hh"
391717SN/A#include "cpu/o3/comm.hh"
402292SN/A#include "cpu/o3/scoreboard.hh"
412292SN/A#include "cpu/o3/lsq.hh"
421060SN/A
432292SN/Aclass FUPool;
442292SN/A
452292SN/A/**
462326SN/A * DefaultIEW handles both single threaded and SMT IEW
472326SN/A * (issue/execute/writeback).  It handles the dispatching of
482326SN/A * instructions to the LSQ/IQ as part of the issue stage, and has the
492326SN/A * IQ try to issue instructions each cycle. The execute latency is
502326SN/A * actually tied into the issue latency to allow the IQ to be able to
512292SN/A * do back-to-back scheduling without having to speculatively schedule
522326SN/A * instructions. This happens by having the IQ have access to the
532326SN/A * functional units, and the IQ gets the execution latencies from the
542326SN/A * FUs when it issues instructions. Instructions reach the execute
552326SN/A * stage on the last cycle of their execution, which is when the IQ
562326SN/A * knows to wake up any dependent instructions, allowing back to back
572326SN/A * scheduling. The execute portion of IEW separates memory
582326SN/A * instructions from non-memory instructions, either telling the LSQ
592326SN/A * to execute the instruction, or executing the instruction directly.
602326SN/A * The writeback portion of IEW completes the instructions by waking
612326SN/A * up any dependents, and marking the register ready on the
622326SN/A * scoreboard.
632292SN/A */
641681SN/Atemplate<class Impl>
652292SN/Aclass DefaultIEW
661060SN/A{
671060SN/A  private:
681060SN/A    //Typedefs from Impl
691061SN/A    typedef typename Impl::CPUPol CPUPol;
701061SN/A    typedef typename Impl::DynInstPtr DynInstPtr;
711060SN/A    typedef typename Impl::FullCPU FullCPU;
721060SN/A    typedef typename Impl::Params Params;
731060SN/A
741681SN/A    typedef typename CPUPol::IQ IQ;
751061SN/A    typedef typename CPUPol::RenameMap RenameMap;
762292SN/A    typedef typename CPUPol::LSQ LSQ;
771060SN/A
781061SN/A    typedef typename CPUPol::TimeStruct TimeStruct;
791061SN/A    typedef typename CPUPol::IEWStruct IEWStruct;
801061SN/A    typedef typename CPUPol::RenameStruct RenameStruct;
811061SN/A    typedef typename CPUPol::IssueStruct IssueStruct;
821060SN/A
831681SN/A    friend class Impl::FullCPU;
842292SN/A    friend class CPUPol::IQ;
852292SN/A
861060SN/A  public:
872292SN/A    /** Overall IEW stage status. Used to determine if the CPU can
882292SN/A     * deschedule itself due to a lack of activity.
892292SN/A     */
901060SN/A    enum Status {
912292SN/A        Active,
922292SN/A        Inactive
932292SN/A    };
942292SN/A
952292SN/A    /** Status for Issue, Execute, and Writeback stages. */
962292SN/A    enum StageStatus {
971060SN/A        Running,
981060SN/A        Blocked,
991060SN/A        Idle,
1002292SN/A        StartSquash,
1011060SN/A        Squashing,
1021060SN/A        Unblocking
1031060SN/A    };
1041060SN/A
1051060SN/A  private:
1062292SN/A    /** Overall stage status. */
1071060SN/A    Status _status;
1082292SN/A    /** Dispatch status. */
1092292SN/A    StageStatus dispatchStatus[Impl::MaxThreads];
1102292SN/A    /** Execute status. */
1112292SN/A    StageStatus exeStatus;
1122292SN/A    /** Writeback status. */
1132292SN/A    StageStatus wbStatus;
1141060SN/A
1151060SN/A  public:
1162292SN/A    /** Constructs a DefaultIEW with the given parameters. */
1172292SN/A    DefaultIEW(Params *params);
1181060SN/A
1192292SN/A    /** Returns the name of the DefaultIEW stage. */
1202292SN/A    std::string name() const;
1211062SN/A
1222292SN/A    /** Registers statistics. */
1232632Sstever@eecs.umich.edu    void regStats();
1242632Sstever@eecs.umich.edu
1252292SN/A    /** Initializes stage; sends back the number of free IQ and LSQ entries. */
1262292SN/A    void initStage();
1272292SN/A
1282292SN/A    /** Sets CPU pointer for IEW, IQ, and LSQ. */
1292632Sstever@eecs.umich.edu    void setCPU(FullCPU *cpu_ptr);
1302632Sstever@eecs.umich.edu
1312292SN/A    /** Sets main time buffer used for backwards communication. */
1322632Sstever@eecs.umich.edu    void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
1332632Sstever@eecs.umich.edu
1342292SN/A    /** Sets time buffer for getting instructions coming from rename. */
1352632Sstever@eecs.umich.edu    void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr);
1362632Sstever@eecs.umich.edu
1372292SN/A    /** Sets time buffer to pass on instructions to commit. */
1382632Sstever@eecs.umich.edu    void setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr);
1392632Sstever@eecs.umich.edu
1402292SN/A    /** Sets pointer to list of active threads. */
1412292SN/A    void setActiveThreads(std::list<unsigned> *at_ptr);
1422632Sstever@eecs.umich.edu
1432292SN/A    /** Sets pointer to the scoreboard. */
1442292SN/A    void setScoreboard(Scoreboard *sb_ptr);
1452632Sstever@eecs.umich.edu
1462348SN/A    /** Starts switch out of IEW stage. */
1472307SN/A    void switchOut();
1482632Sstever@eecs.umich.edu
1492348SN/A    /** Completes switch out of IEW stage. */
1502316SN/A    void doSwitchOut();
1512632Sstever@eecs.umich.edu
1522348SN/A    /** Takes over from another CPU's thread. */
1532307SN/A    void takeOverFrom();
1542632Sstever@eecs.umich.edu
1552348SN/A    /** Returns if IEW is switched out. */
1562307SN/A    bool isSwitchedOut() { return switchedOut; }
1572632Sstever@eecs.umich.edu
1582292SN/A    /** Squashes instructions in IEW for a specific thread. */
1592292SN/A    void squash(unsigned tid);
1602107SN/A
1612292SN/A    /** Wakes all dependents of a completed instruction. */
1622632Sstever@eecs.umich.edu    void wakeDependents(DynInstPtr &inst);
1632632Sstever@eecs.umich.edu
1642292SN/A    /** Tells memory dependence unit that a memory instruction needs to be
1652292SN/A     * rescheduled. It will re-execute once replayMemInst() is called.
1662292SN/A     */
1672292SN/A    void rescheduleMemInst(DynInstPtr &inst);
1682292SN/A
1692292SN/A    /** Re-executes all rescheduled memory instructions. */
1702292SN/A    void replayMemInst(DynInstPtr &inst);
1712292SN/A
1722292SN/A    /** Sends an instruction to commit through the time buffer. */
1732632Sstever@eecs.umich.edu    void instToCommit(DynInstPtr &inst);
1742632Sstever@eecs.umich.edu
1752292SN/A    /** Inserts unused instructions of a thread into the skid buffer. */
1762292SN/A    void skidInsert(unsigned tid);
1772292SN/A
1782292SN/A    /** Returns the max of the number of entries in all of the skid buffers. */
1792292SN/A    int skidCount();
1802292SN/A
1812292SN/A    /** Returns if all of the skid buffers are empty. */
1822292SN/A    bool skidsEmpty();
1832292SN/A
1842292SN/A    /** Updates overall IEW status based on all of the stages' statuses. */
1852292SN/A    void updateStatus();
1862292SN/A
1872292SN/A    /** Resets entries of the IQ and the LSQ. */
1882292SN/A    void resetEntries();
1892292SN/A
1902292SN/A    /** Tells the CPU to wakeup if it has descheduled itself due to no
1912292SN/A     * activity. Used mainly by the LdWritebackEvent.
1922292SN/A     */
1932292SN/A    void wakeCPU();
1942292SN/A
1952292SN/A    /** Reports to the CPU that there is activity this cycle. */
1962292SN/A    void activityThisCycle();
1972292SN/A
1982292SN/A    /** Tells CPU that the IEW stage is active and running. */
1992292SN/A    inline void activateStage();
2002292SN/A
2012292SN/A    /** Tells CPU that the IEW stage is inactive and idle. */
2022292SN/A    inline void deactivateStage();
2032292SN/A
2042292SN/A    /** Returns if the LSQ has any stores to writeback. */
2052292SN/A    bool hasStoresToWB() { return ldstQueue.hasStoresToWB(); }
2062292SN/A
2072632Sstever@eecs.umich.edu  private:
2082292SN/A    /** Sends commit proper information for a squash due to a branch
2092292SN/A     * mispredict.
2102292SN/A     */
2112292SN/A    void squashDueToBranch(DynInstPtr &inst, unsigned thread_id);
2122632Sstever@eecs.umich.edu
2132292SN/A    /** Sends commit proper information for a squash due to a memory order
2142292SN/A     * violation.
2152292SN/A     */
2162292SN/A    void squashDueToMemOrder(DynInstPtr &inst, unsigned thread_id);
2172292SN/A
2182292SN/A    /** Sends commit proper information for a squash due to memory becoming
2192292SN/A     * blocked (younger issued instructions must be retried).
2202292SN/A     */
2212292SN/A    void squashDueToMemBlocked(DynInstPtr &inst, unsigned thread_id);
2222292SN/A
2232292SN/A    /** Sets Dispatch to blocked, and signals back to other stages to block. */
2242292SN/A    void block(unsigned thread_id);
2252292SN/A
2262292SN/A    /** Unblocks Dispatch if the skid buffer is empty, and signals back to
2272292SN/A     * other stages to unblock.
2282292SN/A     */
2292292SN/A    void unblock(unsigned thread_id);
2302292SN/A
2312292SN/A    /** Determines proper actions to take given Dispatch's status. */
2322292SN/A    void dispatch(unsigned tid);
2332292SN/A
2342292SN/A    /** Dispatches instructions to IQ and LSQ. */
2352292SN/A    void dispatchInsts(unsigned tid);
2362292SN/A
2372292SN/A    /** Executes instructions. In the case of memory operations, it informs the
2382292SN/A     * LSQ to execute the instructions. Also handles any redirects that occur
2392292SN/A     * due to the executed instructions.
2402292SN/A     */
2412632Sstever@eecs.umich.edu    void executeInsts();
2422632Sstever@eecs.umich.edu
2432292SN/A    /** Writebacks instructions. In our model, the instruction's execute()
2442292SN/A     * function atomically reads registers, executes, and writes registers.
2452292SN/A     * Thus this writeback only wakes up dependent instructions, and informs
2462292SN/A     * the scoreboard of registers becoming ready.
2472292SN/A     */
2482292SN/A    void writebackInsts();
2492292SN/A
2502292SN/A    /** Returns the number of valid, non-squashed instructions coming from
2512292SN/A     * rename to dispatch.
2522292SN/A     */
2532292SN/A    unsigned validInstsFromRename();
2542292SN/A
2552292SN/A    /** Reads the stall signals. */
2562292SN/A    void readStallSignals(unsigned tid);
2572292SN/A
2582292SN/A    /** Checks if any of the stall conditions are currently true. */
2592292SN/A    bool checkStall(unsigned tid);
2602292SN/A
2612292SN/A    /** Processes inputs and changes state accordingly. */
2622292SN/A    void checkSignalsAndUpdate(unsigned tid);
2632292SN/A
2642702Sktlim@umich.edu    /** Removes instructions from rename from a thread's instruction list. */
2652702Sktlim@umich.edu    void emptyRenameInsts(unsigned tid);
2662702Sktlim@umich.edu
2672292SN/A    /** Sorts instructions coming from rename into lists separated by thread. */
2682292SN/A    void sortInsts();
2691060SN/A
2701060SN/A  public:
2712292SN/A    /** Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and
2722292SN/A     * Writeback to run for one cycle.
2732292SN/A     */
2742632Sstever@eecs.umich.edu    void tick();
2751060SN/A
2761060SN/A  private:
2772348SN/A    /** Updates execution stats based on the instruction. */
2782301SN/A    void updateExeInstStats(DynInstPtr &inst);
2791062SN/A
2802292SN/A    /** Pointer to main time buffer used for backwards communication. */
2812632Sstever@eecs.umich.edu    TimeBuffer<TimeStruct> *timeBuffer;
2821062SN/A
2832292SN/A    /** Wire to write information heading to previous stages. */
2842292SN/A    typename TimeBuffer<TimeStruct>::wire toFetch;
2851060SN/A
2861060SN/A    /** Wire to get commit's output from backwards time buffer. */
2871060SN/A    typename TimeBuffer<TimeStruct>::wire fromCommit;
2881060SN/A
2891060SN/A    /** Wire to write information heading to previous stages. */
2901060SN/A    typename TimeBuffer<TimeStruct>::wire toRename;
2911060SN/A
2921060SN/A    /** Rename instruction queue interface. */
2931060SN/A    TimeBuffer<RenameStruct> *renameQueue;
2941060SN/A
2951060SN/A    /** Wire to get rename's output from rename queue. */
2961060SN/A    typename TimeBuffer<RenameStruct>::wire fromRename;
2971060SN/A
2981060SN/A    /** Issue stage queue. */
2991060SN/A    TimeBuffer<IssueStruct> issueToExecQueue;
3001060SN/A
3011060SN/A    /** Wire to read information from the issue stage time queue. */
3021060SN/A    typename TimeBuffer<IssueStruct>::wire fromIssue;
3031060SN/A
3041060SN/A    /**
3051060SN/A     * IEW stage time buffer.  Holds ROB indices of instructions that
3061060SN/A     * can be marked as completed.
3071060SN/A     */
3081060SN/A    TimeBuffer<IEWStruct> *iewQueue;
3091060SN/A
3101060SN/A    /** Wire to write infromation heading to commit. */
3111060SN/A    typename TimeBuffer<IEWStruct>::wire toCommit;
3121060SN/A
3132292SN/A    /** Queue of all instructions coming from rename this cycle. */
3142292SN/A    std::queue<DynInstPtr> insts[Impl::MaxThreads];
3152292SN/A
3161060SN/A    /** Skid buffer between rename and IEW. */
3172292SN/A    std::queue<DynInstPtr> skidBuffer[Impl::MaxThreads];
3181060SN/A
3192292SN/A    /** Scoreboard pointer. */
3202292SN/A    Scoreboard* scoreboard;
3212292SN/A
3222292SN/A  public:
3231060SN/A    /** Instruction queue. */
3241060SN/A    IQ instQueue;
3251060SN/A
3262292SN/A    /** Load / store queue. */
3272292SN/A    LSQ ldstQueue;
3281061SN/A
3292292SN/A    /** Pointer to the functional unit pool. */
3302292SN/A    FUPool *fuPool;
3311681SN/A
3321681SN/A  private:
3332292SN/A    /** CPU pointer. */
3341060SN/A    FullCPU *cpu;
3351060SN/A
3362292SN/A    /** Records if IEW has written to the time buffer this cycle, so that the
3372292SN/A     * CPU can deschedule itself if there is no activity.
3382292SN/A     */
3392292SN/A    bool wroteToTimeBuffer;
3402292SN/A
3412292SN/A    /** Source of possible stalls. */
3422292SN/A    struct Stalls {
3432292SN/A        bool commit;
3442292SN/A    };
3452292SN/A
3462292SN/A    /** Stages that are telling IEW to stall. */
3472292SN/A    Stalls stalls[Impl::MaxThreads];
3482292SN/A
3492292SN/A    /** Debug function to print instructions that are issued this cycle. */
3502292SN/A    void printAvailableInsts();
3512292SN/A
3522292SN/A  public:
3532292SN/A    /** Records if the LSQ needs to be updated on the next cycle, so that
3542292SN/A     * IEW knows if there will be activity on the next cycle.
3552292SN/A     */
3562292SN/A    bool updateLSQNextCycle;
3572292SN/A
3581060SN/A  private:
3592292SN/A    /** Records if there is a fetch redirect on this cycle for each thread. */
3602292SN/A    bool fetchRedirect[Impl::MaxThreads];
3612292SN/A
3622292SN/A    /** Used to track if all instructions have been dispatched this cycle.
3632292SN/A     * If they have not, then blocking must have occurred, and the instructions
3642292SN/A     * would already be added to the skid buffer.
3652292SN/A     * @todo: Fix this hack.
3662292SN/A     */
3672292SN/A    bool dispatchedAllInsts;
3682292SN/A
3692292SN/A    /** Records if the queues have been changed (inserted or issued insts),
3702292SN/A     * so that IEW knows to broadcast the updated amount of free entries.
3712292SN/A     */
3722292SN/A    bool updatedQueues;
3732292SN/A
3741060SN/A    /** Commit to IEW delay, in ticks. */
3751060SN/A    unsigned commitToIEWDelay;
3761060SN/A
3771060SN/A    /** Rename to IEW delay, in ticks. */
3781060SN/A    unsigned renameToIEWDelay;
3791060SN/A
3801060SN/A    /**
3811060SN/A     * Issue to execute delay, in ticks.  What this actually represents is
3821060SN/A     * the amount of time it takes for an instruction to wake up, be
3831060SN/A     * scheduled, and sent to a FU for execution.
3841060SN/A     */
3851060SN/A    unsigned issueToExecuteDelay;
3861060SN/A
3871060SN/A    /** Width of issue's read path, in instructions.  The read path is both
3881060SN/A     *  the skid buffer and the rename instruction queue.
3891060SN/A     *  Note to self: is this really different than issueWidth?
3901060SN/A     */
3911060SN/A    unsigned issueReadWidth;
3921060SN/A
3931060SN/A    /** Width of issue, in instructions. */
3941060SN/A    unsigned issueWidth;
3951060SN/A
3962292SN/A    /** Index into queue of instructions being written back. */
3972292SN/A    unsigned wbNumInst;
3982292SN/A
3992292SN/A    /** Cycle number within the queue of instructions being written back.
4002292SN/A     * Used in case there are too many instructions writing back at the current
4012292SN/A     * cycle and writesbacks need to be scheduled for the future. See comments
4022292SN/A     * in instToCommit().
4031060SN/A     */
4042292SN/A    unsigned wbCycle;
4051060SN/A
4062292SN/A    /** Number of active threads. */
4072292SN/A    unsigned numThreads;
4082292SN/A
4092292SN/A    /** Pointer to list of active threads. */
4102292SN/A    std::list<unsigned> *activeThreads;
4112292SN/A
4122292SN/A    /** Maximum size of the skid buffer. */
4132292SN/A    unsigned skidBufferMax;
4142292SN/A
4152348SN/A    /** Is this stage switched out. */
4162307SN/A    bool switchedOut;
4172307SN/A
4182292SN/A    /** Stat for total number of idle cycles. */
4191062SN/A    Stats::Scalar<> iewIdleCycles;
4202292SN/A    /** Stat for total number of squashing cycles. */
4211062SN/A    Stats::Scalar<> iewSquashCycles;
4222292SN/A    /** Stat for total number of blocking cycles. */
4231062SN/A    Stats::Scalar<> iewBlockCycles;
4242292SN/A    /** Stat for total number of unblocking cycles. */
4251062SN/A    Stats::Scalar<> iewUnblockCycles;
4262292SN/A    /** Stat for total number of instructions dispatched. */
4271062SN/A    Stats::Scalar<> iewDispatchedInsts;
4282292SN/A    /** Stat for total number of squashed instructions dispatch skips. */
4291062SN/A    Stats::Scalar<> iewDispSquashedInsts;
4302292SN/A    /** Stat for total number of dispatched load instructions. */
4311062SN/A    Stats::Scalar<> iewDispLoadInsts;
4322292SN/A    /** Stat for total number of dispatched store instructions. */
4331062SN/A    Stats::Scalar<> iewDispStoreInsts;
4342292SN/A    /** Stat for total number of dispatched non speculative instructions. */
4351062SN/A    Stats::Scalar<> iewDispNonSpecInsts;
4362292SN/A    /** Stat for number of times the IQ becomes full. */
4371062SN/A    Stats::Scalar<> iewIQFullEvents;
4382292SN/A    /** Stat for number of times the LSQ becomes full. */
4392292SN/A    Stats::Scalar<> iewLSQFullEvents;
4402292SN/A    /** Stat for total number of memory ordering violation events. */
4411062SN/A    Stats::Scalar<> memOrderViolationEvents;
4422292SN/A    /** Stat for total number of incorrect predicted taken branches. */
4431062SN/A    Stats::Scalar<> predictedTakenIncorrect;
4442292SN/A    /** Stat for total number of incorrect predicted not taken branches. */
4452292SN/A    Stats::Scalar<> predictedNotTakenIncorrect;
4462292SN/A    /** Stat for total number of mispredicted branches detected at execute. */
4472292SN/A    Stats::Formula branchMispredicts;
4482301SN/A
4492727Sktlim@umich.edu    /** Stat for total number of executed instructions. */
4502727Sktlim@umich.edu    Stats::Scalar<> iewExecutedInsts;
4512727Sktlim@umich.edu    /** Stat for total number of executed load instructions. */
4522727Sktlim@umich.edu    Stats::Vector<> iewExecLoadInsts;
4532727Sktlim@umich.edu    /** Stat for total number of squashed instructions skipped at execute. */
4542727Sktlim@umich.edu    Stats::Scalar<> iewExecSquashedInsts;
4552348SN/A    /** Number of executed software prefetches. */
4562727Sktlim@umich.edu    Stats::Vector<> iewExecutedSwp;
4572348SN/A    /** Number of executed nops. */
4582727Sktlim@umich.edu    Stats::Vector<> iewExecutedNop;
4592348SN/A    /** Number of executed meomory references. */
4602727Sktlim@umich.edu    Stats::Vector<> iewExecutedRefs;
4612348SN/A    /** Number of executed branches. */
4622727Sktlim@umich.edu    Stats::Vector<> iewExecutedBranches;
4632348SN/A    /** Number of executed store instructions. */
4642301SN/A    Stats::Formula iewExecStoreInsts;
4652727Sktlim@umich.edu    /** Number of instructions executed per cycle. */
4662727Sktlim@umich.edu    Stats::Formula iewExecRate;
4672727Sktlim@umich.edu
4682348SN/A    /** Number of instructions sent to commit. */
4692301SN/A    Stats::Vector<> iewInstsToCommit;
4702348SN/A    /** Number of instructions that writeback. */
4712326SN/A    Stats::Vector<> writebackCount;
4722348SN/A    /** Number of instructions that wake consumers. */
4732326SN/A    Stats::Vector<> producerInst;
4742348SN/A    /** Number of instructions that wake up from producers. */
4752326SN/A    Stats::Vector<> consumerInst;
4762348SN/A    /** Number of instructions that were delayed in writing back due
4772348SN/A     * to resource contention.
4782348SN/A     */
4792326SN/A    Stats::Vector<> wbPenalized;
4802348SN/A    /** Number of instructions per cycle written back. */
4812326SN/A    Stats::Formula wbRate;
4822348SN/A    /** Average number of woken instructions per writeback. */
4832326SN/A    Stats::Formula wbFanout;
4842348SN/A    /** Number of instructions per cycle delayed in writing back . */
4852326SN/A    Stats::Formula wbPenalizedRate;
4861060SN/A};
4871060SN/A
4882292SN/A#endif // __CPU_O3_IEW_HH__
489