gem5
v20.1.0.0
|
DefaultRename handles both single threaded and SMT rename. More...
#include <rename.hh>
Classes | |
struct | FreeEntries |
Structures whose free entries impact the amount of instructions that can be renamed. More... | |
struct | RenameHistory |
Holds the information for each destination register rename. More... | |
struct | RenameStats |
struct | Stalls |
Source of possible stalls. More... | |
Public Types | |
enum | RenameStatus { Active, Inactive } |
Overall rename status. More... | |
enum | ThreadStatus { Running, Idle, StartSquash, Squashing, Blocked, Unblocking, SerializeStall } |
Individual thread status. More... | |
typedef Impl::CPUPol | CPUPol |
typedef Impl::DynInstPtr | DynInstPtr |
typedef Impl::O3CPU | O3CPU |
typedef CPUPol::DecodeStruct | DecodeStruct |
typedef CPUPol::RenameStruct | RenameStruct |
typedef CPUPol::TimeStruct | TimeStruct |
typedef CPUPol::FreeList | FreeList |
typedef CPUPol::RenameMap | RenameMap |
typedef CPUPol::IEW | IEW |
typedef CPUPol::Commit | Commit |
typedef std::deque< DynInstPtr > | InstQueue |
Public Member Functions | |
DefaultRename (O3CPU *_cpu, DerivO3CPUParams *params) | |
DefaultRename constructor. More... | |
std::string | name () const |
Returns the name of rename. More... | |
void | regProbePoints () |
Registers probes. More... | |
void | setTimeBuffer (TimeBuffer< TimeStruct > *tb_ptr) |
Sets the main backwards communication time buffer pointer. More... | |
void | setRenameQueue (TimeBuffer< RenameStruct > *rq_ptr) |
Sets pointer to time buffer used to communicate to the next stage. More... | |
void | setDecodeQueue (TimeBuffer< DecodeStruct > *dq_ptr) |
Sets pointer to time buffer coming from decode. More... | |
void | setIEWStage (IEW *iew_stage) |
Sets pointer to IEW stage. More... | |
void | setCommitStage (Commit *commit_stage) |
Sets pointer to commit stage. More... | |
void | startupStage () |
Initializes variables for the stage. More... | |
void | clearStates (ThreadID tid) |
Clear all thread-specific states. More... | |
void | setActiveThreads (std::list< ThreadID > *at_ptr) |
Sets pointer to list of active threads. More... | |
void | setRenameMap (RenameMap rm_ptr[Impl::MaxThreads]) |
Sets pointer to rename maps (per-thread structures). More... | |
void | setFreeList (FreeList *fl_ptr) |
Sets pointer to the free list. More... | |
void | setScoreboard (Scoreboard *_scoreboard) |
Sets pointer to the scoreboard. More... | |
void | drainSanityCheck () const |
Perform sanity checks after a drain. More... | |
bool | isDrained () const |
Has the stage drained? More... | |
void | takeOverFrom () |
Takes over from another CPU's thread. More... | |
void | squash (const InstSeqNum &squash_seq_num, ThreadID tid) |
Squashes all instructions in a thread. More... | |
void | tick () |
Ticks rename, which processes all input signals and attempts to rename as many instructions as possible. More... | |
void | dumpHistory () |
Debugging function used to dump history buffer of renamings. More... | |
Private Types | |
enum | FullSource { ROB, IQ, LQ, SQ, NONE } |
Enum to record the source of a structure full stall. More... | |
typedef std::pair< InstSeqNum, PhysRegIdPtr > | SeqNumRegPair |
Probe points. More... | |
Private Member Functions | |
void | resetStage () |
Reset this pipeline stage. More... | |
void | rename (bool &status_change, ThreadID tid) |
Determines what to do based on rename's current status. More... | |
void | renameInsts (ThreadID tid) |
Renames instructions for the given thread. More... | |
void | skidInsert (ThreadID tid) |
Inserts unused instructions from a given thread into the skid buffer, to be renamed once rename unblocks. More... | |
void | sortInsts () |
Separates instructions from decode into individual lists of instructions sorted by thread. More... | |
bool | skidsEmpty () |
Returns if all of the skid buffers are empty. More... | |
void | updateStatus () |
Updates overall rename status based on all of the threads' statuses. More... | |
bool | block (ThreadID tid) |
Switches rename to blocking, and signals back that rename has become blocked. More... | |
bool | unblock (ThreadID tid) |
Switches rename to unblocking if the skid buffer is empty, and signals back that rename has unblocked. More... | |
void | doSquash (const InstSeqNum &squash_seq_num, ThreadID tid) |
Executes actual squash, removing squashed instructions. More... | |
void | removeFromHistory (InstSeqNum inst_seq_num, ThreadID tid) |
Removes a committed instruction's rename history. More... | |
void | renameSrcRegs (const DynInstPtr &inst, ThreadID tid) |
Renames the source registers of an instruction. More... | |
void | renameDestRegs (const DynInstPtr &inst, ThreadID tid) |
Renames the destination registers of an instruction. More... | |
int | calcFreeROBEntries (ThreadID tid) |
Calculates the number of free ROB entries for a specific thread. More... | |
int | calcFreeIQEntries (ThreadID tid) |
Calculates the number of free IQ entries for a specific thread. More... | |
int | calcFreeLQEntries (ThreadID tid) |
Calculates the number of free LQ entries for a specific thread. More... | |
int | calcFreeSQEntries (ThreadID tid) |
Calculates the number of free SQ entries for a specific thread. More... | |
unsigned | validInsts () |
Returns the number of valid instructions coming from decode. More... | |
void | readStallSignals (ThreadID tid) |
Reads signals telling rename to block/unblock. More... | |
bool | checkStall (ThreadID tid) |
Checks if any stages are telling rename to block. More... | |
void | readFreeEntries (ThreadID tid) |
Gets the number of free entries for a specific thread. More... | |
bool | checkSignalsAndUpdate (ThreadID tid) |
Checks the signals and updates the status. More... | |
void | serializeAfter (InstQueue &inst_list, ThreadID tid) |
Either serializes on the next instruction available in the InstQueue, or records that it must serialize on the next instruction to enter rename. More... | |
void | incrFullStat (const FullSource &source) |
Function used to increment the stat that corresponds to the source of the stall. More... | |
Private Attributes | |
RenameStatus | _status |
Rename status. More... | |
ThreadStatus | renameStatus [Impl::MaxThreads] |
Per-thread status. More... | |
ProbePointArg< DynInstPtr > * | ppRename |
To probe when register renaming for an instruction is complete. More... | |
ProbePointArg< SeqNumRegPair > * | ppSquashInRename |
To probe when an instruction is squashed and the register mapping for it needs to be undone. More... | |
IEW * | iew_ptr |
Pointer to IEW stage. More... | |
Commit * | commit_ptr |
Pointer to commit stage. More... | |
std::list< RenameHistory > | historyBuffer [Impl::MaxThreads] |
A per-thread list of all destination register renames, used to either undo rename mappings or free old physical registers. More... | |
O3CPU * | cpu |
Pointer to CPU. More... | |
TimeBuffer< TimeStruct > * | timeBuffer |
Pointer to main time buffer used for backwards communication. More... | |
TimeBuffer< TimeStruct >::wire | fromIEW |
Wire to get IEW's output from backwards time buffer. More... | |
TimeBuffer< TimeStruct >::wire | fromCommit |
Wire to get commit's output from backwards time buffer. More... | |
TimeBuffer< TimeStruct >::wire | toDecode |
Wire to write infromation heading to previous stages. More... | |
TimeBuffer< RenameStruct > * | renameQueue |
Rename instruction queue. More... | |
TimeBuffer< RenameStruct >::wire | toIEW |
Wire to write any information heading to IEW. More... | |
TimeBuffer< DecodeStruct > * | decodeQueue |
Decode instruction queue interface. More... | |
TimeBuffer< DecodeStruct >::wire | fromDecode |
Wire to get decode's output from decode queue. More... | |
InstQueue | insts [Impl::MaxThreads] |
Queue of all instructions coming from decode this cycle. More... | |
InstQueue | skidBuffer [Impl::MaxThreads] |
Skid buffer between rename and decode. More... | |
RenameMap * | renameMap [Impl::MaxThreads] |
Rename map interface. More... | |
FreeList * | freeList |
Free list interface. More... | |
std::list< ThreadID > * | activeThreads |
Pointer to the list of active threads. More... | |
Scoreboard * | scoreboard |
Pointer to the scoreboard. More... | |
int | instsInProgress [Impl::MaxThreads] |
Count of instructions in progress that have been sent off to the IQ and ROB, but are not yet included in their occupancy counts. More... | |
int | loadsInProgress [Impl::MaxThreads] |
Count of Load instructions in progress that have been sent off to the IQ and ROB, but are not yet included in their occupancy counts. More... | |
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. More... | |
bool | wroteToTimeBuffer |
Variable that tracks if decode has written to the time buffer this cycle. More... | |
FreeEntries | freeEntries [Impl::MaxThreads] |
Per-thread tracking of the number of free entries of back-end structures. More... | |
bool | emptyROB [Impl::MaxThreads] |
Records if the ROB is empty. More... | |
Stalls | stalls [Impl::MaxThreads] |
Tracks which stages are telling decode to stall. More... | |
DynInstPtr | serializeInst [Impl::MaxThreads] |
The serialize instruction that rename has stalled on. More... | |
bool | serializeOnNextInst [Impl::MaxThreads] |
Records if rename needs to serialize on the next instruction for any thread. More... | |
int | iewToRenameDelay |
Delay between iew and rename, in ticks. More... | |
int | decodeToRenameDelay |
Delay between decode and rename, in ticks. More... | |
unsigned | commitToRenameDelay |
Delay between commit and rename, in ticks. More... | |
unsigned | renameWidth |
Rename width, in instructions. More... | |
unsigned | commitWidth |
Commit width, in instructions. More... | |
unsigned | toIEWIndex |
The index of the instruction in the time buffer to IEW that rename is currently using. More... | |
bool | blockThisCycle |
Whether or not rename needs to block this cycle. More... | |
bool | resumeSerialize |
Whether or not rename needs to resume a serialize instruction after squashing. More... | |
bool | resumeUnblocking |
Whether or not rename needs to resume clearing out the skidbuffer after squashing. More... | |
ThreadID | numThreads |
The number of threads active in rename. More... | |
unsigned | skidBufferMax |
The maximum skid buffer size. More... | |
DefaultRename::RenameStats | stats |
DefaultRename handles both single threaded and SMT rename.
Its width is specified by the parameters; each cycle it tries to rename that many instructions. It holds onto the rename history of all instructions with destination registers, storing the arch. register, the new physical register, and the old physical register, to allow for undoing of mappings if squashing happens, or freeing up registers upon commit. Rename handles blocking if the ROB, IQ, or LSQ is going to be full. Rename also handles barriers, and does so by stalling on the instruction until the ROB is empty and there are no instructions in flight to the ROB.
typedef CPUPol::Commit DefaultRename< Impl >::Commit |
typedef Impl::CPUPol DefaultRename< Impl >::CPUPol |
typedef CPUPol::DecodeStruct DefaultRename< Impl >::DecodeStruct |
typedef Impl::DynInstPtr DefaultRename< Impl >::DynInstPtr |
typedef CPUPol::FreeList DefaultRename< Impl >::FreeList |
typedef CPUPol::IEW DefaultRename< Impl >::IEW |
typedef std::deque<DynInstPtr> DefaultRename< Impl >::InstQueue |
typedef Impl::O3CPU DefaultRename< Impl >::O3CPU |
typedef CPUPol::RenameMap DefaultRename< Impl >::RenameMap |
typedef CPUPol::RenameStruct DefaultRename< Impl >::RenameStruct |
|
private |
typedef CPUPol::TimeStruct DefaultRename< Impl >::TimeStruct |
|
private |
enum DefaultRename::RenameStatus |
enum DefaultRename::ThreadStatus |
DefaultRename< Impl >::DefaultRename | ( | O3CPU * | _cpu, |
DerivO3CPUParams * | params | ||
) |
DefaultRename constructor.
Definition at line 59 of file rename_impl.hh.
References DefaultRename< Impl >::decodeToRenameDelay, DefaultRename< Impl >::emptyROB, fatal, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::Idle, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::loadsInProgress, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::renameWidth, DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::serializeOnNextInst, DefaultRename< Impl >::skidBufferMax, DefaultRename< Impl >::stalls, and DefaultRename< Impl >::storesInProgress.
|
private |
Switches rename to blocking, and signals back that rename has become blocked.
Definition at line 873 of file rename_impl.hh.
References DefaultRename< Impl >::Blocked, DPRINTF, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::resumeUnblocking, DefaultRename< Impl >::SerializeStall, DefaultRename< Impl >::skidInsert(), DefaultRename< Impl >::toDecode, DefaultRename< Impl >::Unblocking, and DefaultRename< Impl >::wroteToTimeBuffer.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::rename(), and DefaultRename< Impl >::renameInsts().
|
inlineprivate |
Calculates the number of free IQ entries for a specific thread.
Definition at line 1162 of file rename_impl.hh.
References DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::instsInProgress, and DefaultRename< Impl >::FreeEntries::iqEntries.
Referenced by DefaultRename< Impl >::checkStall(), and DefaultRename< Impl >::renameInsts().
|
inlineprivate |
Calculates the number of free LQ entries for a specific thread.
Definition at line 1174 of file rename_impl.hh.
References DPRINTF, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::loadsInProgress, and DefaultRename< Impl >::FreeEntries::lqEntries.
Referenced by DefaultRename< Impl >::checkStall(), and DefaultRename< Impl >::renameInsts().
|
inlineprivate |
Calculates the number of free ROB entries for a specific thread.
Definition at line 1150 of file rename_impl.hh.
References DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::instsInProgress, and DefaultRename< Impl >::FreeEntries::robEntries.
Referenced by DefaultRename< Impl >::checkStall(), and DefaultRename< Impl >::renameInsts().
|
inlineprivate |
Calculates the number of free SQ entries for a specific thread.
Definition at line 1188 of file rename_impl.hh.
References DPRINTF, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::FreeEntries::sqEntries, and DefaultRename< Impl >::storesInProgress.
Referenced by DefaultRename< Impl >::checkStall(), and DefaultRename< Impl >::renameInsts().
|
private |
Checks the signals and updates the status.
Definition at line 1296 of file rename_impl.hh.
References DefaultRename< Impl >::block(), DefaultRename< Impl >::Blocked, DefaultRename< Impl >::checkStall(), DPRINTF, DefaultRename< Impl >::fromCommit, DefaultRename< Impl >::insts, DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::readStallSignals(), DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::resumeSerialize, DefaultRename< Impl >::resumeUnblocking, DefaultRename< Impl >::Running, DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::SerializeStall, DefaultRename< Impl >::skidBuffer, DefaultRename< Impl >::squash(), DefaultRename< Impl >::Squashing, DefaultRename< Impl >::unblock(), and DefaultRename< Impl >::Unblocking.
Referenced by DefaultRename< Impl >::tick().
|
private |
Checks if any stages are telling rename to block.
Definition at line 1228 of file rename_impl.hh.
References DefaultRename< Impl >::calcFreeIQEntries(), DefaultRename< Impl >::calcFreeLQEntries(), DefaultRename< Impl >::calcFreeROBEntries(), DefaultRename< Impl >::calcFreeSQEntries(), DPRINTF, DefaultRename< Impl >::emptyROB, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::SerializeStall, and DefaultRename< Impl >::stalls.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate().
void DefaultRename< Impl >::clearStates | ( | ThreadID | tid | ) |
Clear all thread-specific states.
Definition at line 222 of file rename_impl.hh.
References DefaultRename< Impl >::commit_ptr, DefaultRename< Impl >::emptyROB, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::Idle, DefaultRename< Impl >::Stalls::iew, DefaultRename< Impl >::iew_ptr, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::FreeEntries::iqEntries, DefaultRename< Impl >::loadsInProgress, DefaultRename< Impl >::FreeEntries::lqEntries, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::FreeEntries::robEntries, DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::serializeOnNextInst, DefaultRename< Impl >::FreeEntries::sqEntries, DefaultRename< Impl >::stalls, and DefaultRename< Impl >::storesInProgress.
|
private |
Executes actual squash, removing squashed instructions.
Definition at line 928 of file rename_impl.hh.
References DefaultRename< Impl >::cpu, DPRINTF, DefaultRename< Impl >::freeList, DefaultRename< Impl >::historyBuffer, DefaultRename< Impl >::ppSquashInRename, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::stats, and DefaultRename< Impl >::RenameStats::undoneMaps.
Referenced by DefaultRename< Impl >::squash().
void DefaultRename< Impl >::drainSanityCheck |
Perform sanity checks after a drain.
Definition at line 326 of file rename_impl.hh.
References DefaultRename< Impl >::historyBuffer, DefaultRename< Impl >::insts, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::numThreads, and DefaultRename< Impl >::skidBuffer.
void DefaultRename< Impl >::dumpHistory |
Debugging function used to dump history buffer of renamings.
Definition at line 1433 of file rename_impl.hh.
References cprintf(), DefaultRename< Impl >::historyBuffer, and DefaultRename< Impl >::numThreads.
|
inlineprivate |
Function used to increment the stat that corresponds to the source of the stall.
Definition at line 1410 of file rename_impl.hh.
References DefaultRename< Impl >::IQ, DefaultRename< Impl >::RenameStats::IQFullEvents, DefaultRename< Impl >::LQ, DefaultRename< Impl >::RenameStats::LQFullEvents, panic, DefaultRename< Impl >::ROB, DefaultRename< Impl >::RenameStats::ROBFullEvents, DefaultRename< Impl >::SQ, DefaultRename< Impl >::RenameStats::SQFullEvents, and DefaultRename< Impl >::stats.
Referenced by DefaultRename< Impl >::renameInsts().
bool DefaultRename< Impl >::isDrained |
Has the stage drained?
Definition at line 304 of file rename_impl.hh.
References DefaultRename< Impl >::historyBuffer, DefaultRename< Impl >::Idle, DefaultRename< Impl >::insts, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::numThreads, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::Running, and DefaultRename< Impl >::skidBuffer.
std::string DefaultRename< Impl >::name |
Returns the name of rename.
Definition at line 92 of file rename_impl.hh.
|
private |
Gets the number of free entries for a specific thread.
Definition at line 1260 of file rename_impl.hh.
References DPRINTF, DefaultRename< Impl >::emptyROB, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::fromCommit, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::FreeEntries::iqEntries, DefaultRename< Impl >::FreeEntries::lqEntries, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::FreeEntries::robEntries, and DefaultRename< Impl >::FreeEntries::sqEntries.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate().
|
private |
Reads signals telling rename to block/unblock.
Definition at line 1214 of file rename_impl.hh.
References DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::Stalls::iew, and DefaultRename< Impl >::stalls.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate().
void DefaultRename< Impl >::regProbePoints |
Registers probes.
Definition at line 170 of file rename_impl.hh.
References DefaultRename< Impl >::cpu, DefaultRename< Impl >::ppRename, and DefaultRename< Impl >::ppSquashInRename.
|
private |
Removes a committed instruction's rename history.
Definition at line 978 of file rename_impl.hh.
References DefaultRename< Impl >::RenameStats::committedMaps, DPRINTF, DefaultRename< Impl >::freeList, DefaultRename< Impl >::historyBuffer, and DefaultRename< Impl >::stats.
Referenced by DefaultRename< Impl >::tick().
|
private |
Determines what to do based on rename's current status.
status_change | rename() sets this variable if there was a status change (ie switching from blocking to unblocking). |
tid | Thread id to rename instructions from. |
Definition at line 456 of file rename_impl.hh.
References DefaultRename< Impl >::block(), DefaultRename< Impl >::RenameStats::blockCycles, DefaultRename< Impl >::Blocked, DefaultRename< Impl >::blockThisCycle, DPRINTF, DefaultRename< Impl >::Idle, DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::resumeSerialize, DefaultRename< Impl >::resumeUnblocking, DefaultRename< Impl >::Running, DefaultRename< Impl >::SerializeStall, DefaultRename< Impl >::RenameStats::serializeStallCycles, DefaultRename< Impl >::skidInsert(), DefaultRename< Impl >::RenameStats::squashCycles, DefaultRename< Impl >::Squashing, DefaultRename< Impl >::stats, DefaultRename< Impl >::toDecode, DefaultRename< Impl >::unblock(), DefaultRename< Impl >::Unblocking, and DefaultRename< Impl >::validInsts().
Referenced by DefaultRename< Impl >::tick().
|
inlineprivate |
Renames the destination registers of an instruction.
Definition at line 1096 of file rename_impl.hh.
References RegId::className(), DPRINTF, ThreadContext::flattenRegId(), RegId::getNumPinnedWrites(), DefaultRename< Impl >::historyBuffer, RegId::index(), DefaultRename< Impl >::RenameStats::renamedOperands, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::scoreboard, RegId::setNumPinnedWrites(), DefaultRename< Impl >::stats, and Scoreboard::unsetReg().
Referenced by DefaultRename< Impl >::renameInsts().
|
private |
Renames instructions for the given thread.
Also handles serializing instructions.
Definition at line 512 of file rename_impl.hh.
References DefaultRename< Impl >::block(), DefaultRename< Impl >::blockThisCycle, DefaultRename< Impl >::calcFreeIQEntries(), DefaultRename< Impl >::calcFreeLQEntries(), DefaultRename< Impl >::calcFreeROBEntries(), DefaultRename< Impl >::calcFreeSQEntries(), DPRINTF, DefaultRename< Impl >::emptyROB, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::RenameStats::fullRegistersEvents, DefaultRename< Impl >::RenameStats::idleCycles, DefaultRename< Impl >::incrFullStat(), DefaultRename< Impl >::insts, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::IQ, DefaultRename< Impl >::loadsInProgress, DefaultRename< Impl >::LQ, ProbePointArg< Arg >::notify(), DefaultRename< Impl >::ppRename, DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::RenameStats::renamedInsts, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::renameSrcRegs(), DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::renameWidth, DefaultRename< Impl >::ROB, DefaultRename< Impl >::RenameStats::runCycles, DefaultRename< Impl >::Running, DefaultRename< Impl >::serializeAfter(), DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::serializeOnNextInst, DefaultRename< Impl >::SerializeStall, DefaultRename< Impl >::RenameStats::serializing, TimeBuffer< T >::size, DefaultRename< Impl >::skidBuffer, DefaultRename< Impl >::SQ, DefaultRename< Impl >::RenameStats::squashedInsts, DefaultRename< Impl >::stats, DefaultRename< Impl >::storesInProgress, DefaultRename< Impl >::RenameStats::tempSerializing, DefaultRename< Impl >::toDecode, DefaultRename< Impl >::toIEW, DefaultRename< Impl >::toIEWIndex, DefaultRename< Impl >::RenameStats::unblockCycles, DefaultRename< Impl >::Unblocking, and DefaultRename< Impl >::wroteToTimeBuffer.
Referenced by DefaultRename< Impl >::rename().
|
inlineprivate |
Renames the source registers of an instruction.
Definition at line 1029 of file rename_impl.hh.
References CCRegClass, RegId::className(), PhysRegId::className(), RegId::classValue(), DPRINTF, PhysRegId::flatIndex(), ThreadContext::flattenRegId(), FloatRegClass, DefaultRename< Impl >::RenameStats::fpLookups, Scoreboard::getReg(), RegId::index(), PhysRegId::index(), DefaultRename< Impl >::RenameStats::intLookups, IntRegClass, DefaultRename< Impl >::RenameStats::lookups, MiscRegClass, panic, DefaultRename< Impl >::renameMap, DefaultRename< Impl >::scoreboard, DefaultRename< Impl >::stats, VecElemClass, DefaultRename< Impl >::RenameStats::vecLookups, DefaultRename< Impl >::RenameStats::vecPredLookups, VecPredRegClass, and VecRegClass.
Referenced by DefaultRename< Impl >::renameInsts().
|
private |
Reset this pipeline stage.
Definition at line 244 of file rename_impl.hh.
References DefaultRename< Impl >::_status, DefaultRename< Impl >::commit_ptr, DefaultRename< Impl >::emptyROB, DefaultRename< Impl >::freeEntries, DefaultRename< Impl >::Idle, DefaultRename< Impl >::Stalls::iew, DefaultRename< Impl >::iew_ptr, DefaultRename< Impl >::Inactive, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::FreeEntries::iqEntries, DefaultRename< Impl >::loadsInProgress, DefaultRename< Impl >::FreeEntries::lqEntries, DefaultRename< Impl >::numThreads, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::resumeSerialize, DefaultRename< Impl >::resumeUnblocking, DefaultRename< Impl >::FreeEntries::robEntries, DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::serializeOnNextInst, DefaultRename< Impl >::FreeEntries::sqEntries, DefaultRename< Impl >::stalls, and DefaultRename< Impl >::storesInProgress.
Referenced by DefaultRename< Impl >::startupStage(), and DefaultRename< Impl >::takeOverFrom().
|
private |
Either serializes on the next instruction available in the InstQueue, or records that it must serialize on the next instruction to enter rename.
inst_list | The list of younger, unprocessed instructions for the thread that has the serializeAfter instruction. |
tid | The thread id. |
Definition at line 1396 of file rename_impl.hh.
References DefaultRename< Impl >::serializeOnNextInst.
Referenced by DefaultRename< Impl >::renameInsts().
void DefaultRename< Impl >::setActiveThreads | ( | std::list< ThreadID > * | at_ptr | ) |
Sets pointer to list of active threads.
Definition at line 274 of file rename_impl.hh.
References DefaultRename< Impl >::activeThreads.
|
inline |
Sets pointer to commit stage.
Used only for initialization.
Definition at line 153 of file rename.hh.
References DefaultRename< Impl >::commit_ptr.
void DefaultRename< Impl >::setDecodeQueue | ( | TimeBuffer< DecodeStruct > * | dq_ptr | ) |
Sets pointer to time buffer coming from decode.
Definition at line 205 of file rename_impl.hh.
References DefaultRename< Impl >::decodeQueue, DefaultRename< Impl >::decodeToRenameDelay, DefaultRename< Impl >::fromDecode, and TimeBuffer< T >::getWire().
void DefaultRename< Impl >::setFreeList | ( | FreeList * | fl_ptr | ) |
Sets pointer to the free list.
Definition at line 290 of file rename_impl.hh.
References DefaultRename< Impl >::freeList.
|
inline |
Sets pointer to IEW stage.
Used only for initialization.
Definition at line 149 of file rename.hh.
References DefaultRename< Impl >::iew_ptr.
void DefaultRename< Impl >::setRenameMap | ( | RenameMap | rm_ptr[Impl::MaxThreads] | ) |
Sets pointer to rename maps (per-thread structures).
Definition at line 282 of file rename_impl.hh.
References DefaultRename< Impl >::numThreads, and DefaultRename< Impl >::renameMap.
void DefaultRename< Impl >::setRenameQueue | ( | TimeBuffer< RenameStruct > * | rq_ptr | ) |
Sets pointer to time buffer used to communicate to the next stage.
Definition at line 195 of file rename_impl.hh.
References TimeBuffer< T >::getWire(), DefaultRename< Impl >::renameQueue, and DefaultRename< Impl >::toIEW.
void DefaultRename< Impl >::setScoreboard | ( | Scoreboard * | _scoreboard | ) |
Sets pointer to the scoreboard.
Definition at line 297 of file rename_impl.hh.
References DefaultRename< Impl >::scoreboard.
void DefaultRename< Impl >::setTimeBuffer | ( | TimeBuffer< TimeStruct > * | tb_ptr | ) |
Sets the main backwards communication time buffer pointer.
Definition at line 179 of file rename_impl.hh.
References DefaultRename< Impl >::commitToRenameDelay, DefaultRename< Impl >::fromCommit, DefaultRename< Impl >::fromIEW, TimeBuffer< T >::getWire(), DefaultRename< Impl >::iewToRenameDelay, DefaultRename< Impl >::timeBuffer, and DefaultRename< Impl >::toDecode.
|
private |
Inserts unused instructions from a given thread into the skid buffer, to be renamed once rename unblocks.
Definition at line 766 of file rename_impl.hh.
References DPRINTF, DefaultRename< Impl >::insts, panic, DefaultRename< Impl >::skidBuffer, DefaultRename< Impl >::skidBufferMax, DefaultRename< Impl >::RenameStats::skidInsts, DefaultRename< Impl >::stats, and warn.
Referenced by DefaultRename< Impl >::block(), and DefaultRename< Impl >::rename().
|
private |
Returns if all of the skid buffers are empty.
Definition at line 817 of file rename_impl.hh.
References DefaultRename< Impl >::activeThreads, and DefaultRename< Impl >::skidBuffer.
|
private |
Separates instructions from decode into individual lists of instructions sorted by thread.
Definition at line 801 of file rename_impl.hh.
References curTick(), DTRACE, DefaultRename< Impl >::fromDecode, ArmISA::i, DefaultRename< Impl >::insts, and TimeBuffer< T >::size.
Referenced by DefaultRename< Impl >::tick().
void DefaultRename< Impl >::squash | ( | const InstSeqNum & | squash_seq_num, |
ThreadID | tid | ||
) |
Squashes all instructions in a thread.
Definition at line 338 of file rename_impl.hh.
References DefaultRename< Impl >::Blocked, DefaultRename< Impl >::doSquash(), DPRINTF, DefaultRename< Impl >::fromDecode, ArmISA::i, DefaultRename< Impl >::insts, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::resumeSerialize, DefaultRename< Impl >::serializeInst, DefaultRename< Impl >::SerializeStall, TimeBuffer< T >::size, DefaultRename< Impl >::skidBuffer, DefaultRename< Impl >::Squashing, DefaultRename< Impl >::toDecode, DefaultRename< Impl >::Unblocking, and DefaultRename< Impl >::wroteToTimeBuffer.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate().
void DefaultRename< Impl >::startupStage |
Initializes variables for the stage.
Definition at line 215 of file rename_impl.hh.
References DefaultRename< Impl >::resetStage().
void DefaultRename< Impl >::takeOverFrom |
Takes over from another CPU's thread.
Definition at line 319 of file rename_impl.hh.
References DefaultRename< Impl >::resetStage().
void DefaultRename< Impl >::tick |
Ticks rename, which processes all input signals and attempts to rename as many instructions as possible.
Definition at line 392 of file rename_impl.hh.
References DefaultRename< Impl >::activeThreads, DefaultRename< Impl >::blockThisCycle, DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::cpu, DPRINTF, DefaultRename< Impl >::fromCommit, DefaultRename< Impl >::fromIEW, DefaultRename< Impl >::instsInProgress, DefaultRename< Impl >::loadsInProgress, DefaultRename< Impl >::numThreads, DefaultRename< Impl >::removeFromHistory(), DefaultRename< Impl >::rename(), DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::sortInsts(), DefaultRename< Impl >::Squashing, DefaultRename< Impl >::storesInProgress, DefaultRename< Impl >::toIEWIndex, DefaultRename< Impl >::updateStatus(), and DefaultRename< Impl >::wroteToTimeBuffer.
|
private |
Switches rename to unblocking if the skid buffer is empty, and signals back that rename has unblocked.
Definition at line 907 of file rename_impl.hh.
References DPRINTF, DefaultRename< Impl >::renameStatus, DefaultRename< Impl >::Running, DefaultRename< Impl >::SerializeStall, DefaultRename< Impl >::skidBuffer, DefaultRename< Impl >::toDecode, and DefaultRename< Impl >::wroteToTimeBuffer.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), and DefaultRename< Impl >::rename().
|
private |
Updates overall rename status based on all of the threads' statuses.
Definition at line 834 of file rename_impl.hh.
References DefaultRename< Impl >::_status, DefaultRename< Impl >::Active, DefaultRename< Impl >::activeThreads, DefaultRename< Impl >::cpu, DPRINTF, DefaultRename< Impl >::Inactive, DefaultRename< Impl >::renameStatus, and DefaultRename< Impl >::Unblocking.
Referenced by DefaultRename< Impl >::tick().
|
private |
Returns the number of valid instructions coming from decode.
Definition at line 1200 of file rename_impl.hh.
References DefaultRename< Impl >::fromDecode, ArmISA::i, and TimeBuffer< T >::size.
Referenced by DefaultRename< Impl >::rename().
|
private |
Rename status.
Definition at line 114 of file rename.hh.
Referenced by DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::updateStatus().
|
private |
Pointer to the list of active threads.
Definition at line 363 of file rename.hh.
Referenced by DefaultRename< Impl >::setActiveThreads(), DefaultRename< Impl >::skidsEmpty(), DefaultRename< Impl >::tick(), and DefaultRename< Impl >::updateStatus().
|
private |
Whether or not rename needs to block this cycle.
Definition at line 449 of file rename.hh.
Referenced by DefaultRename< Impl >::rename(), DefaultRename< Impl >::renameInsts(), and DefaultRename< Impl >::tick().
|
private |
Pointer to commit stage.
Used only for initialization.
Definition at line 161 of file rename.hh.
Referenced by DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::setCommitStage().
|
private |
Delay between commit and rename, in ticks.
Definition at line 433 of file rename.hh.
Referenced by DefaultRename< Impl >::setTimeBuffer().
|
private |
|
private |
Pointer to CPU.
Definition at line 324 of file rename.hh.
Referenced by DefaultRename< Impl >::doSquash(), DefaultRename< Impl >::regProbePoints(), DefaultRename< Impl >::tick(), and DefaultRename< Impl >::updateStatus().
|
private |
Decode instruction queue interface.
Definition at line 345 of file rename.hh.
Referenced by DefaultRename< Impl >::setDecodeQueue().
|
private |
Delay between decode and rename, in ticks.
Definition at line 430 of file rename.hh.
Referenced by DefaultRename< Impl >::DefaultRename(), and DefaultRename< Impl >::setDecodeQueue().
|
private |
Records if the ROB is empty.
In SMT mode the ROB may be dynamically partitioned between threads, so the ROB must tell rename when it is empty.
Definition at line 407 of file rename.hh.
Referenced by DefaultRename< Impl >::checkStall(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::renameInsts(), and DefaultRename< Impl >::resetStage().
|
private |
Per-thread tracking of the number of free entries of back-end structures.
Definition at line 401 of file rename.hh.
Referenced by DefaultRename< Impl >::calcFreeIQEntries(), DefaultRename< Impl >::calcFreeLQEntries(), DefaultRename< Impl >::calcFreeROBEntries(), DefaultRename< Impl >::calcFreeSQEntries(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::readFreeEntries(), and DefaultRename< Impl >::resetStage().
|
private |
Free list interface.
Definition at line 360 of file rename.hh.
Referenced by DefaultRename< Impl >::doSquash(), DefaultRename< Impl >::removeFromHistory(), and DefaultRename< Impl >::setFreeList().
|
private |
Wire to get commit's output from backwards time buffer.
Definition at line 333 of file rename.hh.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::setTimeBuffer(), and DefaultRename< Impl >::tick().
|
private |
Wire to get decode's output from decode queue.
Definition at line 348 of file rename.hh.
Referenced by DefaultRename< Impl >::setDecodeQueue(), DefaultRename< Impl >::sortInsts(), DefaultRename< Impl >::squash(), and DefaultRename< Impl >::validInsts().
|
private |
Wire to get IEW's output from backwards time buffer.
Definition at line 330 of file rename.hh.
Referenced by DefaultRename< Impl >::calcFreeIQEntries(), DefaultRename< Impl >::calcFreeLQEntries(), DefaultRename< Impl >::calcFreeROBEntries(), DefaultRename< Impl >::calcFreeSQEntries(), DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::readStallSignals(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::setTimeBuffer(), and DefaultRename< Impl >::tick().
|
private |
A per-thread list of all destination register renames, used to either undo rename mappings or free old physical registers.
Definition at line 321 of file rename.hh.
Referenced by DefaultRename< Impl >::doSquash(), DefaultRename< Impl >::drainSanityCheck(), DefaultRename< Impl >::dumpHistory(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::removeFromHistory(), and DefaultRename< Impl >::renameDestRegs().
|
private |
Pointer to IEW stage.
Used only for initialization.
Definition at line 158 of file rename.hh.
Referenced by DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::setIEWStage().
|
private |
Delay between iew and rename, in ticks.
Definition at line 427 of file rename.hh.
Referenced by DefaultRename< Impl >::setTimeBuffer().
|
private |
Queue of all instructions coming from decode this cycle.
Definition at line 351 of file rename.hh.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::drainSanityCheck(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::skidInsert(), DefaultRename< Impl >::sortInsts(), and DefaultRename< Impl >::squash().
|
private |
Count of instructions in progress that have been sent off to the IQ and ROB, but are not yet included in their occupancy counts.
Definition at line 371 of file rename.hh.
Referenced by DefaultRename< Impl >::calcFreeIQEntries(), DefaultRename< Impl >::calcFreeROBEntries(), DefaultRename< Impl >::checkStall(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::drainSanityCheck(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::tick().
|
private |
Count of Load instructions in progress that have been sent off to the IQ and ROB, but are not yet included in their occupancy counts.
Definition at line 376 of file rename.hh.
Referenced by DefaultRename< Impl >::calcFreeLQEntries(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::tick().
|
private |
The number of threads active in rename.
Definition at line 460 of file rename.hh.
Referenced by DefaultRename< Impl >::drainSanityCheck(), DefaultRename< Impl >::dumpHistory(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::resetStage(), DefaultRename< Impl >::setRenameMap(), and DefaultRename< Impl >::tick().
|
private |
To probe when register renaming for an instruction is complete.
Definition at line 122 of file rename.hh.
Referenced by DefaultRename< Impl >::regProbePoints(), and DefaultRename< Impl >::renameInsts().
|
private |
To probe when an instruction is squashed and the register mapping for it needs to be undone.
Definition at line 127 of file rename.hh.
Referenced by DefaultRename< Impl >::doSquash(), and DefaultRename< Impl >::regProbePoints().
|
private |
Rename map interface.
Definition at line 357 of file rename.hh.
Referenced by DefaultRename< Impl >::checkStall(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::doSquash(), DefaultRename< Impl >::readFreeEntries(), DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::renameSrcRegs(), and DefaultRename< Impl >::setRenameMap().
|
private |
Rename instruction queue.
Definition at line 339 of file rename.hh.
Referenced by DefaultRename< Impl >::setRenameQueue().
|
private |
Per-thread status.
Definition at line 117 of file rename.hh.
Referenced by DefaultRename< Impl >::block(), DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::checkStall(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::rename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), DefaultRename< Impl >::squash(), DefaultRename< Impl >::tick(), DefaultRename< Impl >::unblock(), and DefaultRename< Impl >::updateStatus().
|
private |
Rename width, in instructions.
Definition at line 436 of file rename.hh.
Referenced by DefaultRename< Impl >::DefaultRename(), and DefaultRename< Impl >::renameInsts().
|
private |
Whether or not rename needs to resume a serialize instruction after squashing.
Definition at line 453 of file rename.hh.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::rename(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::squash().
|
private |
Whether or not rename needs to resume clearing out the skidbuffer after squashing.
Definition at line 457 of file rename.hh.
Referenced by DefaultRename< Impl >::block(), DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::rename(), and DefaultRename< Impl >::resetStage().
|
private |
Pointer to the scoreboard.
Definition at line 366 of file rename.hh.
Referenced by DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameSrcRegs(), and DefaultRename< Impl >::setScoreboard().
|
private |
The serialize instruction that rename has stalled on.
Definition at line 419 of file rename.hh.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::squash().
|
private |
Records if rename needs to serialize on the next instruction for any thread.
Definition at line 424 of file rename.hh.
Referenced by DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::serializeAfter().
|
private |
Skid buffer between rename and decode.
Definition at line 354 of file rename.hh.
Referenced by DefaultRename< Impl >::checkSignalsAndUpdate(), DefaultRename< Impl >::drainSanityCheck(), DefaultRename< Impl >::isDrained(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::skidInsert(), DefaultRename< Impl >::skidsEmpty(), DefaultRename< Impl >::squash(), and DefaultRename< Impl >::unblock().
|
private |
The maximum skid buffer size.
Definition at line 463 of file rename.hh.
Referenced by DefaultRename< Impl >::DefaultRename(), and DefaultRename< Impl >::skidInsert().
|
private |
Tracks which stages are telling decode to stall.
Definition at line 416 of file rename.hh.
Referenced by DefaultRename< Impl >::checkStall(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::readStallSignals(), and DefaultRename< Impl >::resetStage().
|
private |
Referenced by DefaultRename< Impl >::doSquash(), DefaultRename< Impl >::incrFullStat(), DefaultRename< Impl >::removeFromHistory(), DefaultRename< Impl >::rename(), DefaultRename< Impl >::renameDestRegs(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::renameSrcRegs(), and DefaultRename< Impl >::skidInsert().
|
private |
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.
Definition at line 381 of file rename.hh.
Referenced by DefaultRename< Impl >::calcFreeSQEntries(), DefaultRename< Impl >::clearStates(), DefaultRename< Impl >::DefaultRename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::tick().
|
private |
Pointer to main time buffer used for backwards communication.
Definition at line 327 of file rename.hh.
Referenced by DefaultRename< Impl >::setTimeBuffer().
|
private |
Wire to write infromation heading to previous stages.
Definition at line 336 of file rename.hh.
Referenced by DefaultRename< Impl >::block(), DefaultRename< Impl >::rename(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::setTimeBuffer(), DefaultRename< Impl >::squash(), and DefaultRename< Impl >::unblock().
|
private |
Wire to write any information heading to IEW.
Definition at line 342 of file rename.hh.
Referenced by DefaultRename< Impl >::renameInsts(), and DefaultRename< Impl >::setRenameQueue().
|
private |
The index of the instruction in the time buffer to IEW that rename is currently using.
Definition at line 446 of file rename.hh.
Referenced by DefaultRename< Impl >::renameInsts(), and DefaultRename< Impl >::tick().
|
private |
Variable that tracks if decode has written to the time buffer this cycle.
Used to tell CPU if there is activity this cycle.
Definition at line 386 of file rename.hh.
Referenced by DefaultRename< Impl >::block(), DefaultRename< Impl >::renameInsts(), DefaultRename< Impl >::squash(), DefaultRename< Impl >::tick(), and DefaultRename< Impl >::unblock().