59#include "debug/Activity.hh"
60#include "debug/Drain.hh"
61#include "debug/Fetch.hh"
62#include "debug/O3CPU.hh"
64#include "params/BaseO3CPU.hh"
108 fatal(
"numThreads (%d) is larger than compiled limit (%d),\n"
109 "\tincrease MaxThreads in src/cpu/o3/limits.hh\n",
112 fatal(
"fetchWidth (%d) is larger than compiled limit (%d),\n"
113 "\tincrease MaxWidth in src/cpu/o3/limits.hh\n",
116 fatal(
"fetch buffer size (%u bytes) is greater than the cache "
119 fatal(
"cache block (%u bytes) is not a multiple of the "
122 fatal(
"Decoupled front-end was not tested with multiple threads.");
128 pc[
i].reset(params.isa[0]->newPCState());
142 decoder[tid] = params.decoder[tid];
166 "Number of branches that fetch has predicted taken"),
168 "Number of cycles fetch has run and was not squashing or "
171 "Number of cycles fetch has spent squashing"),
173 "Number of cycles fetch has spent waiting for tlb"),
175 "Number of cycles fetch has spent waiting for FTQ to fill."),
177 "Number of cycles fetch was idle"),
179 "Number of cycles fetch has spent blocked"),
182 "Number of cycles fetch has spent waiting on interrupts, or bad "
183 "addresses, or out of MSHRs"),
185 "Number of cycles fetch has spent waiting on pipes to drain"),
187 "Number of stall cycles due to no active thread to fetch from"),
189 "Number of stall cycles due to pending traps"),
191 "Number of stall cycles due to pending quiesce instructions"),
193 "Number of stall cycles due to full MSHR"),
195 "Number of cache lines fetched"),
197 "Number of outstanding Icache misses that were squashed"),
199 "Number of outstanding ITLB misses that were squashed"),
201 "Number of instructions fetched each cycle (Total)"),
203 "Ratio of cycles fetch was idle",
206 "Number of fetch targets processed each cycle (Total)")
289 assert(
bac !=
nullptr);
290 assert(
ftq !=
nullptr);
308 stalls[tid].decode =
false;
309 stalls[tid].drain =
false;
318 for (
int i = -
cpu->fetchQueue.getPast();
344 stalls[tid].decode =
false;
345 stalls[tid].drain =
false;
364 DPRINTF(
Fetch,
"[tid:%i] Waking up from cache miss.\n", tid);
365 assert(!
cpu->switchedOut());
383 DPRINTF(Activity,
"[tid:%i] Activating fetch due to cache completion\n",
395 pkt->
req->setAccessLatency();
396 cpu->ppInstAccessComplete->notify(pkt);
459 assert(
cpu->getInstPort().isConnected());
467 assert(
cpu->isDraining());
468 assert(!
stalls[tid].drain);
469 DPRINTF(Drain,
"%i: Thread drained.\n", tid);
486 DPRINTF(Activity,
"Activating stage.\n");
498 DPRINTF(Activity,
"Deactivating stage.\n");
524 if (!
ftq->isHeadReady(tid)) {
526 status_change =
true;
537 assert(!
cpu->switchedOut());
542 DPRINTF(
Fetch,
"[tid:%i] Can't fetch cache line, cache blocked\n",
550 DPRINTF(
Fetch,
"[tid:%i] Can't fetch cache line, interrupt pending\n",
558 DPRINTF(
Fetch,
"[tid:%i] Fetching cache line %#x for addr %#x\n",
559 tid, fetchBufferBlockPC,
vaddr);
564 RequestPtr mem_req = std::make_shared<Request>(
567 cpu->thread[tid]->contextId());
569 mem_req->taskId(
cpu->taskId());
576 cpu->mmu->translateTiming(mem_req,
cpu->thread[tid]->getTC(),
584 ThreadID tid =
cpu->contextToThread(mem_req->contextId());
585 Addr fetchBufferBlockPC = mem_req->getVaddr();
587 assert(!
cpu->switchedOut());
593 mem_req->getVaddr() !=
memReq[tid]->getVaddr()) {
594 DPRINTF(
Fetch,
"[tid:%i] Ignoring itlb completed after squash\n",
606 if (!
cpu->system->isMemAddr(mem_req->getPaddr())) {
607 warn(
"Address %#x is outside of physical memory, stopping fetch\n",
608 mem_req->getPaddr());
636 DPRINTF(Activity,
"[tid:%i] Activity: Waiting on I-cache "
656 "[tid:%i] Got back req with addr %#x but expected %#x\n",
657 tid, mem_req->getVaddr(),
memReq[tid]->getVaddr());
666 DPRINTF(
Fetch,
"[tid:%i] Translation faulted, building noop.\n", tid);
669 fetch_pc, fetch_pc,
false);
670 instruction->setNotAnInst();
672 instruction->setPredTarg(fetch_pc);
673 instruction->fault = fault;
676 DPRINTF(Activity,
"Activity this cycle.\n");
677 cpu->activityThisCycle();
681 DPRINTF(
Fetch,
"[tid:%i] Blocked, need to handle the trap.\n", tid);
682 DPRINTF(
Fetch,
"[tid:%i] fault (%s) detected @ PC %s.\n",
683 tid, fault->name(), *
pc[tid]);
692 DPRINTF(
Fetch,
"[tid:%i] Squashing from decode.\n", tid);
698 cpu->removeInstsUntil(seq_num, tid);
710 cpu->removeInstsNotInROB(tid);
717 DPRINTF(
Fetch,
"[tid:%i] Squashing, setting PC to: %s.\n",
720 set(
pc[tid], new_pc);
722 if (squashInst && squashInst->pcState().instAddr() == new_pc.
instAddr() &&
723 !squashInst->isLastMicroop())
724 macroop[tid] = squashInst->macroop;
731 DPRINTF(
Fetch,
"[tid:%i] Squashing outstanding Icache miss.\n",
735 DPRINTF(
Fetch,
"[tid:%i] Squashing outstanding ITLB miss.\n",
768 DPRINTF(
Fetch,
"[tid:%i] Resteer BAC to PC: %s\n", tid, new_pc);
770 toBAC->fetchInfo[tid].squash =
true;
771 set(
toBAC->fetchInfo[tid].nextPC, new_pc);
773 ftq->invalidate(tid);
779 bool ret_val =
false;
782 assert(
cpu->isDraining());
800 DPRINTF(Activity,
"[tid:%i] Activating stage.\n",tid);
803 DPRINTF(Activity,
"[tid:%i] Activating fetch due to cache"
816 DPRINTF(Activity,
"Deactivating stage.\n");
827 bool status_change =
false;
839 status_change = status_change || updated_status;
845 if (
fromCommit->commitInfo[0].interruptPending) {
849 if (
fromCommit->commitInfo[0].clearInterrupt) {
857 fetch(status_change);
877 unsigned insts_to_decode = 0;
878 unsigned available_insts = 0;
881 if (!
stalls[tid].decode) {
888 std::advance(tid_itr,
891 while (available_insts != 0 && insts_to_decode <
decodeWidth) {
896 DPRINTF(
Fetch,
"[tid:%i] [sn:%llu] Sending instruction to decode "
897 "from fetch queue. Fetch queue size: %i.\n",
914 DPRINTF(Activity,
"Activity this cycle.\n");
915 cpu->activityThisCycle();
927 stalls[tid].decode =
true;
931 assert(
stalls[tid].decode);
933 stalls[tid].decode =
false;
938 DPRINTF(
Fetch,
"[tid:%i] Squashing from commit with PC = %s\n", tid,
947 if (
fromCommit->commitInfo[tid].trapPending) {
958 DPRINTF(
Fetch,
"[tid:%i] Squashing from decode with PC = %s\n", tid,
987 DPRINTF(
Fetch,
"[tid:%i] Done squashing, switching to running.\n",
998 DPRINTF(
Fetch,
"[tid:%i] FTQ is refilled -> running\n", tid);
1022 arrays, staticInst, curMacroop, this_pc, next_pc, seq,
cpu);
1023 instruction->setTid(tid);
1025 instruction->setThreadState(
cpu->thread[tid]);
1027 DPRINTF(
Fetch,
"[tid:%i] Instruction PC %s created [sn:%lli].\n",
1031 instruction->staticInst->disassemble(this_pc.
instAddr()));
1035 instruction->traceData =
cpu->getTracer()->getInstRecord(
1037 instruction->staticInst, this_pc, curMacroop);
1040 instruction->traceData = NULL;
1044 instruction->setInstListIt(
cpu->addInst(instruction));
1051 DPRINTF(
Fetch,
"[tid:%i] Fetch queue entry created (%i/%i).\n",
1069 assert(!
cpu->switchedOut());
1084 if (!
ftqReady(tid, status_change)) {
1092 DPRINTF(
Fetch,
"[tid:%i] Attempting to fetch from\n", tid);
1104 assert(
ftqReady(tid, status_change));
1106 if (!curFT->inRange(this_pc.
instAddr())) {
1107 DPRINTF(
Fetch,
"[tid:%i] PC:%#x not within fetch target: %s\n",
1108 tid, this_pc, curFT->toString());
1119 DPRINTF(
Fetch,
"[tid:%i] Icache miss is complete.\n", tid);
1122 status_change =
true;
1133 DPRINTF(
Fetch,
"[tid:%i] Attempting to translate and read "
1134 "instruction, starting at PC %s.\n", tid, this_pc);
1139 cpu->fetchStats[tid]->icacheStallCycles++;
1168 std::unique_ptr<PCStateBase> next_pc(this_pc.
clone());
1177 DPRINTF(
Fetch,
"[tid:%i] Adding instructions to queue to "
1182 bool predictedBranch =
false;
1183 bool mispredict =
false;
1184 unsigned num_ft = 0;
1185 unsigned num_taken = 0;
1188 bool quiesce =
false;
1194 const Addr pc_mask = dec_ptr->pcMask();
1200 && !predictedBranch && !quiesce) {
1208 DPRINTF(
Fetch,
"Fetch from %s. PC=%s\n", curFT->toString(),
1211 assert(!curFT || curFT->inRange(this_pc.
instAddr()));
1216 bool needMem = !inRom && !curMacroop && !dec_ptr->instReady();
1217 fetchAddr = (this_pc.
instAddr() + pcOffset) & pc_mask;
1227 if (blkOffset >= numInsts) {
1233 memcpy(dec_ptr->moreBytesPtr(),
1235 decoder[tid]->moreBytes(this_pc, fetchAddr);
1237 if (dec_ptr->needMoreBytes()) {
1247 if (!(curMacroop || inRom)) {
1248 if (dec_ptr->instReady()) {
1249 staticInst = dec_ptr->decode(this_pc);
1252 cpu->fetchStats[tid]->numInsts++;
1255 curMacroop = staticInst;
1268 bool newMacro =
false;
1269 if (curMacroop || inRom) {
1271 staticInst = dec_ptr->fetchRomMicroop(
1272 this_pc.
microPC(), curMacroop);
1280 tid, staticInst, curMacroop, this_pc, *next_pc,
true);
1285 instruction->fetchTick =
curTick();
1287 set(next_pc, this_pc);
1294 predictedBranch |=
bac->updatePC(instruction, *next_pc, curFT);
1296 if (instruction->isControl()) {
1297 cpu->fetchStats[tid]->numBranches++;
1299 if (predictedBranch) {
1300 DPRINTF(
Fetch,
"Branch detected with PC = %s -> targ: %s, \n",
1305 newMacro |= this_pc.
instAddr() != next_pc->instAddr();
1308 set(this_pc, *next_pc);
1312 fetchAddr = this_pc.
instAddr() & pc_mask;
1320 if (curFT && !curFT->inRange(this_pc.
instAddr())) {
1321 DPRINTF(
Fetch,
"Run out of fetch target: %s. Get next one\n",
1326 if (instruction->isQuiesce()) {
1328 "Quiesce instruction encountered, halting fetch!\n");
1330 status_change =
true;
1338 if (predictedBranch) {
1343 if (
ftq->popHead(tid)) {
1346 curFT =
ftq->readHead(tid);
1355 }
while ((curMacroop || dec_ptr->instReady()) &&
1364 if (predictedBranch) {
1365 DPRINTF(
Fetch,
"[tid:%i] Done fetching, predicted branch "
1366 "instruction encountered.\n", tid);
1368 DPRINTF(
Fetch,
"[tid:%i] Done fetching, reached fetch bandwidth "
1369 "for this cycle.\n", tid);
1371 DPRINTF(
Fetch,
"[tid:%i] Done fetching, reached the end of the"
1372 "fetch buffer.\n", tid);
1375 "[tid:%i] Done fetching, reached end of the fetch target.\n",
1382 DPRINTF(
Fetch,
"Mispredict detected, squashing the FTQ.\n");
1395 fetchAddr = (this_pc.
instAddr() + pcOffset) & pc_mask;
1447 case SMTFetchPolicy::RoundRobin:
1449 case SMTFetchPolicy::IQCount:
1451 case SMTFetchPolicy::LSQCount:
1453 case SMTFetchPolicy::Branch:
1485 while (pri_iter != end) {
1486 high_pri = *pri_iter;
1510 std::priority_queue<unsigned, std::vector<unsigned>,
1511 std::greater<unsigned> > PQ;
1512 std::map<unsigned, ThreadID> threadMap;
1523 while (!PQ.empty()) {
1524 ThreadID high_pri = threadMap[PQ.top()];
1542 std::priority_queue<unsigned, std::vector<unsigned>,
1543 std::greater<unsigned> > PQ;
1544 std::map<unsigned, ThreadID> threadMap;
1547 unsigned ldstqCount =
fromIEW->iewInfo[tid].ldstqCount;
1551 PQ.push(ldstqCount);
1552 threadMap[ldstqCount] = tid;
1555 while (!PQ.empty()) {
1556 ThreadID high_pri = threadMap[PQ.top()];
1572 panic(
"Branch Count Fetch policy unimplemented\n");
1598 DPRINTF(
Fetch,
"[tid:%i] Issuing a pipelined I-cache access, "
1599 "starting at PC %s.\n", tid, this_pc);
1608 DPRINTF(
Fetch,
"There are no more threads available to fetch from.\n");
1625 cpu->fetchStats[tid]->icacheStallCycles++;
1626 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting cache response!\n",
1630 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting ITLB walk to "
1634 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting for the BPU to fill FTQ!\n",
1638 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting for a pending trap!\n",
1642 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting for a pending quiesce "
1643 "instruction!\n", tid);
1646 DPRINTF(
Fetch,
"[tid:%i] Fetch is waiting for an I-cache retry!\n",
1649 DPRINTF(
Fetch,
"[tid:%i] Fetch predicted non-executable address\n",
1652 DPRINTF(
Fetch,
"[tid:%i] Unexpected fetch stall reason "
1661 DPRINTF(O3CPU,
"Fetch unit received timing\n");
1663 assert(pkt->
req->isUncacheable() ||
1665 fetch->processCacheCompletion(pkt);
1673 fetch->recvReqRetry();
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
Cycles is a wrapper class for representing cycle counts, i.e.
virtual bool branching() const =0
MicroPC microPC() const
Returns the current micropc.
Addr instAddr() const
Returns the memory address of the instruction this PC points to.
virtual PCStateBase * clone() const =0
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
RequestPtr req
A pointer to the original request.
const T * getConstPtr() const
void dataDynamic(T *p)
Set the data pointer to a value that should have delete [] called on it.
bool cacheResponding() const
ProbePointArg generates a point for the class of Arg.
T * get() const
Directly access the pointer itself without taking a reference.
RequestPort(const std::string &name, SimObject *_owner, PortID id=InvalidPortID)
Request port.
@ INST_FETCH
The request was an instruction fetch.
uint8_t numSrcRegs() const
Number of source registers.
virtual StaticInstPtr fetchMicroop(MicroPC upc) const
Return the microop that goes with a particular micropc.
uint8_t numDestRegs() const
Number of destination registers.
bool isLastMicroop() const
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
Fetch * fetch
Pointer to fetch.
virtual bool recvTimingResp(PacketPtr pkt)
Timing version of receive.
IcachePort(Fetch *_fetch, CPU *_cpu)
Default constructor.
virtual void recvReqRetry()
Handles doing a retry of a failed fetch.
gem5::o3::Fetch::FetchStatGroup fetchStats
bool wroteToTimeBuffer
Variable that tracks if fetch has written to the time buffer this cycle.
void deactivateThread(ThreadID tid)
For priority-based fetch policies, need to keep update priorityList.
FetchStatus
Overall fetch status.
std::list< ThreadID > * activeThreads
List of Active Threads.
TimeBuffer< TimeStruct >::wire fromCommit
Wire to get commit's information from backwards time buffer.
StaticInstPtr macroop[MaxThreads]
void fetch(bool &status_change)
Does the actual fetching of instructions and passing them on to the next stage.
const Cycles renameToFetchDelay
Rename to fetch delay.
void takeOverFrom()
Takes over from another CPU's thread.
uint8_t * fetchBuffer[MaxThreads]
The fetch data that is being fetched and buffered.
void doSquash(const PCStateBase &new_pc, const DynInstPtr squashInst, ThreadID tid)
Squashes a specific thread and resets the PC.
TimeBuffer< FetchStruct >::wire toDecode
Wire used to write any information heading to decode.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to list of active threads.
bool ftqReady(ThreadID tid, bool &status_change)
Checks if the FTQ is ready.
ThreadStatus fetchStatus[MaxThreads]
Per-thread status.
void squashFromCommit(const PCStateBase &new_pc, const InstSeqNum seq_num, DynInstPtr squashInst, ThreadID tid)
Squashes a specific thread and resets the PC.
ThreadID numThreads
Number of threads.
TimeBuffer< TimeStruct >::wire fromDecode
Wire to get decode's information from backwards time buffer.
ProbePointArg< DynInstPtr > * ppFetch
Probe points.
const unsigned maxFTPerCycle
const unsigned decodeWidth
The width of decode in instructions.
TimeBuffer< TimeStruct >::wire fromRename
Wire to get rename's information from backwards time buffer.
const Cycles commitToFetchDelay
Commit to fetch delay.
void squashFromDecode(const PCStateBase &new_pc, const DynInstPtr squashInst, const InstSeqNum seq_num, ThreadID tid)
Squashes a specific thread and resets the PC.
const bool decoupledFrontEnd
Enables the decoupled front-end.
FetchStatus updateFetchStatus()
Updates overall fetch stage status; to be called at the end of each cycle.
ThreadID getFetchingThread()
Returns the appropriate thread to fetch, given the fetch policy.
bool fetchBufferValid[MaxThreads]
Whether or not the fetch buffer data is valid.
void startupStage()
Initialize stage.
void pipelineIcacheAccesses(ThreadID tid)
Pipeline the next I-cache access to the current one.
std::string name() const
Returns the name of fetch.
void wakeFromQuiesce()
Tells fetch to wake up from a quiesce instruction.
void switchToActive()
Changes the status of this stage to active, and indicates this to the CPU.
void switchToInactive()
Changes the status of this stage to inactive, and indicates this to the CPU.
int numInst
Tracks how many instructions has been fetched this cycle.
const unsigned fetchWidth
The width of fetch in instructions.
bool fetchCacheLine(Addr vaddr, ThreadID tid, Addr pc)
Fetches the cache line that contains the fetch PC.
bool issuePipelinedIfetch[MaxThreads]
Set to true if a pipelined I-cache request should be issued.
Addr fetchBufferAlignPC(Addr addr)
Align a PC to the start of a fetch buffer block.
FetchStatus _status
Fetch status.
const unsigned maxTakenPredPerCycle
bool delayedCommit[MaxThreads]
Can the fetch stage redirect from an interrupt on this instruction?
ThreadID threadFetched
Thread ID being fetched.
SMTFetchPolicy fetchPolicy
Fetch policy.
Addr cacheBlkSize
Cache block size.
void drainSanityCheck() const
Perform sanity checks after a drain.
unsigned fetchQueueSize
The size of the fetch queue in micro-ops.
InstDecoder * decoder[MaxThreads]
The decoder.
TimeBuffer< TimeStruct >::wire fromIEW
Wire to get iew's information from backwards time buffer.
const Cycles decodeToFetchDelay
Decode to fetch delay.
void regProbePoints()
Registers probes.
bool checkSignalsAndUpdate(ThreadID tid)
Checks all input signals and updates the status as necessary.
const Cycles iewToFetchDelay
IEW to fetch delay.
bool checkStall(ThreadID tid) const
Checks if a thread is stalled.
void bacResteer(const PCStateBase &new_pc, ThreadID tid)
Signal BAC to redirect.
IcachePort icachePort
Instruction port.
FTQ * ftq
Fetch Target Queue.
void setTimeBuffer(TimeBuffer< TimeStruct > *time_buffer)
Sets the main backwards communication time buffer pointer.
void processCacheCompletion(PacketPtr pkt)
Processes cache completion event.
ThreadID iqCount()
Returns the appropriate thread to fetch using the IQ count policy.
Addr fetchBufferMask
Mask to align a fetch address to a fetch buffer boundary.
void recvReqRetry()
Handles retrying the fetch access.
bool checkInterrupt(Addr pc)
Check if an interrupt is pending and that we need to handle.
void resetStage()
Reset this pipeline stage.
Fetch(CPU *_cpu, const BaseO3CPUParams ¶ms)
Fetch constructor.
void drainStall(ThreadID tid)
Stall the fetch stage after reaching a safe drain point.
Counter lastIcacheStall[MaxThreads]
Icache stall statistics.
int instSize
Size of instructions.
ProbePointArg< RequestPtr > * ppFetchRequestSent
To probe when a fetch request is successfully sent.
RequestPtr memReq[MaxThreads]
Memory request used to access cache.
TimeBuffer< TimeStruct > * timeBuffer
Time buffer interface.
void profileStall(ThreadID tid)
Profile the reasons of fetch stall.
ThreadID roundRobin()
Returns the appropriate thread to fetch using a round robin policy.
Addr fetchBufferPC[MaxThreads]
The PC of the first instruction loaded into the fetch buffer.
void drainResume()
Resume after a drain.
void clearStates(ThreadID tid)
Clear all thread-specific states.
void finishTranslation(const Fault &fault, const RequestPtr &mem_req)
bool interruptPending
Checks if there is an interrupt pending.
std::unique_ptr< PCStateBase > pc[MaxThreads]
ThreadID lsqCount()
Returns the appropriate thread to fetch using the LSQ count policy.
TimeBuffer< TimeStruct >::wire toBAC
Wire used to write any information backward to BAC.
Stalls stalls[MaxThreads]
Tracks which stages are telling fetch to stall.
DynInstPtr buildInst(ThreadID tid, StaticInstPtr staticInst, StaticInstPtr curMacroop, const PCStateBase &this_pc, const PCStateBase &next_pc, bool trace)
bool isDrained() const
Has the stage drained?
Addr fetchOffset[MaxThreads]
std::deque< DynInstPtr > fetchQueue[MaxThreads]
Queue of fetched instructions.
PacketPtr retryPkt
The packet that is waiting to be retried.
std::list< ThreadID > priorityList
List that has the threads organized by priority.
FinishTranslationEvent finishTranslationEvent
Event used to delay fault generation of translation faults.
ThreadID retryTid
The thread that is waiting on the cache to tell fetch to retry.
void tick()
Ticks the fetch stage, processing all inputs signals and fetching as many instructions as possible.
ThreadID numFetchingThreads
Number of threads that are actively fetching.
unsigned fetchBufferSize
The size of the fetch buffer in bytes.
void setFetchQueue(TimeBuffer< FetchStruct > *fq_ptr)
Sets pointer to time buffer used to communicate to the next stage.
CPU * cpu
Pointer to the O3CPU.
void setBACandFTQPtr(BAC *bac_ptr, FTQ *ftq_ptr)
Sets pointer to branch address calculation stage and FTQ.
bool cacheBlocked
Is the cache blocked?
ThreadID branchCount()
Returns the appropriate thread to fetch using the branch count policy.
#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.
std::shared_ptr< FetchTarget > FetchTargetPtr
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 pdf
Print the percent of the total that this entry represents.
Copyright (c) 2024 Arm Limited All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
std::shared_ptr< Request > RequestPtr
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.
RefCountingPtr< StaticInst > StaticInstPtr
static bool isRomMicroPC(MicroPC upc)
StaticInstPtr nopStaticInstPtr
Pointer to a statically allocated generic "nop" instruction object.
constexpr decltype(nullptr) NoFault
Declaration of the Packet class.
Struct that defines the information passed from fetch to decode.
statistics::Scalar icacheSquashes
Total number of outstanding icache accesses that were dropped due to a squash.
statistics::Distribution ftNumber
statistics::Scalar pendingDrainCycles
Total number of cycles spent in waiting for drains.
statistics::Scalar cacheLines
Stat for total number of fetched cache lines.
statistics::Scalar blockedCycles
Total number of cycles spent blocked.
statistics::Scalar idleCycles
Stat for total number of cycles spent blocked due to other stages in the pipeline.
statistics::Scalar predictedBranches
Stat for total number of predicted branches.
statistics::Scalar noActiveThreadStallCycles
Total number of stall cycles caused by no active threads to run.
statistics::Scalar pendingQuiesceStallCycles
Total number of stall cycles caused by pending quiesce instructions.
statistics::Scalar icacheWaitRetryStallCycles
Total number of stall cycles caused by I-cache wait retrys.
statistics::Scalar pendingTrapStallCycles
Total number of stall cycles caused by pending traps.
statistics::Scalar cycles
Stat for total number of cycles spent fetching.
statistics::Scalar miscStallCycles
Total number of cycles spent in any other state.
statistics::Scalar tlbCycles
Stat for total number of cycles spent waiting for translation.
statistics::Scalar ftqStallCycles
Stat for total number of cycles spent waiting for FTQ to fill.
statistics::Scalar squashCycles
Stat for total number of cycles spent squashing.
FetchStatGroup(CPU *cpu, Fetch *fetch)
statistics::Formula idleRate
Rate of how often fetch was idle.
statistics::Scalar tlbSquashes
Total number of outstanding tlb accesses that were dropped due to a squash.
statistics::Distribution nisnDist
Distribution of number of instructions fetched each cycle.