59#include "debug/Activity.hh"
60#include "debug/Commit.hh"
61#include "debug/CommitRate.hh"
62#include "debug/Drain.hh"
63#include "debug/ExecFaulting.hh"
64#include "debug/HtmCpu.hh"
65#include "debug/O3PipeView.hh"
66#include "params/BaseO3CPU.hh"
102 fatal(
"commitWidth (%d) is larger than compiled limit (%d),\n"
103 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
122 pc[tid].reset(params.isa[0]->newPCState());
141 cpu->getProbeManager(),
"Commit");
143 cpu->getProbeManager(),
"CommitStall");
145 cpu->getProbeManager(),
"Squash");
151 "The number of squashed insts skipped by commit"),
153 "The number of times commit has been forced to stall to "
154 "communicate backwards"),
156 "The number of times a branch was mispredicted"),
158 "Number of insts commited each cycle"),
160 "Number of atomic instructions committed"),
162 "Number of memory barriers committed"),
164 "Number of function calls committed."),
166 "Class of committed instruction"),
168 "number cycles where commit BW limit reached")
177 .init(0,
commit->commitWidth,1)
181 .init(
cpu->numThreads)
185 .init(
cpu->numThreads)
193 .init(
commit->numThreads,enums::Num_OpClass)
273 toIEW->commitInfo[tid].usedROB =
true;
274 toIEW->commitInfo[tid].freeROBEntries =
rob->numFreeEntries(tid);
275 toIEW->commitInfo[tid].emptyROB =
true;
282 cpu->activityThisCycle();
295 pc[tid].reset(
cpu->tcBase(tid)->getIsaPtr()->newPCState());
302 cpu->timeBuffer[
i].commitInfo[tid] = {};
319 rob->drainSanityCheck();
325 panic(
"cannot drain partially through a HTM transaction");
343 if (
pc[tid]->microPC() != 0)
353 return rob->isEmpty() &&
375 auto thread_it = std::find(
418 DPRINTF(Activity,
"Deactivating stage.\n");
421 DPRINTF(Activity,
"Activating stage.\n");
443 return rob->numFreeEntries(tid);
449 DPRINTF(
Commit,
"Generating trap event for [tid:%i]\n", tid);
455 Cycles latency = std::dynamic_pointer_cast<SyscallRetryFault>(inst_fault) ?
459 if (inst_fault !=
nullptr &&
460 std::dynamic_pointer_cast<GenericHtmFailureFault>(inst_fault)) {
466 cpu->schedule(trap,
cpu->clockEdge(latency));
468 thread[tid]->trapPending =
true;
475 DPRINTF(
Commit,
"Generating TC squash event for [tid:%i]\n", tid);
495 rob->squash(squashed_inst, tid);
499 toIEW->commitInfo[tid].doneSeqNum = squashed_inst;
503 toIEW->commitInfo[tid].squash =
true;
507 toIEW->commitInfo[tid].robSquashing =
true;
509 toIEW->commitInfo[tid].mispredictInst = NULL;
510 toIEW->commitInfo[tid].squashInst = NULL;
520 DPRINTF(
Commit,
"Squashing from trap, restarting at PC %s\n", *
pc[tid]);
522 thread[tid]->trapPending =
false;
523 thread[tid]->noSquashFromTC =
false;
529 cpu->activityThisCycle();
539 thread[tid]->noSquashFromTC =
false;
540 assert(!
thread[tid]->trapPending);
543 cpu->activityThisCycle();
552 "restarting at PC %s\n", *
pc[tid]);
562 cpu->activityThisCycle();
568 DPRINTF(
Commit,
"Executing squash after for [tid:%i] inst [sn:%llu]\n",
569 tid, head_inst->seqNum);
594 if (
rob->isDoneSquashing(tid)) {
598 " insts this cycle.\n", tid);
600 toIEW->commitInfo[tid].robSquashing =
true;
611 if (!
rob->isEmpty(tid) &&
rob->readHeadInst(tid)->readyToCommit()) {
616 [[maybe_unused]]
const DynInstPtr &inst =
rob->readHeadInst(tid);
618 DPRINTF(
Commit,
"[tid:%i] Instruction [sn:%llu] PC %s is head of"
619 " ROB and ready to commit\n",
620 tid, inst->seqNum, inst->pcState());
622 }
else if (!
rob->isEmpty(tid)) {
627 DPRINTF(
Commit,
"[tid:%i] Can't commit, Instruction [sn:%llu] PC "
628 "%s is head of ROB and not ready\n",
629 tid, inst->seqNum, inst->pcState());
632 DPRINTF(
Commit,
"[tid:%i] ROB has %d insts & %d free entries.\n",
633 tid,
rob->countInsts(tid),
rob->numFreeEntries(tid));
638 DPRINTF(Activity,
"Activity This Cycle.\n");
639 cpu->activityThisCycle();
649 if (!
cpu->checkInterrupts(0)) {
650 DPRINTF(
Commit,
"Pending interrupt is cleared by requestor before "
651 "it got handled. Restart fetching from the orig path.\n");
652 toIEW->commitInfo[0].clearInterrupt =
true;
666 toIEW->commitInfo[0].clearInterrupt =
true;
668 assert(!
thread[0]->noSquashFromTC);
669 thread[0]->noSquashFromTC =
true;
672 cpu->checker->handlePendingInt();
678 cpu->processInterrupts(
cpu->getInterrupts());
680 thread[0]->noSquashFromTC =
false;
692 "flight, ROB is %sempty\n",
694 cpu->instList.empty() ?
"" :
"not " );
719 toIEW->commitInfo[0].interruptPending =
true;
727 if (
cpu->checkInterrupts(0))
735 int num_squashing_threads = 0;
747 if (
cpu->isThreadExiting(tid))
748 cpu->scheduleThreadExitEvent(tid);
766 if (
fromIEW->mispredictInst[tid]) {
768 "[tid:%i] Squashing due to branch mispred "
769 "PC:%#x [sn:%llu]\n",
771 fromIEW->mispredictInst[tid]->pcState().instAddr(),
775 "[tid:%i] Squashing due to order violation [sn:%llu]\n",
776 tid,
fromIEW->squashedSeqNum[tid]);
788 if (
fromIEW->includeSquashInst[tid]) {
796 rob->squash(squashed_inst, tid);
799 toIEW->commitInfo[tid].doneSeqNum = squashed_inst;
801 toIEW->commitInfo[tid].squash =
true;
805 toIEW->commitInfo[tid].robSquashing =
true;
807 toIEW->commitInfo[tid].mispredictInst =
809 toIEW->commitInfo[tid].branchTaken =
811 toIEW->commitInfo[tid].squashInst =
812 rob->findInst(tid, squashed_inst);
813 if (
toIEW->commitInfo[tid].mispredictInst) {
814 if (
toIEW->commitInfo[tid].mispredictInst->isUncondCtrl()) {
815 toIEW->commitInfo[tid].branchTaken =
true;
817 ++
stats.branchMispredicts;
824 num_squashing_threads++;
830 if (num_squashing_threads) {
845 toIEW->commitInfo[tid].usedROB =
true;
846 toIEW->commitInfo[tid].freeROBEntries =
rob->numFreeEntries(tid);
850 if (
rob->isEmpty(tid))
865 toIEW->commitInfo[tid].usedROB =
true;
866 toIEW->commitInfo[tid].emptyROB =
true;
867 toIEW->commitInfo[tid].freeROBEntries =
rob->numFreeEntries(tid);
886 DPRINTF(
Commit,
"Trying to commit instructions in the ROB.\n");
888 unsigned num_committed = 0;
906 cpu->clearInterrupts(0);
907 toIEW->commitInfo[0].clearInterrupt =
true;
917 if (commit_thread == -1 || !
rob->isHeadReady(commit_thread))
920 head_inst =
rob->readHeadInst(commit_thread);
922 ThreadID tid = head_inst->threadNumber;
924 assert(tid == commit_thread);
927 "Trying to commit head instruction, [tid:%i] [sn:%llu]\n",
928 tid, head_inst->seqNum);
932 if (head_inst->isSquashed()) {
937 rob->retireHead(commit_thread);
939 ++
stats.commitSquashedInsts;
948 }
else if (head_inst->noCapableFU() &&
949 head_inst->getFault() ==
NoFault) {
950 panic(
"CPU cannot execute [sn:%llu] op_class: %u but"
951 " did not trigger a fault. Do you need to update"
952 " the configuration and add a functional unit for"
955 head_inst->opClass());
957 set(
pc[tid], head_inst->pcState());
960 bool commit_success =
commitHead(head_inst, num_committed);
962 if (commit_success) {
964 cpu->commitStats[tid]
965 ->committedInstType[head_inst->opClass()]++;
966 stats.committedInstType[tid][head_inst->opClass()]++;
972 if (head_inst->isHtmStart())
976 if (head_inst->inHtmTransactionalState()) {
983 if (head_inst->isHtmStop())
989 toIEW->commitInfo[tid].doneSeqNum = head_inst->seqNum;
996 assert(!head_inst->isStoreConditional() ||
997 head_inst->isCompleted() ||
998 !head_inst->readPredicate());
1001 head_inst->updateMiscRegs();
1006 cpu->checker->verify(head_inst);
1009 cpu->traceFunctions(
pc[tid]->instAddr());
1011 head_inst->staticInst->advancePC(*
pc[tid]);
1018 if (head_inst->isSquashAfter())
1023 !
thread[tid]->trapPending) {
1027 DPRINTF(Drain,
"Draining: %i:%s\n", tid, *
pc[tid]);
1029 cpu->commitDrained(tid);
1034 bool onInstBoundary = !head_inst->isMicroop() ||
1035 head_inst->isLastMicroop() ||
1036 !head_inst->isDelayedCommit();
1038 if (onInstBoundary) {
1043 assert(!
thread[tid]->noSquashFromTC &&
1044 !
thread[tid]->trapPending);
1046 oldpc =
pc[tid]->instAddr();
1047 thread[tid]->pcEventQueue.service(
1048 oldpc,
thread[tid]->getTC());
1050 }
while (oldpc !=
pc[tid]->instAddr());
1053 "PC skip function event, stopping commit\n");
1067 onInstBoundary &&
cpu->checkInterrupts(0))
1071 "[tid:%i] [sn:%llu].\n",
1072 head_inst->pcState(), tid ,head_inst->seqNum);
1078 DPRINTF(CommitRate,
"%i\n", num_committed);
1079 stats.numCommittedDist.sample(num_committed);
1082 stats.commitEligibleSamples++;
1091 ThreadID tid = head_inst->threadNumber;
1095 if (!head_inst->isExecuted()) {
1098 assert(head_inst->isNonSpeculative() || head_inst->isStoreConditional()
1099 || head_inst->isReadBarrier() || head_inst->isWriteBarrier()
1100 || head_inst->isAtomic()
1101 || (head_inst->isLoad() && head_inst->strictlyOrdered()));
1104 "Encountered a barrier or non-speculative "
1105 "instruction [tid:%i] [sn:%llu] "
1106 "at the head of the ROB, PC %s.\n",
1107 tid, head_inst->seqNum, head_inst->pcState());
1109 if (inst_num > 0 ||
iewStage->hasStoresToWB(tid)) {
1111 "[tid:%i] [sn:%llu] "
1112 "Waiting for all stores to writeback.\n",
1113 tid, head_inst->seqNum);
1117 toIEW->commitInfo[tid].nonSpecSeqNum = head_inst->seqNum;
1121 head_inst->clearCanCommit();
1123 if (head_inst->isLoad() && head_inst->strictlyOrdered()) {
1125 "Strictly ordered load, PC %s.\n",
1126 tid, head_inst->seqNum, head_inst->pcState());
1127 toIEW->commitInfo[tid].strictlyOrdered =
true;
1128 toIEW->commitInfo[tid].strictlyOrderedLoad = head_inst;
1130 ++
stats.commitNonSpecStalls;
1137 Fault inst_fault = head_inst->getFault();
1142 if (inst_fault !=
NoFault && head_inst->inHtmTransactionalState()) {
1144 if (!std::dynamic_pointer_cast<GenericHtmFailureFault>(inst_fault)) {
1145 DPRINTF(HtmCpu,
"%s - fault (%s) encountered within transaction"
1146 " - converting to GenericHtmFailureFault\n",
1147 head_inst->staticInst->getName(), inst_fault->name());
1148 inst_fault = std::make_shared<GenericHtmFailureFault>(
1149 head_inst->getHtmTransactionUid(),
1157 if (!head_inst->isStore() && inst_fault ==
NoFault) {
1158 head_inst->setCompleted();
1162 DPRINTF(
Commit,
"Inst [tid:%i] [sn:%llu] PC %s has a fault\n",
1163 tid, head_inst->seqNum, head_inst->pcState());
1165 if (
iewStage->hasStoresToWB(tid) || inst_num > 0) {
1167 "[tid:%i] [sn:%llu] "
1168 "Stores outstanding, fault must wait.\n",
1169 tid, head_inst->seqNum);
1173 head_inst->setCompleted();
1179 cpu->checker->verify(head_inst);
1182 assert(!
thread[tid]->noSquashFromTC);
1186 thread[tid]->noSquashFromTC =
true;
1194 cpu->trap(inst_fault, tid,
1196 head_inst->staticInst);
1199 thread[tid]->noSquashFromTC =
false;
1204 "[tid:%i] [sn:%llu] Committing instruction with fault\n",
1205 tid, head_inst->seqNum);
1206 if (head_inst->traceData) {
1209 if (debug::ExecFaulting
1210 &&
dynamic_cast<ReExec*
>(inst_fault.get()) ==
nullptr) {
1212 head_inst->traceData->setFaulting(
true);
1213 head_inst->traceData->setFetchSeq(head_inst->seqNum);
1214 head_inst->traceData->setCPSeq(
thread[tid]->numOp);
1215 head_inst->traceData->dump();
1217 delete head_inst->traceData;
1218 head_inst->traceData = NULL;
1229 "[tid:%i] [sn:%llu] Committing instruction with PC %s\n",
1230 tid, head_inst->seqNum, head_inst->pcState());
1231 if (head_inst->traceData) {
1232 head_inst->traceData->setFetchSeq(head_inst->seqNum);
1233 head_inst->traceData->setCPSeq(
thread[tid]->numOp);
1234 head_inst->traceData->dump();
1235 delete head_inst->traceData;
1236 head_inst->traceData = NULL;
1238 if (head_inst->isReturn()) {
1240 "[tid:%i] [sn:%llu] Return Instruction Committed PC %s \n",
1241 tid, head_inst->seqNum, head_inst->pcState());
1245 for (
int i = 0;
i < head_inst->numDestRegs();
i++) {
1246 renameMap[tid]->setEntry(head_inst->flattenedDestIdx(
i),
1247 head_inst->renamedDestIdx(
i));
1252 if (head_inst->isHtmStart())
1253 iewStage->setLastRetiredHtmUid(tid, head_inst->getHtmTransactionUid());
1256 rob->retireHead(tid);
1259 if (debug::O3PipeView) {
1260 head_inst->commitTick =
curTick() - head_inst->fetchTick;
1265 if (head_inst->isStore() || head_inst->isAtomic())
1275 DPRINTF(
Commit,
"Getting instructions from Rename stage.\n");
1280 for (
int inst_num = 0; inst_num < insts_to_process; ++inst_num) {
1284 if (!inst->isSquashed() &&
1289 DPRINTF(
Commit,
"[tid:%i] [sn:%llu] Inserting PC %s into ROB.\n",
1290 tid, inst->seqNum, inst->pcState());
1292 rob->insertInst(inst);
1294 assert(
rob->getThreadEntries(tid) <=
rob->getMaxEntries(tid));
1299 "Instruction PC %s was squashed, skipping.\n",
1300 tid, inst->seqNum, inst->pcState());
1310 for (
int inst_num = 0; inst_num <
fromIEW->size; ++inst_num) {
1311 assert(
fromIEW->insts[inst_num]);
1312 if (!
fromIEW->insts[inst_num]->isSquashed()) {
1315 fromIEW->insts[inst_num]->threadNumber,
1316 fromIEW->insts[inst_num]->pcState(),
1317 fromIEW->insts[inst_num]->seqNum);
1320 fromIEW->insts[inst_num]->setCanCommit();
1330 if (!inst->isMicroop() || inst->isLastMicroop()) {
1331 cpu->commitStats[tid]->numInsts++;
1332 cpu->baseStats.numInsts++;
1334 cpu->commitStats[tid]->numOps++;
1338 if (!inst->isNop() && !inst->isInstPrefetch()) {
1339 cpu->instDone(tid, inst);
1345 cpu->commitStats[tid]->updateComCtrlStats(inst->staticInst);
1350 if (inst->isMemRef()) {
1351 cpu->commitStats[tid]->numMemRefs++;
1353 if (inst->isLoad()) {
1354 cpu->commitStats[tid]->numLoadInsts++;
1357 if (inst->isStore()) {
1358 cpu->commitStats[tid]->numStoreInsts++;
1362 if (inst->isFullMemBarrier()) {
1363 stats.membars[tid]++;
1367 if (inst->isInteger()) {
1368 cpu->commitStats[tid]->numIntInsts++;
1372 if (inst->isFloating()) {
1373 cpu->commitStats[tid]->numFpInsts++;
1376 if (inst->isVector()) {
1377 cpu->commitStats[tid]->numVecInsts++;
1382 stats.functionCalls[tid]++;
1402 if (
cpu->isThreadExiting(tid) &&
1403 !
rob->isEmpty(tid) &&
1407 assert(
rob->isHeadReady(tid) &&
1408 rob->readHeadInst(tid)->isSquashed());
1414 case CommitPolicy::RoundRobin:
1417 case CommitPolicy::OldestReady:
1443 while (pri_iter != end) {
1450 if (
rob->isHeadReady(tid)) {
1467 unsigned oldest = 0;
1468 unsigned oldest_seq_num = 0;
1472 if (!
rob->isEmpty(tid) &&
1477 if (
rob->isHeadReady(tid)) {
1483 oldest_seq_num = head_inst->seqNum;
1485 }
else if (head_inst->seqNum < oldest_seq_num) {
1487 oldest_seq_num = head_inst->seqNum;
Cycles is a wrapper class for representing cycle counts, i.e.
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...
ThreadStatus commitStatus[MaxThreads]
Per-thread status.
TimeBuffer< IEWStruct >::wire fromIEW
Wire to read information from IEW queue.
std::vector< ThreadState * > thread
Vector of all of the threads.
ThreadID oldestReady()
Returns the thread ID to use based on an oldest instruction policy.
ProbePointArg< DynInstPtr > * ppCommitStall
void squashFromSquashAfter(ThreadID tid)
Handles a squash from a squashAfter() request.
void squashAll(ThreadID tid)
Squashes all in flight instructions.
void startupStage()
Initializes stage by sending back the number of free entries.
bool changedROBNumEntries[MaxThreads]
Records if the number of ROB entries has changed this cycle.
bool changedROBEntries()
Returns if any of the threads have the number of ROB entries changed on this cycle.
DynInstPtr squashAfterInst[MaxThreads]
Instruction passed to squashAfter().
bool executingHtmTransaction(ThreadID) const
Is the CPU currently processing a HTM transaction?
CommitStatus _status
Overall commit status.
gem5::o3::Commit::CommitStats stats
void setIEWQueue(TimeBuffer< IEWStruct > *iq_ptr)
Sets the pointer to the queue coming from IEW.
size_t numROBFreeEntries(ThreadID tid)
Returns the number of free ROB entries for a specific thread.
void setFetchQueue(TimeBuffer< FetchStruct > *fq_ptr)
void processTrapEvent(ThreadID tid)
Mark the thread as processing a trap.
void setRenameQueue(TimeBuffer< RenameStruct > *rq_ptr)
Sets the pointer to the queue coming from rename.
bool checkEmptyROB[MaxThreads]
Records if commit should check if the ROB is truly empty (see commit_impl.hh).
void generateTrapEvent(ThreadID tid, Fault inst_fault)
Generates an event to schedule a squash due to a trap.
void deactivateThread(ThreadID tid)
Deschedules a thread from scheduling.
TimeBuffer< TimeStruct >::wire toIEW
Wire to write information heading to previous stages.
CPU * cpu
Pointer to O3CPU.
void squashFromTC(ThreadID tid)
Handles squashing due to an TC write.
const ThreadID numThreads
Number of Active Threads.
ProbePointArg< DynInstPtr > * ppSquash
To probe when an instruction is squashed.
Commit(CPU *_cpu, const BaseO3CPUParams ¶ms)
Construct a Commit with the given parameters.
bool trapInFlight[MaxThreads]
Records if there is a trap currently in flight.
void handleInterrupt()
Handles processing an interrupt.
const Cycles fetchToCommitDelay
void propagateInterrupt()
Get fetch redirecting so we can handle an interrupt.
std::string name() const
Returns the name of the Commit.
TimeBuffer< FetchStruct > * fetchQueue
void setROB(ROB *rob_ptr)
Sets pointer to the ROB.
int htmStarts[MaxThreads]
CommitPolicy commitPolicy
Commit policy used in SMT mode.
TimeBuffer< TimeStruct >::wire robInfoFromIEW
Wire to read information from IEW (for ROB).
void tick()
Ticks the commit stage, which tries to commit instructions.
void setIEWStage(IEW *iew_stage)
Sets the pointer to the IEW stage.
const unsigned renameWidth
Rename width, in instructions.
bool drainPending
Is a drain pending?
const Cycles trapLatency
The latency to handle a trap.
ProbePointArg< DynInstPtr > * ppCommit
Probe Points.
bool wroteToTimeBuffer
Records that commit has written to the time buffer this cycle.
TimeBuffer< IEWStruct > * iewQueue
IEW instruction queue interface.
void setTimeBuffer(TimeBuffer< TimeStruct > *tb_ptr)
Sets the main time buffer pointer, used for backwards communication.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to list of active threads.
const Cycles renameToROBDelay
Rename to ROB delay.
std::list< ThreadID > * activeThreads
Pointer to the list of active threads.
void updateStatus()
Updates the overall status of commit with the nextStatus, and tell the CPU if commit is active/inacti...
void squashAfter(ThreadID tid, const DynInstPtr &head_inst)
Handle squashing from instruction with SquashAfter set.
bool commitHead(const DynInstPtr &head_inst, unsigned inst_num)
Tries to commit the head ROB instruction passed in.
void resetHtmStartsStops(ThreadID)
void getInsts()
Gets instructions from rename and inserts them into the ROB.
bool tcSquash[MaxThreads]
Records if a thread has to squash this cycle due to an XC write.
const Cycles commitToIEWDelay
Commit to IEW delay.
void drainSanityCheck() const
Perform sanity checks after a drain.
void takeOverFrom()
Takes over from another CPU's thread.
void clearStates(ThreadID tid)
Clear all thread-specific states.
void drainResume()
Resumes execution after draining.
TimeBuffer< RenameStruct > * renameQueue
Rename instruction queue interface, for ROB.
void drain()
Initializes the draining of commit.
bool trapSquash[MaxThreads]
Records if a thread has to squash this cycle due to a trap.
InstSeqNum youngestSeqNum[MaxThreads]
The sequence number of the youngest valid instruction in the ROB.
InstSeqNum lastCommitedSeqNum[MaxThreads]
The sequence number of the last commited instruction.
CommitStatus _nextStatus
Next commit status, to be set at the end of the cycle.
bool drainImminent
Is a drain imminent?
void commitInsts()
Commits as many instructions as possible.
void markCompletedInsts()
Marks completed instructions using information sent from IEW.
bool canHandleInterrupts
True if last committed microop can be followed by an interrupt.
TimeBuffer< TimeStruct > * timeBuffer
Time buffer interface.
TimeBuffer< RenameStruct >::wire fromRename
Wire to read information from rename queue.
ThreadID roundRobin()
Returns the thread ID to use based on a round robin policy.
void generateTCEvent(ThreadID tid)
Records that commit needs to initiate a squash due to an external state update through the TC.
std::unique_ptr< PCStateBase > pc[MaxThreads]
The commit PC state of each thread.
void regProbePoints()
Registers probes.
IEW * iewStage
The pointer to the IEW stage.
void setThreads(std::vector< ThreadState * > &threads)
Sets the list of threads.
void updateComInstStats(const DynInstPtr &inst)
Updates commit stats based on this instruction.
ThreadID getCommittingThread()
Gets the thread to commit, based on the SMT policy.
const Cycles iewToCommitDelay
IEW to Commit delay.
bool avoidQuiesceLiveLock
Have we had an interrupt pending and then seen it de-asserted because of a masking change?
std::list< ThreadID > priority_list
Priority List used for Commit Policy.
void commit()
Handles any squashes that are sent from IEW, and adds instructions to the ROB and tries to commit ins...
UnifiedRenameMap * renameMap[MaxThreads]
Rename map interface.
void setRenameMap(UnifiedRenameMap::PerThreadUnifiedRenameMap &rm_ptr)
Sets pointer to the commited state rename map.
void squashFromTrap(ThreadID tid)
Handles squashing due to a trap.
bool committedStores[MaxThreads]
Records if there were any stores committed this cycle.
const unsigned commitWidth
Commit width, in instructions.
bool isDrained() const
Has the stage drained?
Fault interrupt
The interrupt fault.
TimeBuffer< FetchStruct >::wire fromFetch
IEW handles both single threaded and SMT IEW (issue/execute/writeback).
std::array< UnifiedRenameMap, MaxThreads > PerThreadUnifiedRenameMap
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
static const Priority CPU_Tick_Pri
CPU ticks must come after other associated CPU events (such as writebacks).
#define panic(...)
This implements a cprintf based panic() function.
#define fatal(...)
This implements a cprintf based fatal() function.
static constexpr int MaxThreads
RefCountingPtr< DynInst > DynInstPtr
static constexpr int MaxWidth
const FlagsType pdf
Print the percent of the total that this entry represents.
const FlagsType total
Print the total.
const FlagsType dist
Print the distribution.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
const ThreadID InvalidThreadID
Tick curTick()
The universal simulation clock.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool FullSystem
The FullSystem variable can be used to determine the current mode of simulation.
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.
constexpr decltype(nullptr) NoFault
statistics::Vector amos
Stat for the total number of committed atomics.
CommitStats(CPU *cpu, Commit *commit)
statistics::Distribution numCommittedDist
Distribution of the number of committed instructions each cycle.
statistics::Scalar commitNonSpecStalls
Stat for the total number of times commit has had to stall due to a non-speculative instruction reach...
statistics::Scalar commitEligibleSamples
Number of cycles where the commit bandwidth limit is reached.
statistics::Scalar commitSquashedInsts
Stat for the total number of squashed instructions discarded by commit.
statistics::Scalar branchMispredicts
Stat for the total number of branch mispredicts that caused a squash.
statistics::Vector2d committedInstType
Committed instructions by instruction type (OpClass)
statistics::Vector functionCalls
Total number of function calls.
statistics::Vector membars
Total number of committed memory barriers.