45 #ifndef __CPU_O3_RENAME_IMPL_HH__ 46 #define __CPU_O3_RENAME_IMPL_HH__ 50 #include "arch/isa_traits.hh" 51 #include "arch/registers.hh" 52 #include "config/the_isa.hh" 55 #include "debug/Activity.hh" 56 #include "debug/Rename.hh" 57 #include "debug/O3PipeView.hh" 58 #include "params/DerivO3CPU.hh" 65 iewToRenameDelay(params->iewToRenameDelay),
66 decodeToRenameDelay(params->decodeToRenameDelay),
67 commitToRenameDelay(params->commitToRenameDelay),
68 renameWidth(params->renameWidth),
69 commitWidth(params->commitWidth),
70 numThreads(params->numThreads)
73 fatal(
"renameWidth (%d) is larger than compiled limit (%d),\n" 74 "\tincrease MaxWidth in src/cpu/o3/impl.hh\n",
79 for (uint32_t tid = 0; tid < Impl::MaxThreads; tid++) {
87 stalls[tid] = {
false,
false};
97 return cpu->name() +
".rename";
100 template <
class Impl>
106 .
desc(
"Number of cycles rename is squashing")
110 .
desc(
"Number of cycles rename is idle")
114 .
desc(
"Number of cycles rename is blocking")
117 .
name(
name() +
".serializeStallCycles")
118 .
desc(
"count of cycles rename stalled for serializing inst")
122 .
desc(
"Number of cycles rename is running")
126 .
desc(
"Number of cycles rename is unblocking")
130 .
desc(
"Number of instructions processed by rename")
134 .
desc(
"Number of squashed instructions processed by rename")
138 .
desc(
"Number of times rename has blocked due to ROB full")
142 .
desc(
"Number of times rename has blocked due to IQ full")
146 .
desc(
"Number of times rename has blocked due to LQ full")
150 .
desc(
"Number of times rename has blocked due to SQ full")
153 .
name(
name() +
".FullRegisterEvents")
154 .
desc(
"Number of times there has been no free registers")
158 .
desc(
"Number of destination operands rename has renamed")
162 .
desc(
"Number of register rename lookups that rename has made")
166 .
desc(
"Number of HB maps that are committed")
170 .
desc(
"Number of HB maps that are undone due to squashing")
174 .
desc(
"count of serializing insts renamed")
178 .
name(
name() +
".tempSerializingInsts")
179 .
desc(
"count of temporary serializing insts renamed")
184 .
desc(
"count of insts added to the skid buffer")
188 .
name(
name() +
".int_rename_lookups")
189 .
desc(
"Number of integer rename lookups")
192 .
name(
name() +
".fp_rename_lookups")
193 .
desc(
"Number of floating rename lookups")
196 .
name(
name() +
".vec_rename_lookups")
197 .
desc(
"Number of vector rename lookups")
200 .
name(
name() +
".vec_pred_rename_lookups")
201 .
desc(
"Number of vector predicate rename lookups")
205 template <
class Impl>
214 template <
class Impl>
230 template <
class Impl>
240 template <
class Impl>
250 template <
class Impl>
257 template <
class Impl>
279 template <
class Impl>
317 template <
class Impl>
325 template <
class Impl>
339 template <
class Impl>
347 !
insts[tid].empty() ||
354 template <
class Impl>
361 template <
class Impl>
367 assert(
insts[tid].empty());
373 template <
class Impl>
377 DPRINTF(Rename,
"[tid:%i] [squash sn:%llu] Squashing instructions.\n",
391 DPRINTF(Rename,
"[tid:%i] [squash sn:%llu] " 392 "Rename will resume serializing after squash\n",
427 template <
class Impl>
435 bool status_change =
false;
445 while (threads != end) {
448 DPRINTF(Rename,
"Processing [tid:%i]\n", tid);
452 rename(status_change, tid);
460 DPRINTF(Activity,
"Activity this cycle.\n");
461 cpu->activityThisCycle();
466 while (threads != end) {
470 if (
fromCommit->commitInfo[tid].doneSeqNum != 0 &&
514 toDecode->renameUnblock[tid] =
false;
520 toDecode->renameUnblock[tid] =
false;
528 "Not blocked, so attempting to run stage.\n",
547 template <
class Impl>
558 if (insts_available == 0) {
559 DPRINTF(Rename,
"[tid:%i] Nothing to do, breaking out early.\n",
574 int min_free_entries = free_rob_entries;
578 if (free_iq_entries < min_free_entries) {
579 min_free_entries = free_iq_entries;
584 if (min_free_entries <= 0) {
586 "[tid:%i] Blocking due to no free ROB/IQ/ entries.\n" 587 "ROB has %i free entries.\n" 588 "IQ has %i free entries.\n",
589 tid, free_rob_entries, free_iq_entries);
598 }
else if (min_free_entries < insts_available) {
601 "Will have to block this cycle. " 602 "%i insts available, " 603 "but only %i insts can be renamed due to ROB/IQ/LSQ limits.\n",
604 tid, insts_available, min_free_entries);
606 insts_available = min_free_entries;
618 "%i available instructions to send iew.\n",
619 tid, insts_available);
623 "%i insts pipelining from Rename | " 624 "%i insts dispatched to IQ last cycle.\n",
632 }
else if (!insts_to_rename.empty()) {
633 insts_to_rename.front()->setSerializeBefore();
637 int renamed_insts = 0;
640 DPRINTF(Rename,
"[tid:%i] Sending instructions to IEW.\n", tid);
642 assert(!insts_to_rename.empty());
650 if (inst->isLoad()) {
652 DPRINTF(Rename,
"[tid:%i] Cannot rename due to no free LQ\n");
659 if (inst->isStore() || inst->isAtomic()) {
661 DPRINTF(Rename,
"[tid:%i] Cannot rename due to no free SQ\n");
668 insts_to_rename.pop_front();
673 "Removing [sn:%llu] PC:%s from rename skidBuffer\n",
674 tid, inst->seqNum, inst->pcState());
677 if (inst->isSquashed()) {
680 "instruction %i with PC %s is squashed, skipping.\n",
681 tid, inst->seqNum, inst->pcState());
693 "Processing instruction [sn:%llu] with PC %s.\n",
694 tid, inst->seqNum, inst->pcState());
698 if (!
renameMap[tid]->canRename(inst->numIntDestRegs(),
699 inst->numFPDestRegs(),
700 inst->numVecDestRegs(),
701 inst->numVecElemDestRegs(),
702 inst->numVecPredDestRegs(),
703 inst->numCCDestRegs())) {
706 " lack of free physical registers to rename to.\n");
708 insts_to_rename.push_front(inst);
724 if ((inst->isIprAccess() || inst->isSerializeBefore()) &&
725 !inst->isSerializeHandled()) {
726 DPRINTF(Rename,
"Serialize before instruction encountered.\n");
728 if (!inst->isTempSerializeBefore()) {
730 inst->setSerializeHandled();
744 }
else if ((inst->isStoreConditional() || inst->isSerializeAfter()) &&
745 !inst->isSerializeHandled()) {
746 DPRINTF(Rename,
"Serialize after instruction encountered.\n");
750 inst->setSerializeHandled();
759 if (inst->isAtomic() || inst->isStore()) {
761 }
else if (inst->isLoad()) {
791 if (insts_available) {
797 toDecode->renameUnblock[tid] =
false;
807 while (!
insts[tid].empty()) {
808 inst =
insts[tid].front();
810 insts[tid].pop_front();
812 assert(tid == inst->threadNumber);
814 DPRINTF(Rename,
"[tid:%i] Inserting [sn:%llu] PC: %s into Rename " 815 "skidBuffer\n", tid, inst->seqNum, inst->pcState());
824 typename InstQueue::iterator it;
825 warn(
"Skidbuffer contents:\n");
828 warn(
"[tid:%i] %s [sn:%llu].\n", tid,
829 (*it)->staticInst->disassemble(inst->instAddr()),
832 panic(
"Skidbuffer Exceeded Max Size");
836 template <
class Impl>
841 for (
int i = 0;
i < insts_from_decode; ++
i) {
843 insts[inst->threadNumber].push_back(inst);
846 inst->renameTick =
curTick() - inst->fetchTick;
859 while (threads != end) {
873 bool any_unblocking =
false;
878 while (threads != end) {
882 any_unblocking =
true;
888 if (any_unblocking) {
892 DPRINTF(Activity,
"Activating stage.\n");
894 cpu->activateStage(O3CPU::RenameIdx);
901 DPRINTF(Activity,
"Deactivating stage.\n");
903 cpu->deactivateStage(O3CPU::RenameIdx);
908 template <
class Impl>
912 DPRINTF(Rename,
"[tid:%i] Blocking.\n", tid);
926 toDecode->renameUnblock[tid] =
false;
942 template <
class Impl>
946 DPRINTF(Rename,
"[tid:%i] Trying to unblock.\n", tid);
951 DPRINTF(Rename,
"[tid:%i] Done unblocking.\n", tid);
953 toDecode->renameUnblock[tid] =
true;
963 template <
class Impl>
975 hb_it->instSeqNum > squashed_seq_num) {
978 DPRINTF(Rename,
"[tid:%i] Removing history entry with sequence " 979 "number %i (archReg: %d, newPhysReg: %d, prevPhysReg: %d).\n",
980 tid, hb_it->instSeqNum, hb_it->archReg.index(),
981 hb_it->newPhysReg->index(), hb_it->prevPhysReg->index());
989 if (hb_it->newPhysReg != hb_it->prevPhysReg) {
992 renameMap[tid]->setEntry(hb_it->archReg, hb_it->prevPhysReg);
995 freeList->addReg(hb_it->newPhysReg);
1002 hb_it->newPhysReg));
1013 template<
class Impl>
1017 DPRINTF(Rename,
"[tid:%i] Removing a committed instruction from the " 1018 "history buffer %u (size=%i), until [sn:%llu].\n",
1027 DPRINTF(Rename,
"[tid:%i] History buffer is empty.\n", tid);
1029 }
else if (hb_it->instSeqNum > inst_seq_num) {
1030 DPRINTF(Rename,
"[tid:%i] [sn:%llu] " 1031 "Old sequence number encountered. " 1032 "Ensure that a syscall happened recently.\n",
1043 hb_it->instSeqNum <= inst_seq_num) {
1045 DPRINTF(Rename,
"[tid:%i] Freeing up older rename of reg %i (%s), " 1047 tid, hb_it->prevPhysReg->index(),
1048 hb_it->prevPhysReg->className(),
1054 if (hb_it->newPhysReg != hb_it->prevPhysReg) {
1055 freeList->addReg(hb_it->prevPhysReg);
1064 template <
class Impl>
1070 unsigned num_src_regs = inst->numSrcRegs();
1074 for (
int src_idx = 0; src_idx < num_src_regs; src_idx++) {
1075 const RegId& src_reg = inst->srcRegIdx(src_idx);
1103 "Looking up %s arch reg %i, got phys reg %i (%s)\n",
1108 inst->renameSrcReg(src_idx, renamed_reg);
1114 "Register %d (flat: %d) (%s) is ready.\n",
1118 inst->markSrcRegReady(src_idx);
1122 "Register %d (flat: %d) (%s) is not ready.\n",
1131 template <
class Impl>
1137 unsigned num_dest_regs = inst->numDestRegs();
1140 for (
int dest_idx = 0; dest_idx < num_dest_regs; dest_idx++) {
1141 const RegId& dest_reg = inst->destRegIdx(dest_idx);
1142 typename RenameMap::RenameInfo rename_result;
1147 rename_result = map->rename(flat_dest_regid);
1149 inst->flattenDestReg(dest_idx, flat_dest_regid);
1155 "Renaming arch reg %i (%s) to physical reg %i (%i).\n",
1157 rename_result.first->index(),
1158 rename_result.first->flatIndex());
1162 rename_result.first,
1163 rename_result.second);
1167 DPRINTF(Rename,
"[tid:%i] [sn:%llu] " 1168 "Adding instruction to history buffer (size=%i).\n",
1177 inst->renameDestReg(dest_idx,
1178 rename_result.first,
1179 rename_result.second);
1185 template <
class Impl>
1197 template <
class Impl>
1209 template <
class Impl>
1216 "calcFreeLQEntries: free lqEntries: %d, loadsInProgress: %d, " 1217 "loads dispatchedToLQ: %d\n",
1219 fromIEW->iewInfo[tid].dispatchedToLQ);
1223 template <
class Impl>
1229 DPRINTF(Rename,
"calcFreeSQEntries: free sqEntries: %d, storesInProgress: %d, " 1230 "stores dispatchedToSQ: %d\n",
freeEntries[tid].sqEntries,
1235 template <
class Impl>
1239 unsigned inst_count = 0;
1249 template <
class Impl>
1257 if (
fromIEW->iewUnblock[tid]) {
1263 template <
class Impl>
1267 bool ret_val =
false;
1270 DPRINTF(Rename,
"[tid:%i] Stall from IEW stage detected.\n", tid);
1273 DPRINTF(Rename,
"[tid:%i] Stall: ROB has 0 free entries.\n", tid);
1276 DPRINTF(Rename,
"[tid:%i] Stall: IQ has 0 free entries.\n", tid);
1279 DPRINTF(Rename,
"[tid:%i] Stall: LSQ has 0 free entries.\n", tid);
1281 }
else if (
renameMap[tid]->numFreeEntries() <= 0) {
1282 DPRINTF(Rename,
"[tid:%i] Stall: RenameMap has 0 free entries.\n", tid);
1286 DPRINTF(Rename,
"[tid:%i] Stall: Serialize stall and ROB is not " 1295 template <
class Impl>
1299 if (
fromIEW->iewInfo[tid].usedIQ)
1302 if (
fromIEW->iewInfo[tid].usedLSQ) {
1313 DPRINTF(Rename,
"[tid:%i] Free IQ: %i, Free ROB: %i, " 1314 "Free LQ: %i, Free SQ: %i, FreeRM %i(%i %i %i %i %i)\n",
1327 DPRINTF(Rename,
"[tid:%i] %i instructions not yet in ROB\n",
1331 template <
class Impl>
1349 DPRINTF(Rename,
"[tid:%i] Squashing instructions due to squash from " 1362 DPRINTF(Rename,
"[tid:%i] Done blocking, switching to unblocking.\n",
1377 "[tid:%i] Done squashing, switching to serialize.\n", tid);
1383 "[tid:%i] Done squashing, switching to unblocking.\n",
1388 DPRINTF(Rename,
"[tid:%i] Done squashing, switching to running.\n",
1397 DPRINTF(Rename,
"[tid:%i] Done with serialize stall, switching to " 1398 "unblocking.\n", tid);
1406 DPRINTF(Rename,
"[tid:%i] Processing instruction [%lli] with " 1407 "PC %s.\n", tid, serial_inst->seqNum, serial_inst->pcState());
1410 serial_inst->clearSerializeBefore();
1415 insts[tid].push_front(serial_inst);
1418 DPRINTF(Rename,
"[tid:%i] Instruction must be processed by rename." 1419 " Adding to front of list.\n", tid);
1431 template<
class Impl>
1435 if (inst_list.empty()) {
1442 inst_list.front()->setSerializeBefore();
1445 template <
class Impl>
1463 panic(
"Rename full stall stat should be incremented for a reason!");
1468 template <
class Impl>
1479 cprintf(
"Seq num: %i\nArch reg[%s]: %i New phys reg:" 1480 " %i[%s] Old phys reg: %i[%s]\n",
1481 (*buf_it).instSeqNum,
1482 (*buf_it).archReg.className(),
1483 (*buf_it).archReg.index(),
1484 (*buf_it).newPhysReg->index(),
1485 (*buf_it).newPhysReg->className(),
1486 (*buf_it).prevPhysReg->index(),
1487 (*buf_it).prevPhysReg->className());
1494 #endif//__CPU_O3_RENAME_IMPL_HH__
void setScoreboard(Scoreboard *_scoreboard)
Sets pointer to the scoreboard.
#define panic(...)
This implements a cprintf based panic() function.
Stats::Scalar renameFullRegistersEvents
Stat for total number of times that rename runs out of free registers to use to rename.
int decodeToRenameDelay
Delay between decode and rename, in ticks.
void readStallSignals(ThreadID tid)
Reads signals telling rename to block/unblock.
bool unblock(ThreadID tid)
Switches rename to unblocking if the skid buffer is empty, and signals back that rename has unblocked...
Impl::DynInstPtr DynInstPtr
Stats::Scalar renameRunCycles
Stat for total number of cycles spent running normally.
int iewToRenameDelay
Delay between iew and rename, in ticks.
RenameStatus _status
Rename status.
int getNumPinnedWrites() const
RenameMap * renameMap[Impl::MaxThreads]
Rename map interface.
TimeBuffer< RenameStruct >::wire toIEW
Wire to write any information heading to IEW.
#define fatal(...)
This implements a cprintf based fatal() function.
ProbePointArg< DynInstPtr > * ppRename
To probe when register renaming for an instruction is complete.
void setFreeList(FreeList *fl_ptr)
Sets pointer to the free list.
void drainSanityCheck() const
Perform sanity checks after a drain.
std::list< ThreadID > * activeThreads
Pointer to the list of active threads.
FreeEntries freeEntries[Impl::MaxThreads]
Per-thread tracking of the number of free entries of back-end structures.
void setRenameQueue(TimeBuffer< RenameStruct > *rq_ptr)
Sets pointer to time buffer used to communicate to the next stage.
TimeBuffer< TimeStruct > * timeBuffer
Pointer to main time buffer used for backwards communication.
bool block(ThreadID tid)
Switches rename to blocking, and signals back that rename has become blocked.
void clearStates(ThreadID tid)
Clear all thread-specific states.
void notify(const Arg &arg)
called at the ProbePoint call site, passes arg to each listener.
std::string name() const
Returns the name of rename.
Stats::Scalar renameRenamedOperands
Stat for total number of renamed destination registers.
IEW * iew_ptr
Pointer to IEW stage.
Stats::Scalar renameROBFullEvents
Stat for total number of times that the ROB starts a stall in rename.
void renameDestRegs(const DynInstPtr &inst, ThreadID tid)
Renames the destination registers of an instruction.
bool serializeOnNextInst[Impl::MaxThreads]
Records if rename needs to serialize on the next instruction for any thread.
void regProbePoints()
Registers probes.
Stalls stalls[Impl::MaxThreads]
Tracks which stages are telling decode to stall.
bool wroteToTimeBuffer
Variable that tracks if decode has written to the time buffer this cycle.
Stats::Scalar renamedSerializing
Number of serialize instructions handled.
Overload hash function for BasicBlockRange type.
int calcFreeSQEntries(ThreadID tid)
Calculates the number of free SQ entries for a specific thread.
TimeBuffer< DecodeStruct > * decodeQueue
Decode instruction queue interface.
bool resumeSerialize
Whether or not rename needs to resume a serialize instruction after squashing.
void doSquash(const InstSeqNum &squash_seq_num, ThreadID tid)
Executes actual squash, removing squashed instructions.
Stats::Scalar renameSquashedInsts
Stat for total number of squashed instructions that rename discards.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
CPUPol::FreeList FreeList
ThreadContext is the external interface to all thread state for anything outside of the CPU...
unsigned validInsts()
Returns the number of valid instructions coming from decode.
void dumpHistory()
Debugging function used to dump history buffer of renamings.
Stats::Scalar renamedTempSerializing
Number of instructions marked as temporarily serializing.
Scoreboard * scoreboard
Pointer to the scoreboard.
void renameSrcRegs(const DynInstPtr &inst, ThreadID tid)
Renames the source registers of an instruction.
bool checkSignalsAndUpdate(ThreadID tid)
Checks the signals and updates the status.
void setNumPinnedWrites(int num_writes)
unsigned toIEWIndex
The index of the instruction in the time buffer to IEW that rename is currently using.
TimeBuffer< TimeStruct >::wire fromCommit
Wire to get commit's output from backwards time buffer.
Stats::Scalar renameUnblockCycles
Stat for total number of cycles spent unblocking.
void regStats()
Registers statistics.
TimeBuffer< RenameStruct > * renameQueue
Rename instruction queue.
void renameInsts(ThreadID tid)
Renames instructions for the given thread.
int loadsInProgress[Impl::MaxThreads]
Count of Load instructions in progress that have been sent off to the IQ and ROB, but are not yet inc...
Implements a simple scoreboard to track which registers are ready.
Vector Register Native Elem lane.
Tick curTick()
The current simulated tick.
std::list< RenameHistory > historyBuffer[Impl::MaxThreads]
A per-thread list of all destination register renames, used to either undo rename mappings or free ol...
bool skidsEmpty()
Returns if all of the skid buffers are empty.
Stats::Scalar renameIQFullEvents
Stat for total number of times that the IQ starts a stall in rename.
void removeFromHistory(InstSeqNum inst_seq_num, ThreadID tid)
Removes a committed instruction's rename history.
Stats::Scalar renameCommittedMaps
Stat for total number of committed renaming mappings.
Stats::Scalar renameRenamedInsts
Stat for total number of renamed instructions.
CPUPol::RenameMap RenameMap
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
Holds the information for each destination register rename.
Commit * commit_ptr
Pointer to commit stage.
void unsetReg(PhysRegIdPtr phys_reg)
Sets the register as not ready.
void readFreeEntries(ThreadID tid)
Gets the number of free entries for a specific thread.
O3CPU * cpu
Pointer to CPU.
void takeOverFrom()
Takes over from another CPU's thread.
void skidInsert(ThreadID tid)
Inserts unused instructions from a given thread into the skid buffer, to be renamed once rename unblo...
TimeBuffer< DecodeStruct >::wire fromDecode
Wire to get decode's output from decode queue.
bool isDrained() const
Has the stage drained?
FullSource
Enum to record the source of a structure full stall.
int calcFreeROBEntries(ThreadID tid)
Calculates the number of free ROB entries for a specific thread.
Stats::Scalar renameSquashCycles
Stat for total number of cycles spent squashing.
ProbePointArg< SeqNumRegPair > * ppSquashInRename
To probe when an instruction is squashed and the register mapping for it needs to be undone...
Stats::Scalar renameSerializeStallCycles
Stat for total number of cycles spent stalling for a serializing inst.
void squash(const InstSeqNum &squash_seq_num, ThreadID tid)
Squashes all instructions in a thread.
ThreadID numThreads
The number of threads active in rename.
InstQueue skidBuffer[Impl::MaxThreads]
Skid buffer between rename and decode.
int instsInProgress[Impl::MaxThreads]
Count of instructions in progress that have been sent off to the IQ and ROB, but are not yet included...
Stats::Scalar renameBlockCycles
Stat for total number of cycles spent blocking.
const FlagsType total
Print the total.
TimeBuffer< TimeStruct >::wire fromIEW
Wire to get IEW's output from backwards time buffer.
Stats::Scalar renameRenameLookups
Stat for total number of source register rename lookups.
Stats::Scalar renameLQFullEvents
Stat for total number of times that the LQ starts a stall in rename.
void resetStage()
Reset this pipeline stage.
Stats::Scalar renameSQFullEvents
Stat for total number of times that the SQ starts a stall in rename.
Derived & name(const std::string &name)
Set the name and marks this stat to print at the end of simulation.
int16_t ThreadID
Thread index/ID type.
Stats::Scalar fpRenameLookups
void rename(bool &status_change, ThreadID tid)
Determines what to do based on rename's current status.
int calcFreeLQEntries(ThreadID tid)
Calculates the number of free LQ entries for a specific thread.
int storesInProgress[Impl::MaxThreads]
Count of Store instructions in progress that have been sent off to the IQ and ROB, but are not yet included in their occupancy counts.
const PhysRegIndex & flatIndex() const
Flat index accessor.
bool blockThisCycle
Whether or not rename needs to block this cycle.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to list of active threads.
void tick()
Ticks rename, which processes all input signals and attempts to rename as many instructions as possib...
TimeBuffer< TimeStruct >::wire toDecode
Wire to write infromation heading to previous stages.
bool emptyROB[Impl::MaxThreads]
Records if the ROB is empty.
const RegClass & classValue() const
Class accessor.
unsigned commitToRenameDelay
Delay between commit and rename, in ticks.
InstQueue insts[Impl::MaxThreads]
Queue of all instructions coming from decode this cycle.
void startupStage()
Initializes variables for the stage.
void setTimeBuffer(TimeBuffer< TimeStruct > *tb_ptr)
Sets the main backwards communication time buffer pointer.
const RegIndex & index() const
Index accessors.
int calcFreeIQEntries(ThreadID tid)
Calculates the number of free IQ entries for a specific thread.
virtual RegId flattenRegId(const RegId ®Id) const =0
Stats::Scalar renameUndoneMaps
Stat for total number of mappings that were undone due to a squash.
Stats::Scalar vecRenameLookups
void sortInsts()
Separates instructions from decode into individual lists of instructions sorted by thread...
void setRenameMap(RenameMap rm_ptr[Impl::MaxThreads])
Sets pointer to rename maps (per-thread structures).
Register ID: describe an architectural register with its class and index.
void incrFullStat(const FullSource &source)
Function used to increment the stat that corresponds to the source of the stall.
Derived & desc(const std::string &_desc)
Set the description and marks this stat to print at the end of simulation.
unsigned skidBufferMax
The maximum skid buffer size.
FreeList * freeList
Free list interface.
Stats::Scalar vecPredRenameLookups
DefaultRename(O3CPU *_cpu, DerivO3CPUParams *params)
DefaultRename constructor.
void updateStatus()
Updates overall rename status based on all of the threads' statuses.
void serializeAfter(InstQueue &inst_list, ThreadID tid)
Either serializes on the next instruction available in the InstQueue, or records that it must seriali...
Stats::Scalar renameSkidInsts
Number of instructions inserted into skid buffers.
unsigned renameWidth
Rename width, in instructions.
DynInstPtr serializeInst[Impl::MaxThreads]
The serialize instruction that rename has stalled on.
bool resumeUnblocking
Whether or not rename needs to resume clearing out the skidbuffer after squashing.
bool checkStall(ThreadID tid)
Checks if any stages are telling rename to block.
Stats::Scalar intRenameLookups
void setDecodeQueue(TimeBuffer< DecodeStruct > *dq_ptr)
Sets pointer to time buffer coming from decode.
const char * className() const
Return a const char* with the register class name.
ThreadStatus renameStatus[Impl::MaxThreads]
Per-thread status.
void cprintf(const char *format, const Args &...args)
Stats::Scalar renameIdleCycles
Stat for total number of cycles spent idle.
bool getReg(PhysRegIdPtr phys_reg) const
Checks if the register is ready.