55#include "debug/Activity.hh"
56#include "debug/Drain.hh"
57#include "debug/IEW.hh"
58#include "params/BaseO3CPU.hh"
84 fatal(
"dispatchWidth (%d) is larger than compiled limit (%d),\n"
85 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
88 fatal(
"issueWidth (%d) is larger than compiled limit (%d),\n"
89 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
92 fatal(
"wbWidth (%d) is larger than compiled limit (%d),\n"
93 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
119 return cpu->name() +
".iew";
126 cpu->getProbeManager(),
"Dispatch");
128 cpu->getProbeManager(),
"Mispredict");
134 cpu->getProbeManager(),
"Execute");
140 cpu->getProbeManager(),
"ToCommit");
146 "Number of cycles IEW is idle"),
148 "Number of cycles IEW is squashing"),
150 "Number of cycles IEW is blocking"),
152 "Number of cycles IEW is unblocking"),
154 "Number of instructions dispatched to IQ"),
156 "Number of squashed instructions skipped by dispatch"),
158 "Number of dispatched load instructions"),
160 "Number of dispatched store instructions"),
162 "Number of dispatched non-speculative instructions"),
164 "Number of times the IQ has become full, causing a stall"),
166 "Number of times the LSQ has become full, causing a stall"),
168 "Number of memory order violations"),
170 "Number of branches that were predicted taken incorrectly"),
172 "Number of branches that were predicted not taken incorrectly"),
174 "Number of branch mispredicts detected at execute",
178 "Cumulative count of insts sent to commit"),
180 "Cumulative count of insts written-back"),
182 "Number of instructions producing a value"),
184 "Number of instructions consuming a value"),
187 "Insts written-back per cycle"),
190 "Average fanout of values written-back")
193 .init(
cpu->numThreads)
197 .init(
cpu->numThreads)
201 .init(
cpu->numThreads)
205 .init(
cpu->numThreads)
220 "Number of squashed instructions skipped in execute"),
222 "Number of swp insts executed")
225 .init(
cpu->numThreads)
233 toRename->iewInfo[tid].usedIQ =
true;
234 toRename->iewInfo[tid].freeIQEntries =
237 toRename->iewInfo[tid].usedLSQ =
true;
238 toRename->iewInfo[tid].freeLQEntries =
240 toRename->iewInfo[tid].freeSQEntries =
255 toRename->iewInfo[tid].usedIQ =
true;
256 toRename->iewInfo[tid].freeIQEntries =
259 toRename->iewInfo[tid].usedLSQ =
true;
264 for (
int i = -
cpu->iewQueue.getPast();
271 iew_struct.
pc[tid] =
nullptr;
272 iew_struct.
squash[tid] =
false;
285 for (
int i = -
cpu->timeBuffer.getPast();
350 if (!
insts[tid].empty()) {
351 DPRINTF(Drain,
"%i: Insts not empty.\n", tid);
355 DPRINTF(Drain,
"%i: Skid buffer not empty.\n", tid);
364 if (drained && !
fuPool->isDrained()) {
365 DPRINTF(Drain,
"FU pool still busy.\n");
394 cpu->activityThisCycle();
411 DPRINTF(
IEW,
"[tid:%i] Squashing all instructions.\n", tid);
422 "Removing skidbuffer instructions until "
423 "[sn:%llu] [tid:%i]\n",
428 toRename->iewInfo[tid].dispatchedToLQ++;
432 toRename->iewInfo[tid].dispatchedToSQ++;
435 toRename->iewInfo[tid].dispatched++;
446 DPRINTF(
IEW,
"[tid:%i] [sn:%llu] Squashing from a specific instruction,"
448 "\n", tid, inst->seqNum, inst->pcState() );
451 inst->seqNum <
toCommit->squashedSeqNum[tid]) {
453 toCommit->squashedSeqNum[tid] = inst->seqNum;
454 toCommit->branchTaken[tid] = inst->pcState().branching();
457 inst->staticInst->advancePC(*
toCommit->pc[tid]);
459 toCommit->mispredictInst[tid] = inst;
460 toCommit->includeSquashInst[tid] =
false;
470 DPRINTF(
IEW,
"[tid:%i] Memory violation, squashing violator and younger "
471 "insts, PC: %s [sn:%llu].\n", tid, inst->pcState(), inst->seqNum);
479 inst->seqNum <=
toCommit->squashedSeqNum[tid]) {
482 toCommit->squashedSeqNum[tid] = inst->seqNum;
484 toCommit->mispredictInst[tid] = NULL;
487 toCommit->includeSquashInst[tid] =
true;
514 DPRINTF(
IEW,
"[tid:%i] Reading instructions out of the skid "
515 "buffer %u.\n",tid, tid);
522 DPRINTF(
IEW,
"[tid:%i] Done unblocking.\n",tid);
584 DPRINTF(
IEW,
"Current wb cycle: %i, width: %i, numInst: %i\nwbActual:%i\n",
596 while (!
insts[tid].empty()) {
597 inst =
insts[tid].front();
601 DPRINTF(
IEW,
"[tid:%i] Inserting [sn:%lli] PC:%s into "
602 "dispatch skidBuffer %i\n",tid, inst->seqNum,
603 inst->pcState(),tid);
609 "Skidbuffer Exceeded Max Size");
618 unsigned thread_count =
skidBuffer[tid].size();
619 if (max < thread_count)
640 bool any_unblocking =
false;
644 any_unblocking =
true;
654 !
ldstQueue.willWB() && !any_unblocking) {
677 if (
fromCommit->commitInfo[tid].robSquashing) {
678 DPRINTF(
IEW,
"[tid:%i] Stall from Commit stage detected.\n",tid);
681 DPRINTF(
IEW,
"[tid:%i] Stall: IQ is full.\n",tid);
712 if (
fromCommit->commitInfo[tid].robSquashing) {
713 DPRINTF(
IEW,
"[tid:%i] ROB is still squashing.\n", tid);
729 DPRINTF(
IEW,
"[tid:%i] Done blocking, switching to unblocking.\n",
742 DPRINTF(
IEW,
"[tid:%i] Done squashing, switching to running.\n",
757 assert(
insts[tid].empty());
759 for (
int i = 0;
i < insts_from_rename; ++
i) {
767 DPRINTF(
IEW,
"[tid:%i] Removing incoming rename instructions\n", tid);
769 while (!
insts[tid].empty()) {
771 if (
insts[tid].front()->isLoad()) {
772 toRename->iewInfo[tid].dispatchedToLQ++;
774 if (
insts[tid].front()->isStore() ||
775 insts[tid].front()->isAtomic()) {
776 toRename->iewInfo[tid].dispatchedToSQ++;
779 toRename->iewInfo[tid].dispatched++;
794 DPRINTF(Activity,
"Activity this cycle.\n");
795 cpu->activityThisCycle();
801 DPRINTF(Activity,
"Activating stage.\n");
808 DPRINTF(Activity,
"Deactivating stage.\n");
833 DPRINTF(
IEW,
"[tid:%i] Not blocked, so attempting to run "
864 std::queue<DynInstPtr> &insts_to_dispatch =
868 int insts_to_add = insts_to_dispatch.size();
871 bool add_to_iq =
false;
872 int dis_num_inst = 0;
876 for ( ; dis_num_inst < insts_to_add &&
880 inst = insts_to_dispatch.front();
883 DPRINTF(
IEW,
"[tid:%i] Issue: Examining instruction from skid "
890 DPRINTF(
IEW,
"[tid:%i] Issue: Adding PC %s [sn:%lli] [tid:%i] to "
892 tid, inst->pcState(), inst->seqNum, inst->threadNumber);
899 if (inst->isSquashed()) {
900 DPRINTF(
IEW,
"[tid:%i] Issue: Squashed instruction encountered, "
901 "not adding to IQ.\n", tid);
905 insts_to_dispatch.pop();
908 if (inst->isLoad()) {
909 toRename->iewInfo[tid].dispatchedToLQ++;
911 if (inst->isStore() || inst->isAtomic()) {
912 toRename->iewInfo[tid].dispatchedToSQ++;
915 toRename->iewInfo[tid].dispatched++;
922 DPRINTF(
IEW,
"[tid:%i] Issue: IQ has become full.\n", tid);
937 if ((inst->isAtomic() &&
ldstQueue.sqFull(tid)) ||
938 (inst->isLoad() &&
ldstQueue.lqFull(tid)) ||
939 (inst->isStore() &&
ldstQueue.sqFull(tid))) {
940 DPRINTF(
IEW,
"[tid:%i] Issue: %s has become full.\n",tid,
941 inst->isLoad() ?
"LQ" :
"SQ");
957 const int numHtmStarts =
ldstQueue.numHtmStarts(tid);
958 const int numHtmStops =
ldstQueue.numHtmStops(tid);
959 const int htmDepth = numHtmStarts - numHtmStops;
962 inst->setHtmTransactionalState(
ldstQueue.getLatestHtmUid(tid),
965 inst->clearHtmTransactionalState();
970 if (inst->isAtomic()) {
971 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
972 "encountered, adding to LSQ.\n", tid);
981 inst->setCanCommit();
987 toRename->iewInfo[tid].dispatchedToSQ++;
988 }
else if (inst->isLoad()) {
989 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
990 "encountered, adding to LSQ.\n", tid);
1000 toRename->iewInfo[tid].dispatchedToLQ++;
1001 }
else if (inst->isStore()) {
1002 DPRINTF(
IEW,
"[tid:%i] Issue: Memory instruction "
1003 "encountered, adding to LSQ.\n", tid);
1009 if (inst->isStoreConditional()) {
1014 inst->setCanCommit();
1023 toRename->iewInfo[tid].dispatchedToSQ++;
1024 }
else if (inst->isReadBarrier() || inst->isWriteBarrier()) {
1026 inst->setCanCommit();
1029 }
else if (inst->isNop()) {
1030 DPRINTF(
IEW,
"[tid:%i] Issue: Nop instruction encountered, "
1031 "skipping.\n", tid);
1034 inst->setExecuted();
1035 inst->setCanCommit();
1039 cpu->executeStats[tid]->numNop++;
1043 assert(!inst->isExecuted());
1047 if (add_to_iq && inst->isNonSpeculative()) {
1048 DPRINTF(
IEW,
"[tid:%i] Issue: Nonspeculative instruction "
1049 "encountered, skipping.\n", tid);
1052 inst->setCanCommit();
1068 insts_to_dispatch.pop();
1070 toRename->iewInfo[tid].dispatched++;
1074 inst->dispatchTick =
curTick() - inst->fetchTick;
1079 if (!insts_to_dispatch.empty()) {
1080 DPRINTF(
IEW,
"[tid:%i] Issue: Bandwidth Full. Blocking.\n", tid);
1099 std::cout <<
"Available Instructions: ";
1103 if (inst%3==0) std::cout <<
"\n\t";
1105 std::cout <<
"PC: " <<
fromIssue->insts[inst]->pcState()
1106 <<
" TN: " <<
fromIssue->insts[inst]->threadNumber
1107 <<
" SN: " <<
fromIssue->insts[inst]->seqNum <<
" | ";
1133 for (; inst_num < insts_to_execute;
1136 DPRINTF(
IEW,
"Execute: Executing instructions from IQ.\n");
1140 DPRINTF(
IEW,
"Execute: Processing PC %s, [tid:%i] [sn:%llu].\n",
1141 inst->pcState(), inst->threadNumber,inst->seqNum);
1148 if (inst->isSquashed()) {
1149 DPRINTF(
IEW,
"Execute: Instruction was squashed. PC: %s, [tid:%i]"
1150 " [sn:%llu]\n", inst->pcState(), inst->threadNumber,
1155 inst->setExecuted();
1159 inst->setCanCommit();
1161 ++
iewStats.executedInstStats.numSquashedInsts;
1171 if (inst->isMemRef()) {
1172 DPRINTF(
IEW,
"Execute: Calculating address for memory "
1176 if (inst->isAtomic()) {
1180 if (inst->isTranslationDelayed() &&
1184 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1189 }
else if (inst->isLoad()) {
1194 if (inst->isTranslationDelayed() &&
1198 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1204 if (inst->isDataPrefetch() || inst->isInstPrefetch()) {
1207 }
else if (inst->isStore()) {
1210 if (inst->isTranslationDelayed() &&
1214 DPRINTF(
IEW,
"Execute: Delayed translation, deferring "
1221 if (fault !=
NoFault || !inst->readPredicate() ||
1222 !inst->isStoreConditional()) {
1227 inst->setExecuted();
1236 panic(
"Unexpected memory type!\n");
1244 if (inst->getFault() ==
NoFault) {
1246 if (!inst->readPredicate())
1247 inst->forwardOldRegs();
1250 inst->setExecuted();
1269 toCommit->squashedSeqNum[tid] > inst->seqNum) {
1273 bool loadNotExecuted = !inst->isExecuted() && inst->isLoad();
1275 if (inst->mispredicted() && !loadNotExecuted) {
1279 "Branch mispredict detected.\n",
1282 "Predicted target was PC: %s\n",
1283 tid, inst->seqNum, inst->readPredTarg());
1285 "Redirecting fetch to PC: %s\n",
1286 tid, inst->seqNum, inst->pcState());
1292 if (inst->readPredTaken()) {
1293 iewStats.predictedTakenIncorrect++;
1295 iewStats.predictedNotTakenIncorrect++;
1298 assert(inst->isMemRef());
1303 violator =
ldstQueue.getMemDepViolator(tid);
1305 DPRINTF(
IEW,
"LDSTQ detected a violation. Violator PC: %s "
1306 "[sn:%lli], inst PC: %s [sn:%lli]. Addr is: %#x.\n",
1307 violator->pcState(), violator->seqNum,
1308 inst->pcState(), inst->seqNum, inst->physEffAddr);
1318 ++
iewStats.memOrderViolationEvents;
1324 assert(inst->isMemRef());
1328 DPRINTF(
IEW,
"LDSTQ detected a violation. Violator PC: "
1329 "%s, inst PC: %s. Addr is: %#x.\n",
1330 violator->pcState(), inst->pcState(),
1332 DPRINTF(
IEW,
"Violation will not be handled because "
1333 "already squashing\n");
1335 ++
iewStats.memOrderViolationEvents;
1348 cpu->activityThisCycle();
1366 for (
int inst_num = 0; inst_num <
wbWidth &&
1367 toCommit->insts[inst_num]; inst_num++) {
1371 DPRINTF(
IEW,
"Sending instructions to commit, [sn:%lli] PC %s.\n",
1372 inst->seqNum, inst->pcState());
1384 if (!inst->isSquashed() && inst->isExecuted() &&
1385 inst->getFault() ==
NoFault) {
1386 int dependents =
instQueue.wakeDependents(inst);
1388 for (
int i = 0;
i < inst->numDestRegs();
i++) {
1390 if (inst->renamedDestIdx(
i)->
1391 getNumPinnedWritesToComplete() == 0) {
1392 DPRINTF(
IEW,
"Setting Destination Register %i (%s)\n",
1393 inst->renamedDestIdx(
i)->index(),
1394 inst->renamedDestIdx(
i)->className());
1401 iewStats.consumerInst[tid]+= dependents;
1422 fuPool->processFreeUnits();
1426 DPRINTF(
IEW,
"Issue: Processing [tid:%i]\n", tid);
1447 bool broadcast_free_entries =
false;
1453 broadcast_free_entries =
true;
1467 if (
fromCommit->commitInfo[tid].doneSeqNum != 0 &&
1479 if (
fromCommit->commitInfo[tid].nonSpecSeqNum != 0) {
1482 if (
fromCommit->commitInfo[tid].strictlyOrdered) {
1484 fromCommit->commitInfo[tid].strictlyOrderedLoad);
1485 fromCommit->commitInfo[tid].strictlyOrderedLoad->setAtCommit();
1492 if (broadcast_free_entries) {
1493 toFetch->iewInfo[tid].iqCount =
1495 toFetch->iewInfo[tid].ldstqCount =
1498 toRename->iewInfo[tid].usedIQ =
true;
1499 toRename->iewInfo[tid].freeIQEntries =
1501 toRename->iewInfo[tid].usedLSQ =
true;
1503 toRename->iewInfo[tid].freeLQEntries =
1505 toRename->iewInfo[tid].freeSQEntries =
1511 DPRINTF(
IEW,
"[tid:%i], Dispatch dispatched %i instructions.\n",
1512 tid,
toRename->iewInfo[tid].dispatched);
1515 DPRINTF(
IEW,
"IQ has %i free entries (Can schedule: %i). "
1516 "LQ has %i free entries. SQ has %i free entries.\n",
1523 DPRINTF(Activity,
"Activity this cycle.\n");
1524 cpu->activityThisCycle();
1533 cpu->executeStats[tid]->numInsts++;
1535 inst->completeTick =
curTick() - inst->fetchTick;
1540 if (inst->isInteger()) {
1541 cpu->executeStats[tid]->numIntAluAccesses++;
1544 if (inst->isFloating()) {
1545 cpu->executeStats[tid]->numFpAluAccesses++;
1548 if (inst->isVector()) {
1549 cpu->executeStats[tid]->numVecAluAccesses++;
1555 if (inst->isControl()) {
1556 cpu->executeStats[tid]->numBranches++;
1562 if (inst->isMemRef()) {
1563 cpu->executeStats[tid]->numMemRefs++;
1565 if (inst->isLoad()) {
1566 cpu->executeStats[tid]->numLoadInsts++;
1578 toCommit->squashedSeqNum[tid] > inst->seqNum) {
1580 if (inst->mispredicted()) {
1584 "Branch mispredict detected.\n",
1586 DPRINTF(
IEW,
"[tid:%i] [sn:%llu] Predicted target was PC: %s\n",
1587 tid, inst->seqNum, inst->readPredTarg());
1589 "Redirecting fetch to PC: %s\n",
1590 tid, inst->seqNum, inst->pcState());
1594 if (inst->readPredTaken()) {
1595 iewStats.predictedTakenIncorrect++;
1597 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]