55#include "debug/Activity.hh"
56#include "debug/Drain.hh"
57#include "debug/IEW.hh"
58#include "debug/O3PipeView.hh"
59#include "params/BaseO3CPU.hh"
85 fatal(
"dispatchWidth (%d) is larger than compiled limit (%d),\n"
86 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
89 fatal(
"issueWidth (%d) is larger than compiled limit (%d),\n"
90 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
93 fatal(
"wbWidth (%d) is larger than compiled limit (%d),\n"
94 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
120 return cpu->name() +
".iew";
127 cpu->getProbeManager(),
"Dispatch");
129 cpu->getProbeManager(),
"Mispredict");
135 cpu->getProbeManager(),
"Execute");
141 cpu->getProbeManager(),
"ToCommit");
147 "Number of cycles IEW is idle"),
149 "Number of cycles IEW is squashing"),
151 "Number of cycles IEW is blocking"),
153 "Number of cycles IEW is unblocking"),
155 "Number of instructions dispatched to IQ"),
157 "Number of squashed instructions skipped by dispatch"),
159 "Number of dispatched load instructions"),
161 "Number of dispatched store instructions"),
163 "Number of dispatched non-speculative instructions"),
165 "Number of times the IQ has become full, causing a stall"),
167 "Number of times the LSQ has become full, causing a stall"),
169 "Number of memory order violations"),
171 "Number of branches that were predicted taken incorrectly"),
173 "Number of branches that were predicted not taken incorrectly"),
175 "Number of branch mispredicts detected at execute",
179 "Cumulative count of insts sent to commit"),
181 "Cumulative count of insts written-back"),
183 "Number of instructions producing a value"),
185 "Number of instructions consuming a value"),
188 "Insts written-back per cycle"),
191 "Average fanout of values written-back")
194 .init(
cpu->numThreads)
198 .init(
cpu->numThreads)
202 .init(
cpu->numThreads)
206 .init(
cpu->numThreads)
221 "Number of squashed instructions skipped in execute"),
223 "Number of swp insts executed")
226 .init(
cpu->numThreads)
234 toRename->iewInfo[tid].usedIQ =
true;
235 toRename->iewInfo[tid].freeIQEntries =
238 toRename->iewInfo[tid].usedLSQ =
true;
239 toRename->iewInfo[tid].freeLQEntries =
241 toRename->iewInfo[tid].freeSQEntries =
256 toRename->iewInfo[tid].usedIQ =
true;
257 toRename->iewInfo[tid].freeIQEntries =
260 toRename->iewInfo[tid].usedLSQ =
true;
265 for (
int i = -
cpu->iewQueue.getPast();
272 iew_struct.
pc[tid] =
nullptr;
273 iew_struct.
squash[tid] =
false;
286 for (
int i = -
cpu->timeBuffer.getPast();
351 if (!
insts[tid].empty()) {
352 DPRINTF(Drain,
"%i: Insts not empty.\n", tid);
356 DPRINTF(Drain,
"%i: Skid buffer not empty.\n", tid);
365 if (drained && !
fuPool->isDrained()) {
366 DPRINTF(Drain,
"FU pool still busy.\n");
395 cpu->activityThisCycle();
412 DPRINTF(
IEW,
"[tid:%i] Squashing all instructions.\n", tid);
423 "Removing skidbuffer instructions until "
424 "[sn:%llu] [tid:%i]\n",
429 toRename->iewInfo[tid].dispatchedToLQ++;
433 toRename->iewInfo[tid].dispatchedToSQ++;
436 toRename->iewInfo[tid].dispatched++;
447 DPRINTF(
IEW,
"[tid:%i] [sn:%llu] Squashing from a specific instruction,"
449 "\n", tid, inst->seqNum, inst->pcState() );
452 inst->seqNum <
toCommit->squashedSeqNum[tid]) {
454 toCommit->squashedSeqNum[tid] = inst->seqNum;
455 toCommit->branchTaken[tid] = inst->pcState().branching();
458 inst->staticInst->advancePC(*
toCommit->pc[tid]);
460 toCommit->mispredictInst[tid] = inst;
461 toCommit->includeSquashInst[tid] =
false;
471 DPRINTF(
IEW,
"[tid:%i] Memory violation, squashing violator and younger "
472 "insts, PC: %s [sn:%llu].\n", tid, inst->pcState(), inst->seqNum);
480 inst->seqNum <=
toCommit->squashedSeqNum[tid]) {
483 toCommit->squashedSeqNum[tid] = inst->seqNum;
485 toCommit->mispredictInst[tid] = NULL;
488 toCommit->includeSquashInst[tid] =
true;
515 DPRINTF(
IEW,
"[tid:%i] Reading instructions out of the skid "
516 "buffer %u.\n",tid, tid);
523 DPRINTF(
IEW,
"[tid:%i] Done unblocking.\n",tid);
585 DPRINTF(
IEW,
"Current wb cycle: %i, width: %i, numInst: %i\nwbActual:%i\n",
597 while (!
insts[tid].empty()) {
598 inst =
insts[tid].front();
602 DPRINTF(
IEW,
"[tid:%i] Inserting [sn:%lli] PC:%s into "
603 "dispatch skidBuffer %i\n",tid, inst->seqNum,
604 inst->pcState(),tid);
610 "Skidbuffer Exceeded Max Size");
619 unsigned thread_count =
skidBuffer[tid].size();
620 if (max < thread_count)
641 bool any_unblocking =
false;
645 any_unblocking =
true;
655 !
ldstQueue.willWB() && !any_unblocking) {
678 if (
fromCommit->commitInfo[tid].robSquashing) {
679 DPRINTF(
IEW,
"[tid:%i] Stall from Commit stage detected.\n",tid);
682 DPRINTF(
IEW,
"[tid:%i] Stall: IQ is full.\n",tid);
713 if (
fromCommit->commitInfo[tid].robSquashing) {
714 DPRINTF(
IEW,
"[tid:%i] ROB is still squashing.\n", tid);
730 DPRINTF(
IEW,
"[tid:%i] Done blocking, switching to unblocking.\n",
743 DPRINTF(
IEW,
"[tid:%i] Done squashing, switching to running.\n",
758 assert(
insts[tid].empty());
760 for (
int i = 0;
i < insts_from_rename; ++
i) {
768 DPRINTF(
IEW,
"[tid:%i] Removing incoming rename instructions\n", tid);
770 while (!
insts[tid].empty()) {
772 if (
insts[tid].front()->isLoad()) {
773 toRename->iewInfo[tid].dispatchedToLQ++;
775 if (
insts[tid].front()->isStore() ||
776 insts[tid].front()->isAtomic()) {
777 toRename->iewInfo[tid].dispatchedToSQ++;
780 toRename->iewInfo[tid].dispatched++;
795 DPRINTF(Activity,
"Activity this cycle.\n");
796 cpu->activityThisCycle();
802 DPRINTF(Activity,
"Activating stage.\n");
809 DPRINTF(Activity,
"Deactivating stage.\n");
834 DPRINTF(
IEW,
"[tid:%i] Not blocked, so attempting to run "
865 std::queue<DynInstPtr> &insts_to_dispatch =
869 int insts_to_add = insts_to_dispatch.size();
872 bool add_to_iq =
false;
873 int dis_num_inst = 0;
877 for ( ; dis_num_inst < insts_to_add &&
881 inst = insts_to_dispatch.front();
884 DPRINTF(
IEW,
"[tid:%i] Issue: Examining instruction from skid "
891 DPRINTF(
IEW,
"[tid:%i] Issue: Adding PC %s [sn:%lli] [tid:%i] to "
893 tid, inst->pcState(), inst->seqNum, inst->threadNumber);
900 if (inst->isSquashed()) {
901 DPRINTF(
IEW,
"[tid:%i] Issue: Squashed instruction encountered, "
902 "not adding to IQ.\n", tid);
906 insts_to_dispatch.pop();
909 if (inst->isLoad()) {
910 toRename->iewInfo[tid].dispatchedToLQ++;
912 if (inst->isStore() || inst->isAtomic()) {
913 toRename->iewInfo[tid].dispatchedToSQ++;
916 toRename->iewInfo[tid].dispatched++;
923 DPRINTF(
IEW,
"[tid:%i] Issue: IQ has become full.\n", tid);
938 if ((inst->isAtomic() &&
ldstQueue.sqFull(tid)) ||
939 (inst->isLoad() &&
ldstQueue.lqFull(tid)) ||
940 (inst->isStore() &&
ldstQueue.sqFull(tid))) {
941 DPRINTF(
IEW,
"[tid:%i] Issue: %s has become full.\n",tid,
942 inst->isLoad() ?
"LQ" :
"SQ");
958 const int numHtmStarts =
ldstQueue.numHtmStarts(tid);
959 const int numHtmStops =
ldstQueue.numHtmStops(tid);
960 const int htmDepth = numHtmStarts - numHtmStops;
963 inst->setHtmTransactionalState(
ldstQueue.getLatestHtmUid(tid),
966 inst->clearHtmTransactionalState();
971 if (inst->isAtomic()) {
972 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
973 "encountered, adding to LSQ.\n", tid);
982 inst->setCanCommit();
988 toRename->iewInfo[tid].dispatchedToSQ++;
989 }
else if (inst->isLoad()) {
990 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
991 "encountered, adding to LSQ.\n", tid);
1001 toRename->iewInfo[tid].dispatchedToLQ++;
1002 }
else if (inst->isStore()) {
1003 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
1004 "encountered, adding to LSQ.\n", tid);
1010 if (inst->isStoreConditional()) {
1015 inst->setCanCommit();
1024 toRename->iewInfo[tid].dispatchedToSQ++;
1025 }
else if (inst->isReadBarrier() || inst->isWriteBarrier()) {
1027 inst->setCanCommit();
1030 }
else if (inst->isNop()) {
1031 DPRINTF(
IEW,
"[tid:%i] Issue: Nop instruction encountered, "
1032 "skipping.\n", tid);
1035 inst->setExecuted();
1036 inst->setCanCommit();
1040 cpu->executeStats[tid]->numNop++;
1044 assert(!inst->isExecuted());
1048 if (add_to_iq && inst->isNonSpeculative()) {
1049 DPRINTF(
IEW,
"[tid:%i] Issue: Nonspeculative instruction "
1050 "encountered, skipping.\n", tid);
1053 inst->setCanCommit();
1069 insts_to_dispatch.pop();
1071 toRename->iewInfo[tid].dispatched++;
1076 inst->dispatchTick =
curTick() - inst->fetchTick;
1081 if (!insts_to_dispatch.empty()) {
1082 DPRINTF(
IEW,
"[tid:%i] Issue: Bandwidth Full. Blocking.\n", tid);
1101 std::cout <<
"Available Instructions: ";
1105 if (inst%3==0) std::cout <<
"\n\t";
1107 std::cout <<
"PC: " <<
fromIssue->insts[inst]->pcState()
1108 <<
" TN: " <<
fromIssue->insts[inst]->threadNumber
1109 <<
" SN: " <<
fromIssue->insts[inst]->seqNum <<
" | ";
1135 for (; inst_num < insts_to_execute;
1138 DPRINTF(
IEW,
"Execute: Executing instructions from IQ.\n");
1142 DPRINTF(
IEW,
"Execute: Processing PC %s, [tid:%i] [sn:%llu].\n",
1143 inst->pcState(), inst->threadNumber,inst->seqNum);
1150 if (inst->isSquashed()) {
1151 DPRINTF(
IEW,
"Execute: Instruction was squashed. PC: %s, [tid:%i]"
1152 " [sn:%llu]\n", inst->pcState(), inst->threadNumber,
1157 inst->setExecuted();
1161 inst->setCanCommit();
1163 ++
iewStats.executedInstStats.numSquashedInsts;
1173 if (inst->isMemRef()) {
1174 DPRINTF(
IEW,
"Execute: Calculating address for memory "
1178 if (inst->isAtomic()) {
1182 if (inst->isTranslationDelayed() &&
1186 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1191 }
else if (inst->isLoad()) {
1196 if (inst->isTranslationDelayed() &&
1200 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1206 if (inst->isDataPrefetch() || inst->isInstPrefetch()) {
1209 }
else if (inst->isStore()) {
1212 if (inst->isTranslationDelayed() &&
1216 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1223 if (fault !=
NoFault || !inst->readPredicate() ||
1224 !inst->isStoreConditional()) {
1229 inst->setExecuted();
1238 panic(
"Unexpected memory type!\n");
1246 if (inst->getFault() ==
NoFault) {
1248 if (!inst->readPredicate())
1249 inst->forwardOldRegs();
1252 inst->setExecuted();
1271 toCommit->squashedSeqNum[tid] > inst->seqNum) {
1275 bool loadNotExecuted = !inst->isExecuted() && inst->isLoad();
1277 if (inst->mispredicted() && !loadNotExecuted) {
1281 "Branch mispredict detected.\n",
1284 "Predicted target was PC: %s\n",
1285 tid, inst->seqNum, inst->readPredTarg());
1287 "Redirecting fetch to PC: %s\n",
1288 tid, inst->seqNum, inst->pcState());
1294 if (inst->readPredTaken()) {
1295 iewStats.predictedTakenIncorrect++;
1297 iewStats.predictedNotTakenIncorrect++;
1300 assert(inst->isMemRef());
1305 violator =
ldstQueue.getMemDepViolator(tid);
1307 DPRINTF(
IEW,
"LDSTQ detected a violation. Violator PC: %s "
1308 "[sn:%lli], inst PC: %s [sn:%lli]. Addr is: %#x.\n",
1309 violator->pcState(), violator->seqNum,
1310 inst->pcState(), inst->seqNum, inst->physEffAddr);
1320 ++
iewStats.memOrderViolationEvents;
1326 assert(inst->isMemRef());
1330 DPRINTF(
IEW,
"LDSTQ detected a violation. Violator PC: "
1331 "%s, inst PC: %s. Addr is: %#x.\n",
1332 violator->pcState(), inst->pcState(),
1334 DPRINTF(
IEW,
"Violation will not be handled because "
1335 "already squashing\n");
1337 ++
iewStats.memOrderViolationEvents;
1350 cpu->activityThisCycle();
1368 for (
int inst_num = 0; inst_num <
wbWidth &&
1369 toCommit->insts[inst_num]; inst_num++) {
1373 DPRINTF(
IEW,
"Sending instructions to commit, [sn:%lli] PC %s.\n",
1374 inst->seqNum, inst->pcState());
1386 if (!inst->isSquashed() && inst->isExecuted() &&
1387 inst->getFault() ==
NoFault) {
1388 int dependents =
instQueue.wakeDependents(inst);
1390 for (
int i = 0;
i < inst->numDestRegs();
i++) {
1392 if (inst->renamedDestIdx(
i)->
1393 getNumPinnedWritesToComplete() == 0) {
1394 DPRINTF(
IEW,
"Setting Destination Register %i (%s)\n",
1395 inst->renamedDestIdx(
i)->index(),
1396 inst->renamedDestIdx(
i)->className());
1403 iewStats.consumerInst[tid]+= dependents;
1424 fuPool->processFreeUnits();
1428 DPRINTF(
IEW,
"Issue: Processing [tid:%i]\n", tid);
1449 bool broadcast_free_entries =
false;
1455 broadcast_free_entries =
true;
1469 if (
fromCommit->commitInfo[tid].doneSeqNum != 0 &&
1481 if (
fromCommit->commitInfo[tid].nonSpecSeqNum != 0) {
1484 if (
fromCommit->commitInfo[tid].strictlyOrdered) {
1486 fromCommit->commitInfo[tid].strictlyOrderedLoad);
1487 fromCommit->commitInfo[tid].strictlyOrderedLoad->setAtCommit();
1494 if (broadcast_free_entries) {
1495 toFetch->iewInfo[tid].iqCount =
1497 toFetch->iewInfo[tid].ldstqCount =
1500 toRename->iewInfo[tid].usedIQ =
true;
1501 toRename->iewInfo[tid].freeIQEntries =
1503 toRename->iewInfo[tid].usedLSQ =
true;
1505 toRename->iewInfo[tid].freeLQEntries =
1507 toRename->iewInfo[tid].freeSQEntries =
1513 DPRINTF(
IEW,
"[tid:%i], Dispatch dispatched %i instructions.\n",
1514 tid,
toRename->iewInfo[tid].dispatched);
1517 DPRINTF(
IEW,
"IQ has %i free entries (Can schedule: %i). "
1518 "LQ has %i free entries. SQ has %i free entries.\n",
1525 DPRINTF(Activity,
"Activity this cycle.\n");
1526 cpu->activityThisCycle();
1535 cpu->executeStats[tid]->numInsts++;
1538 if (debug::O3PipeView) {
1539 inst->completeTick =
curTick() - inst->fetchTick;
1546 if (inst->isControl()) {
1547 cpu->executeStats[tid]->numBranches++;
1553 if (inst->isMemRef()) {
1554 cpu->executeStats[tid]->numMemRefs++;
1556 if (inst->isLoad()) {
1557 cpu->executeStats[tid]->numLoadInsts++;
1569 toCommit->squashedSeqNum[tid] > inst->seqNum) {
1571 if (inst->mispredicted()) {
1575 "Branch mispredict detected.\n",
1577 DPRINTF(
IEW,
"[tid:%i] [sn:%llu] Predicted target was PC: %s\n",
1578 tid, inst->seqNum, inst->readPredTarg());
1580 "Redirecting fetch to PC: %s\n",
1581 tid, inst->seqNum, inst->pcState());
1585 if (inst->readPredTaken()) {
1586 iewStats.predictedTakenIncorrect++;
1588 iewStats.predictedNotTakenIncorrect++;
ProbePointArg generates a point for the class of Arg.
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
void printAvailableInsts()
Debug function to print instructions that are issued this cycle.
void updateStatus()
Updates overall IEW status based on all of the stages' statuses.
void deactivateStage()
Tells CPU that the IEW stage is inactive and idle.
TimeBuffer< IEWStruct > * iewQueue
IEW stage time buffer.
TimeBuffer< TimeStruct >::wire fromCommit
Wire to get commit's output from backwards time buffer.
StageStatus dispatchStatus[MaxThreads]
Dispatch status.
std::list< ThreadID > * activeThreads
Pointer to list of active threads.
void takeOverFrom()
Takes over from another CPU's thread.
void setTimeBuffer(TimeBuffer< TimeStruct > *tb_ptr)
Sets main time buffer used for backwards communication.
int skidCount()
Returns the max of the number of entries in all of the skid buffers.
void instToCommit(const DynInstPtr &inst)
Sends an instruction to commit through the time buffer.
FUPool * fuPool
Pointer to the functional unit pool.
void squashDueToBranch(const DynInstPtr &inst, ThreadID tid)
Sends commit proper information for a squash due to a branch mispredict.
void squashDueToMemOrder(const DynInstPtr &inst, ThreadID tid)
Sends commit proper information for a squash due to a memory order violation.
unsigned wbWidth
Writeback width.
std::queue< DynInstPtr > insts[MaxThreads]
Queue of all instructions coming from rename this cycle.
void block(ThreadID tid)
Sets Dispatch to blocked, and signals back to other stages to block.
StageStatus exeStatus
Execute status.
void clearStates(ThreadID tid)
Clear all thread-specific states.
void dispatch(ThreadID tid)
Determines proper actions to take given Dispatch's status.
void startupStage()
Initializes stage; sends back the number of free IQ and LSQ entries.
void blockMemInst(const DynInstPtr &inst)
Moves memory instruction onto the list of cache blocked instructions.
void unblock(ThreadID tid)
Unblocks Dispatch if the skid buffer is empty, and signals back to other stages to unblock.
void sortInsts()
Sorts instructions coming from rename into lists separated by thread.
void wakeDependents(const DynInstPtr &inst)
Wakes all dependents of a completed instruction.
unsigned issueWidth
Width of issue, in instructions.
void updateExeInstStats(const DynInstPtr &inst)
Updates execution stats based on the instruction.
void dispatchInsts(ThreadID tid)
Dispatches instructions to IQ and LSQ.
void drainSanityCheck() const
Perform sanity checks after a drain.
TimeBuffer< IssueStruct > issueToExecQueue
Issue stage queue.
void checkSignalsAndUpdate(ThreadID tid)
Processes inputs and changes state accordingly.
void activateStage()
Tells CPU that the IEW stage is active and running.
TimeBuffer< TimeStruct >::wire toRename
Wire to write information heading to previous stages.
bool wroteToTimeBuffer
Records if IEW has written to the time buffer this cycle, so that the CPU can deschedule itself if th...
void activityThisCycle()
Reports to the CPU that there is activity this cycle.
void setScoreboard(Scoreboard *sb_ptr)
Sets pointer to the scoreboard.
Scoreboard * scoreboard
Scoreboard pointer.
std::queue< DynInstPtr > skidBuffer[MaxThreads]
Skid buffer between rename and IEW.
TimeBuffer< IssueStruct >::wire fromIssue
Wire to read information from the issue stage time queue.
Cycles renameToIEWDelay
Rename to IEW delay.
TimeBuffer< TimeStruct > * timeBuffer
Pointer to main time buffer used for backwards communication.
void writebackInsts()
Writebacks instructions.
void wakeCPU()
Tells the CPU to wakeup if it has descheduled itself due to no activity.
void squash(ThreadID tid)
Squashes instructions in IEW for a specific thread.
void setIEWQueue(TimeBuffer< IEWStruct > *iq_ptr)
Sets time buffer to pass on instructions to commit.
ProbePointArg< DynInstPtr > * ppExecute
To probe when instruction execution begins.
void rescheduleMemInst(const DynInstPtr &inst)
Tells memory dependence unit that a memory instruction needs to be rescheduled.
ThreadID numThreads
Number of active threads.
unsigned skidBufferMax
Maximum size of the skid buffer.
Status _status
Overall stage status.
TimeBuffer< RenameStruct >::wire fromRename
Wire to get rename's output from rename queue.
ProbePointArg< DynInstPtr > * ppMispredict
Probe points.
TimeBuffer< TimeStruct >::wire toFetch
Wire to write information heading to previous stages.
gem5::o3::IEW::IEWStats iewStats
bool isDrained() const
Has the stage drained?
InstructionQueue instQueue
Instruction queue.
bool fetchRedirect[MaxThreads]
Records if there is a fetch redirect on this cycle for each thread.
TimeBuffer< RenameStruct > * renameQueue
Rename instruction queue interface.
IEW(CPU *_cpu, const BaseO3CPUParams ¶ms)
Constructs a IEW with the given parameters.
unsigned dispatchWidth
Width of dispatch, in instructions.
ProbePointArg< DynInstPtr > * ppDispatch
void retryMemInst(const DynInstPtr &inst)
Moves memory instruction onto the list of retry memory instructions.
std::string name() const
Returns the name of the IEW stage.
void tick()
Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and Writeback to run for one cycle.
ProbePointArg< DynInstPtr > * ppToCommit
To probe when instruction execution is complete.
bool updatedQueues
Records if the queues have been changed (inserted or issued insts), so that IEW knows to broadcast th...
void checkMisprediction(const DynInstPtr &inst)
Check misprediction.
LSQ ldstQueue
Load / store queue.
Cycles issueToExecuteDelay
Issue to execute delay.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to list of active threads.
bool skidsEmpty()
Returns if all of the skid buffers are empty.
bool updateLSQNextCycle
Records if the LSQ needs to be updated on the next cycle, so that IEW knows if there will be activity...
void emptyRenameInsts(ThreadID tid)
Removes instructions from rename from a thread's instruction list.
void replayMemInst(const DynInstPtr &inst)
Re-executes all rescheduled memory instructions.
Cycles commitToIEWDelay
Commit to IEW delay.
unsigned wbCycle
Cycle number within the queue of instructions being written back.
void skidInsert(ThreadID tid)
Inserts unused instructions of a thread into the skid buffer.
void cacheUnblocked()
Notifies that the cache has become unblocked.
TimeBuffer< IEWStruct >::wire toCommit
Wire to write infromation heading to commit.
void regProbePoints()
Registers probes.
bool checkStall(ThreadID tid)
Checks if any of the stall conditions are currently true.
void executeInsts()
Executes instructions.
unsigned wbNumInst
Index into queue of instructions being written back.
void setRenameQueue(TimeBuffer< RenameStruct > *rq_ptr)
Sets time buffer for getting instructions coming from rename.
StageStatus wbStatus
Writeback status.
Implements a simple scoreboard to track which registers are ready.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
static constexpr int MaxThreads
void removeCommThreadInsts(ThreadID tid, CommStruct &comm_struct)
Remove instructions belonging to given thread from the given comm struct's instruction array.
RefCountingPtr< DynInst > DynInstPtr
static constexpr int MaxWidth
const FlagsType total
Print the total.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
Tick curTick()
The universal simulation clock.
constexpr decltype(nullptr) NoFault
Struct that defines the information passed from IEW to commit.
bool includeSquashInst[MaxThreads]
bool branchTaken[MaxThreads]
InstSeqNum squashedSeqNum[MaxThreads]
std::unique_ptr< PCStateBase > pc[MaxThreads]
bool branchMispredict[MaxThreads]
Addr mispredPC[MaxThreads]
DynInstPtr mispredictInst[MaxThreads]
statistics::Vector numSwp
Number of executed software prefetches.
statistics::Scalar numSquashedInsts
Stat for total number of squashed instructions skipped at execute.
ExecutedInstStats(CPU *cpu)
statistics::Scalar dispatchedInsts
Stat for total number of instructions dispatched.
statistics::Formula wbFanout
Average number of woken instructions per writeback.
statistics::Scalar squashCycles
Stat for total number of squashing cycles.
statistics::Vector consumerInst
Number of instructions that wake up from producers.
statistics::Scalar predictedNotTakenIncorrect
Stat for total number of incorrect predicted not taken branches.
statistics::Scalar dispLoadInsts
Stat for total number of dispatched load instructions.
statistics::Scalar dispNonSpecInsts
Stat for total number of dispatched non speculative insts.
statistics::Scalar idleCycles
Stat for total number of idle cycles.
statistics::Vector instsToCommit
Number of instructions sent to commit.
gem5::o3::IEW::IEWStats::ExecutedInstStats executedInstStats
statistics::Formula wbRate
Number of instructions per cycle written back.
statistics::Scalar dispSquashedInsts
Stat for total number of squashed instructions dispatch skips.
statistics::Scalar predictedTakenIncorrect
Stat for total number of incorrect predicted taken branches.
statistics::Scalar blockCycles
Stat for total number of blocking cycles.
statistics::Vector writebackCount
Number of instructions that writeback.
statistics::Scalar memOrderViolationEvents
Stat for total number of memory ordering violation events.
statistics::Vector producerInst
Number of instructions that wake consumers.
statistics::Scalar iqFullEvents
Stat for number of times the IQ becomes full.
statistics::Scalar unblockCycles
Stat for total number of unblocking cycles.
statistics::Scalar lsqFullEvents
Stat for number of times the LSQ becomes full.
statistics::Formula branchMispredicts
Stat for total number of mispredicted branches detected at execute.
statistics::Scalar dispStoreInsts
Stat for total number of dispatched store instructions.
Struct that defines all backwards communication.
bool iewBlock[MaxThreads]
bool iewUnblock[MaxThreads]
IewComm iewInfo[MaxThreads]