iew.hh revision 2326
11884Sstever@eecs.umich.edu/* 21884Sstever@eecs.umich.edu * Copyright (c) 2004-2006 The Regents of The University of Michigan 31884Sstever@eecs.umich.edu * All rights reserved. 41884Sstever@eecs.umich.edu * 51884Sstever@eecs.umich.edu * Redistribution and use in source and binary forms, with or without 61884Sstever@eecs.umich.edu * modification, are permitted provided that the following conditions are 71884Sstever@eecs.umich.edu * met: redistributions of source code must retain the above copyright 81884Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer; 91884Sstever@eecs.umich.edu * redistributions in binary form must reproduce the above copyright 101884Sstever@eecs.umich.edu * notice, this list of conditions and the following disclaimer in the 111884Sstever@eecs.umich.edu * documentation and/or other materials provided with the distribution; 121884Sstever@eecs.umich.edu * neither the name of the copyright holders nor the names of its 131884Sstever@eecs.umich.edu * contributors may be used to endorse or promote products derived from 141884Sstever@eecs.umich.edu * this software without specific prior written permission. 151884Sstever@eecs.umich.edu * 161884Sstever@eecs.umich.edu * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 171884Sstever@eecs.umich.edu * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 181884Sstever@eecs.umich.edu * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 191884Sstever@eecs.umich.edu * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 201884Sstever@eecs.umich.edu * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 211884Sstever@eecs.umich.edu * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 221884Sstever@eecs.umich.edu * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 231884Sstever@eecs.umich.edu * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 241884Sstever@eecs.umich.edu * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 251884Sstever@eecs.umich.edu * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 261884Sstever@eecs.umich.edu * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 271884Sstever@eecs.umich.edu */ 281884Sstever@eecs.umich.edu 291884Sstever@eecs.umich.edu#ifndef __CPU_O3_IEW_HH__ 301884Sstever@eecs.umich.edu#define __CPU_O3_IEW_HH__ 311884Sstever@eecs.umich.edu 321884Sstever@eecs.umich.edu#include <queue> 331884Sstever@eecs.umich.edu 341884Sstever@eecs.umich.edu#include "base/statistics.hh" 351884Sstever@eecs.umich.edu#include "base/timebuf.hh" 361884Sstever@eecs.umich.edu#include "config/full_system.hh" 371884Sstever@eecs.umich.edu#include "cpu/o3/comm.hh" 381884Sstever@eecs.umich.edu#include "cpu/o3/scoreboard.hh" 391884Sstever@eecs.umich.edu#include "cpu/o3/lsq.hh" 401884Sstever@eecs.umich.edu 411884Sstever@eecs.umich.educlass FUPool; 421884Sstever@eecs.umich.edu 431884Sstever@eecs.umich.edu/** 441884Sstever@eecs.umich.edu * DefaultIEW handles both single threaded and SMT IEW 451884Sstever@eecs.umich.edu * (issue/execute/writeback). It handles the dispatching of 461884Sstever@eecs.umich.edu * instructions to the LSQ/IQ as part of the issue stage, and has the 471884Sstever@eecs.umich.edu * IQ try to issue instructions each cycle. The execute latency is 481930Sstever@eecs.umich.edu * actually tied into the issue latency to allow the IQ to be able to 491930Sstever@eecs.umich.edu * do back-to-back scheduling without having to speculatively schedule 501930Sstever@eecs.umich.edu * instructions. This happens by having the IQ have access to the 511930Sstever@eecs.umich.edu * functional units, and the IQ gets the execution latencies from the 521930Sstever@eecs.umich.edu * FUs when it issues instructions. Instructions reach the execute 531884Sstever@eecs.umich.edu * stage on the last cycle of their execution, which is when the IQ 541884Sstever@eecs.umich.edu * knows to wake up any dependent instructions, allowing back to back 551884Sstever@eecs.umich.edu * scheduling. The execute portion of IEW separates memory 561884Sstever@eecs.umich.edu * instructions from non-memory instructions, either telling the LSQ 571884Sstever@eecs.umich.edu * to execute the instruction, or executing the instruction directly. 581884Sstever@eecs.umich.edu * The writeback portion of IEW completes the instructions by waking 591884Sstever@eecs.umich.edu * up any dependents, and marking the register ready on the 601884Sstever@eecs.umich.edu * scoreboard. 611884Sstever@eecs.umich.edu */ 621884Sstever@eecs.umich.edutemplate<class Impl> 631940Sstever@eecs.umich.educlass DefaultIEW 641940Sstever@eecs.umich.edu{ 651940Sstever@eecs.umich.edu private: 661940Sstever@eecs.umich.edu //Typedefs from Impl 671940Sstever@eecs.umich.edu typedef typename Impl::CPUPol CPUPol; 681930Sstever@eecs.umich.edu typedef typename Impl::DynInstPtr DynInstPtr; 691884Sstever@eecs.umich.edu typedef typename Impl::FullCPU FullCPU; 701884Sstever@eecs.umich.edu typedef typename Impl::Params Params; 711884Sstever@eecs.umich.edu 721884Sstever@eecs.umich.edu typedef typename CPUPol::IQ IQ; 731884Sstever@eecs.umich.edu typedef typename CPUPol::RenameMap RenameMap; 741884Sstever@eecs.umich.edu typedef typename CPUPol::LSQ LSQ; 751884Sstever@eecs.umich.edu 761884Sstever@eecs.umich.edu typedef typename CPUPol::TimeStruct TimeStruct; 771884Sstever@eecs.umich.edu typedef typename CPUPol::IEWStruct IEWStruct; 781884Sstever@eecs.umich.edu typedef typename CPUPol::RenameStruct RenameStruct; 791884Sstever@eecs.umich.edu typedef typename CPUPol::IssueStruct IssueStruct; 801884Sstever@eecs.umich.edu 811884Sstever@eecs.umich.edu friend class Impl::FullCPU; 821884Sstever@eecs.umich.edu friend class CPUPol::IQ; 831884Sstever@eecs.umich.edu 841884Sstever@eecs.umich.edu public: 851884Sstever@eecs.umich.edu /** Overall IEW stage status. Used to determine if the CPU can 861884Sstever@eecs.umich.edu * deschedule itself due to a lack of activity. 871884Sstever@eecs.umich.edu */ 881884Sstever@eecs.umich.edu enum Status { 891884Sstever@eecs.umich.edu Active, 901884Sstever@eecs.umich.edu Inactive 911884Sstever@eecs.umich.edu }; 921884Sstever@eecs.umich.edu 931884Sstever@eecs.umich.edu /** Status for Issue, Execute, and Writeback stages. */ 941884Sstever@eecs.umich.edu enum StageStatus { 951884Sstever@eecs.umich.edu Running, 961884Sstever@eecs.umich.edu Blocked, 971884Sstever@eecs.umich.edu Idle, 981884Sstever@eecs.umich.edu StartSquash, 991884Sstever@eecs.umich.edu Squashing, 1001884Sstever@eecs.umich.edu Unblocking 1011884Sstever@eecs.umich.edu }; 1021884Sstever@eecs.umich.edu 1031884Sstever@eecs.umich.edu private: 1041884Sstever@eecs.umich.edu /** Overall stage status. */ 1051891Sstever@eecs.umich.edu Status _status; 1061884Sstever@eecs.umich.edu /** Dispatch status. */ 1071884Sstever@eecs.umich.edu StageStatus dispatchStatus[Impl::MaxThreads]; 1081884Sstever@eecs.umich.edu /** Execute status. */ 1091884Sstever@eecs.umich.edu StageStatus exeStatus; 1101884Sstever@eecs.umich.edu /** Writeback status. */ 1111884Sstever@eecs.umich.edu StageStatus wbStatus; 1121884Sstever@eecs.umich.edu 1131884Sstever@eecs.umich.edu public: 1141884Sstever@eecs.umich.edu /** LdWriteback event for a load completion. */ 1151884Sstever@eecs.umich.edu class LdWritebackEvent : public Event { 1161884Sstever@eecs.umich.edu private: 1171884Sstever@eecs.umich.edu /** Instruction that is writing back data to the register file. */ 1181884Sstever@eecs.umich.edu DynInstPtr inst; 1191884Sstever@eecs.umich.edu /** Pointer to IEW stage. */ 1201884Sstever@eecs.umich.edu DefaultIEW<Impl> *iewStage; 1211884Sstever@eecs.umich.edu 1221884Sstever@eecs.umich.edu public: 1231884Sstever@eecs.umich.edu /** Constructs a load writeback event. */ 1241884Sstever@eecs.umich.edu LdWritebackEvent(DynInstPtr &_inst, DefaultIEW<Impl> *_iew); 1251884Sstever@eecs.umich.edu 1261884Sstever@eecs.umich.edu /** Processes writeback event. */ 1271884Sstever@eecs.umich.edu virtual void process(); 1281884Sstever@eecs.umich.edu /** Returns the description of the writeback event. */ 1291884Sstever@eecs.umich.edu virtual const char *description(); 1301884Sstever@eecs.umich.edu }; 1311884Sstever@eecs.umich.edu 1321884Sstever@eecs.umich.edu public: 1331884Sstever@eecs.umich.edu /** Constructs a DefaultIEW with the given parameters. */ 1341884Sstever@eecs.umich.edu DefaultIEW(Params *params); 1351884Sstever@eecs.umich.edu 1361884Sstever@eecs.umich.edu /** Returns the name of the DefaultIEW stage. */ 1371884Sstever@eecs.umich.edu std::string name() const; 1381884Sstever@eecs.umich.edu 1391884Sstever@eecs.umich.edu /** Registers statistics. */ 1401884Sstever@eecs.umich.edu void regStats(); 1411884Sstever@eecs.umich.edu 1421884Sstever@eecs.umich.edu /** Initializes stage; sends back the number of free IQ and LSQ entries. */ 1431884Sstever@eecs.umich.edu void initStage(); 1441884Sstever@eecs.umich.edu 1451884Sstever@eecs.umich.edu /** Sets CPU pointer for IEW, IQ, and LSQ. */ 1461884Sstever@eecs.umich.edu void setCPU(FullCPU *cpu_ptr); 1471884Sstever@eecs.umich.edu 1481884Sstever@eecs.umich.edu /** Sets main time buffer used for backwards communication. */ 1491884Sstever@eecs.umich.edu void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr); 1501940Sstever@eecs.umich.edu 1511940Sstever@eecs.umich.edu /** Sets time buffer for getting instructions coming from rename. */ 1521930Sstever@eecs.umich.edu void setRenameQueue(TimeBuffer<RenameStruct> *rq_ptr); 1531930Sstever@eecs.umich.edu 1541884Sstever@eecs.umich.edu /** Sets time buffer to pass on instructions to commit. */ 1551884Sstever@eecs.umich.edu void setIEWQueue(TimeBuffer<IEWStruct> *iq_ptr); 1561884Sstever@eecs.umich.edu 1571884Sstever@eecs.umich.edu /** Sets pointer to list of active threads. */ 1581884Sstever@eecs.umich.edu void setActiveThreads(std::list<unsigned> *at_ptr); 1591884Sstever@eecs.umich.edu 1601884Sstever@eecs.umich.edu /** Sets pointer to the scoreboard. */ 1611884Sstever@eecs.umich.edu void setScoreboard(Scoreboard *sb_ptr); 1621884Sstever@eecs.umich.edu 1631884Sstever@eecs.umich.edu void switchOut(); 1641884Sstever@eecs.umich.edu 1651884Sstever@eecs.umich.edu void doSwitchOut(); 1661884Sstever@eecs.umich.edu 1671884Sstever@eecs.umich.edu void takeOverFrom(); 1681884Sstever@eecs.umich.edu 1691884Sstever@eecs.umich.edu bool isSwitchedOut() { return switchedOut; } 1701884Sstever@eecs.umich.edu 1711884Sstever@eecs.umich.edu /** Sets page table pointer within LSQ. */ 1721884Sstever@eecs.umich.edu// void setPageTable(PageTable *pt_ptr); 1731884Sstever@eecs.umich.edu 1741884Sstever@eecs.umich.edu /** Squashes instructions in IEW for a specific thread. */ 1751884Sstever@eecs.umich.edu void squash(unsigned tid); 1761884Sstever@eecs.umich.edu 1771884Sstever@eecs.umich.edu /** Wakes all dependents of a completed instruction. */ 1781884Sstever@eecs.umich.edu void wakeDependents(DynInstPtr &inst); 1791884Sstever@eecs.umich.edu 1801884Sstever@eecs.umich.edu /** Tells memory dependence unit that a memory instruction needs to be 1811884Sstever@eecs.umich.edu * rescheduled. It will re-execute once replayMemInst() is called. 1821884Sstever@eecs.umich.edu */ 1831884Sstever@eecs.umich.edu void rescheduleMemInst(DynInstPtr &inst); 1841884Sstever@eecs.umich.edu 1851884Sstever@eecs.umich.edu /** Re-executes all rescheduled memory instructions. */ 1861884Sstever@eecs.umich.edu void replayMemInst(DynInstPtr &inst); 1871884Sstever@eecs.umich.edu 1881884Sstever@eecs.umich.edu /** Sends an instruction to commit through the time buffer. */ 1891884Sstever@eecs.umich.edu void instToCommit(DynInstPtr &inst); 1901884Sstever@eecs.umich.edu 1911884Sstever@eecs.umich.edu /** Inserts unused instructions of a thread into the skid buffer. */ 1921884Sstever@eecs.umich.edu void skidInsert(unsigned tid); 1931884Sstever@eecs.umich.edu 1941884Sstever@eecs.umich.edu /** Returns the max of the number of entries in all of the skid buffers. */ 1951884Sstever@eecs.umich.edu int skidCount(); 1961884Sstever@eecs.umich.edu 1971884Sstever@eecs.umich.edu /** Returns if all of the skid buffers are empty. */ 1981884Sstever@eecs.umich.edu bool skidsEmpty(); 1991884Sstever@eecs.umich.edu 2001884Sstever@eecs.umich.edu /** Updates overall IEW status based on all of the stages' statuses. */ 2011884Sstever@eecs.umich.edu void updateStatus(); 2021884Sstever@eecs.umich.edu 2031884Sstever@eecs.umich.edu /** Resets entries of the IQ and the LSQ. */ 2041884Sstever@eecs.umich.edu void resetEntries(); 2051884Sstever@eecs.umich.edu 2061884Sstever@eecs.umich.edu /** Tells the CPU to wakeup if it has descheduled itself due to no 2071884Sstever@eecs.umich.edu * activity. Used mainly by the LdWritebackEvent. 2081884Sstever@eecs.umich.edu */ 2091884Sstever@eecs.umich.edu void wakeCPU(); 2101884Sstever@eecs.umich.edu 2111884Sstever@eecs.umich.edu /** Reports to the CPU that there is activity this cycle. */ 2121884Sstever@eecs.umich.edu void activityThisCycle(); 2131884Sstever@eecs.umich.edu 2141884Sstever@eecs.umich.edu /** Tells CPU that the IEW stage is active and running. */ 2151884Sstever@eecs.umich.edu inline void activateStage(); 2161884Sstever@eecs.umich.edu 2171884Sstever@eecs.umich.edu /** Tells CPU that the IEW stage is inactive and idle. */ 2181884Sstever@eecs.umich.edu inline void deactivateStage(); 2191884Sstever@eecs.umich.edu 220 /** Returns if the LSQ has any stores to writeback. */ 221 bool hasStoresToWB() { return ldstQueue.hasStoresToWB(); } 222 223 private: 224 /** Sends commit proper information for a squash due to a branch 225 * mispredict. 226 */ 227 void squashDueToBranch(DynInstPtr &inst, unsigned thread_id); 228 229 /** Sends commit proper information for a squash due to a memory order 230 * violation. 231 */ 232 void squashDueToMemOrder(DynInstPtr &inst, unsigned thread_id); 233 234 /** Sends commit proper information for a squash due to memory becoming 235 * blocked (younger issued instructions must be retried). 236 */ 237 void squashDueToMemBlocked(DynInstPtr &inst, unsigned thread_id); 238 239 /** Sets Dispatch to blocked, and signals back to other stages to block. */ 240 void block(unsigned thread_id); 241 242 /** Unblocks Dispatch if the skid buffer is empty, and signals back to 243 * other stages to unblock. 244 */ 245 void unblock(unsigned thread_id); 246 247 /** Determines proper actions to take given Dispatch's status. */ 248 void dispatch(unsigned tid); 249 250 /** Dispatches instructions to IQ and LSQ. */ 251 void dispatchInsts(unsigned tid); 252 253 /** Executes instructions. In the case of memory operations, it informs the 254 * LSQ to execute the instructions. Also handles any redirects that occur 255 * due to the executed instructions. 256 */ 257 void executeInsts(); 258 259 /** Writebacks instructions. In our model, the instruction's execute() 260 * function atomically reads registers, executes, and writes registers. 261 * Thus this writeback only wakes up dependent instructions, and informs 262 * the scoreboard of registers becoming ready. 263 */ 264 void writebackInsts(); 265 266 /** Returns the number of valid, non-squashed instructions coming from 267 * rename to dispatch. 268 */ 269 unsigned validInstsFromRename(); 270 271 /** Reads the stall signals. */ 272 void readStallSignals(unsigned tid); 273 274 /** Checks if any of the stall conditions are currently true. */ 275 bool checkStall(unsigned tid); 276 277 /** Processes inputs and changes state accordingly. */ 278 void checkSignalsAndUpdate(unsigned tid); 279 280 /** Sorts instructions coming from rename into lists separated by thread. */ 281 void sortInsts(); 282 283 public: 284 /** Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and 285 * Writeback to run for one cycle. 286 */ 287 void tick(); 288 289 private: 290 void updateExeInstStats(DynInstPtr &inst); 291 292 /** Pointer to main time buffer used for backwards communication. */ 293 TimeBuffer<TimeStruct> *timeBuffer; 294 295 /** Wire to write information heading to previous stages. */ 296 typename TimeBuffer<TimeStruct>::wire toFetch; 297 298 /** Wire to get commit's output from backwards time buffer. */ 299 typename TimeBuffer<TimeStruct>::wire fromCommit; 300 301 /** Wire to write information heading to previous stages. */ 302 typename TimeBuffer<TimeStruct>::wire toRename; 303 304 /** Rename instruction queue interface. */ 305 TimeBuffer<RenameStruct> *renameQueue; 306 307 /** Wire to get rename's output from rename queue. */ 308 typename TimeBuffer<RenameStruct>::wire fromRename; 309 310 /** Issue stage queue. */ 311 TimeBuffer<IssueStruct> issueToExecQueue; 312 313 /** Wire to read information from the issue stage time queue. */ 314 typename TimeBuffer<IssueStruct>::wire fromIssue; 315 316 /** 317 * IEW stage time buffer. Holds ROB indices of instructions that 318 * can be marked as completed. 319 */ 320 TimeBuffer<IEWStruct> *iewQueue; 321 322 /** Wire to write infromation heading to commit. */ 323 typename TimeBuffer<IEWStruct>::wire toCommit; 324 325 /** Queue of all instructions coming from rename this cycle. */ 326 std::queue<DynInstPtr> insts[Impl::MaxThreads]; 327 328 /** Skid buffer between rename and IEW. */ 329 std::queue<DynInstPtr> skidBuffer[Impl::MaxThreads]; 330 331 /** Scoreboard pointer. */ 332 Scoreboard* scoreboard; 333 334 public: 335 /** Instruction queue. */ 336 IQ instQueue; 337 338 /** Load / store queue. */ 339 LSQ ldstQueue; 340 341 /** Pointer to the functional unit pool. */ 342 FUPool *fuPool; 343 344 private: 345 /** CPU pointer. */ 346 FullCPU *cpu; 347 348 /** Records if IEW has written to the time buffer this cycle, so that the 349 * CPU can deschedule itself if there is no activity. 350 */ 351 bool wroteToTimeBuffer; 352 353 /** Source of possible stalls. */ 354 struct Stalls { 355 bool commit; 356 }; 357 358 /** Stages that are telling IEW to stall. */ 359 Stalls stalls[Impl::MaxThreads]; 360 361 /** Debug function to print instructions that are issued this cycle. */ 362 void printAvailableInsts(); 363 364 public: 365 /** Records if the LSQ needs to be updated on the next cycle, so that 366 * IEW knows if there will be activity on the next cycle. 367 */ 368 bool updateLSQNextCycle; 369 370 private: 371 /** Records if there is a fetch redirect on this cycle for each thread. */ 372 bool fetchRedirect[Impl::MaxThreads]; 373 374 /** Used to track if all instructions have been dispatched this cycle. 375 * If they have not, then blocking must have occurred, and the instructions 376 * would already be added to the skid buffer. 377 * @todo: Fix this hack. 378 */ 379 bool dispatchedAllInsts; 380 381 /** Records if the queues have been changed (inserted or issued insts), 382 * so that IEW knows to broadcast the updated amount of free entries. 383 */ 384 bool updatedQueues; 385 386 /** Commit to IEW delay, in ticks. */ 387 unsigned commitToIEWDelay; 388 389 /** Rename to IEW delay, in ticks. */ 390 unsigned renameToIEWDelay; 391 392 /** 393 * Issue to execute delay, in ticks. What this actually represents is 394 * the amount of time it takes for an instruction to wake up, be 395 * scheduled, and sent to a FU for execution. 396 */ 397 unsigned issueToExecuteDelay; 398 399 /** Width of issue's read path, in instructions. The read path is both 400 * the skid buffer and the rename instruction queue. 401 * Note to self: is this really different than issueWidth? 402 */ 403 unsigned issueReadWidth; 404 405 /** Width of issue, in instructions. */ 406 unsigned issueWidth; 407 408 /** Width of execute, in instructions. Might make more sense to break 409 * down into FP vs int. 410 */ 411 unsigned executeWidth; 412 413 /** Index into queue of instructions being written back. */ 414 unsigned wbNumInst; 415 416 /** Cycle number within the queue of instructions being written back. 417 * Used in case there are too many instructions writing back at the current 418 * cycle and writesbacks need to be scheduled for the future. See comments 419 * in instToCommit(). 420 */ 421 unsigned wbCycle; 422 423 /** Number of active threads. */ 424 unsigned numThreads; 425 426 /** Pointer to list of active threads. */ 427 std::list<unsigned> *activeThreads; 428 429 /** Maximum size of the skid buffer. */ 430 unsigned skidBufferMax; 431 432 bool switchedOut; 433 434 /** Stat for total number of idle cycles. */ 435 Stats::Scalar<> iewIdleCycles; 436 /** Stat for total number of squashing cycles. */ 437 Stats::Scalar<> iewSquashCycles; 438 /** Stat for total number of blocking cycles. */ 439 Stats::Scalar<> iewBlockCycles; 440 /** Stat for total number of unblocking cycles. */ 441 Stats::Scalar<> iewUnblockCycles; 442 /** Stat for total number of instructions dispatched. */ 443 Stats::Scalar<> iewDispatchedInsts; 444 /** Stat for total number of squashed instructions dispatch skips. */ 445 Stats::Scalar<> iewDispSquashedInsts; 446 /** Stat for total number of dispatched load instructions. */ 447 Stats::Scalar<> iewDispLoadInsts; 448 /** Stat for total number of dispatched store instructions. */ 449 Stats::Scalar<> iewDispStoreInsts; 450 /** Stat for total number of dispatched non speculative instructions. */ 451 Stats::Scalar<> iewDispNonSpecInsts; 452 /** Stat for number of times the IQ becomes full. */ 453 Stats::Scalar<> iewIQFullEvents; 454 /** Stat for number of times the LSQ becomes full. */ 455 Stats::Scalar<> iewLSQFullEvents; 456 /** Stat for total number of executed instructions. */ 457 Stats::Scalar<> iewExecutedInsts; 458 /** Stat for total number of executed load instructions. */ 459 Stats::Vector<> iewExecLoadInsts; 460 /** Stat for total number of executed store instructions. */ 461// Stats::Scalar<> iewExecStoreInsts; 462 /** Stat for total number of squashed instructions skipped at execute. */ 463 Stats::Scalar<> iewExecSquashedInsts; 464 /** Stat for total number of memory ordering violation events. */ 465 Stats::Scalar<> memOrderViolationEvents; 466 /** Stat for total number of incorrect predicted taken branches. */ 467 Stats::Scalar<> predictedTakenIncorrect; 468 /** Stat for total number of incorrect predicted not taken branches. */ 469 Stats::Scalar<> predictedNotTakenIncorrect; 470 /** Stat for total number of mispredicted branches detected at execute. */ 471 Stats::Formula branchMispredicts; 472 473 Stats::Vector<> exeSwp; 474 Stats::Vector<> exeNop; 475 Stats::Vector<> exeRefs; 476 Stats::Vector<> exeBranches; 477 478// Stats::Vector<> issued_ops; 479/* 480 Stats::Vector<> stat_fu_busy; 481 Stats::Vector2d<> stat_fuBusy; 482 Stats::Vector<> dist_unissued; 483 Stats::Vector2d<> stat_issued_inst_type; 484*/ 485 Stats::Formula issueRate; 486 Stats::Formula iewExecStoreInsts; 487// Stats::Formula issue_op_rate; 488// Stats::Formula fu_busy_rate; 489 490 Stats::Vector<> iewInstsToCommit; 491 Stats::Vector<> writebackCount; 492 Stats::Vector<> producerInst; 493 Stats::Vector<> consumerInst; 494 Stats::Vector<> wbPenalized; 495 496 Stats::Formula wbRate; 497 Stats::Formula wbFanout; 498 Stats::Formula wbPenalizedRate; 499}; 500 501#endif // __CPU_O3_IEW_HH__ 502