gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DefaultRename< Impl > Class Template Reference

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< DynInstPtrInstQueue
 

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, PhysRegIdPtrSeqNumRegPair
 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...
 
IEWiew_ptr
 Pointer to IEW stage. More...
 
Commitcommit_ptr
 Pointer to commit stage. More...
 
std::list< RenameHistoryhistoryBuffer [Impl::MaxThreads]
 A per-thread list of all destination register renames, used to either undo rename mappings or free old physical registers. More...
 
O3CPUcpu
 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...
 
RenameMaprenameMap [Impl::MaxThreads]
 Rename map interface. More...
 
FreeListfreeList
 Free list interface. More...
 
std::list< ThreadID > * activeThreads
 Pointer to the list of active threads. More...
 
Scoreboardscoreboard
 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
 

Detailed Description

template<class Impl>
class DefaultRename< Impl >

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.

Definition at line 68 of file rename.hh.

Member Typedef Documentation

◆ Commit

template<class Impl >
typedef CPUPol::Commit DefaultRename< Impl >::Commit

Definition at line 84 of file rename.hh.

◆ CPUPol

template<class Impl >
typedef Impl::CPUPol DefaultRename< Impl >::CPUPol

Definition at line 72 of file rename.hh.

◆ DecodeStruct

template<class Impl >
typedef CPUPol::DecodeStruct DefaultRename< Impl >::DecodeStruct

Definition at line 77 of file rename.hh.

◆ DynInstPtr

template<class Impl >
typedef Impl::DynInstPtr DefaultRename< Impl >::DynInstPtr

Definition at line 73 of file rename.hh.

◆ FreeList

template<class Impl >
typedef CPUPol::FreeList DefaultRename< Impl >::FreeList

Definition at line 80 of file rename.hh.

◆ IEW

template<class Impl >
typedef CPUPol::IEW DefaultRename< Impl >::IEW

Definition at line 83 of file rename.hh.

◆ InstQueue

template<class Impl >
typedef std::deque<DynInstPtr> DefaultRename< Impl >::InstQueue

Definition at line 90 of file rename.hh.

◆ O3CPU

template<class Impl >
typedef Impl::O3CPU DefaultRename< Impl >::O3CPU

Definition at line 74 of file rename.hh.

◆ RenameMap

template<class Impl >
typedef CPUPol::RenameMap DefaultRename< Impl >::RenameMap

Definition at line 81 of file rename.hh.

◆ RenameStruct

template<class Impl >
typedef CPUPol::RenameStruct DefaultRename< Impl >::RenameStruct

Definition at line 78 of file rename.hh.

◆ SeqNumRegPair

template<class Impl >
typedef std::pair<InstSeqNum, PhysRegIdPtr> DefaultRename< Impl >::SeqNumRegPair
private

Probe points.

Definition at line 120 of file rename.hh.

◆ TimeStruct

template<class Impl >
typedef CPUPol::TimeStruct DefaultRename< Impl >::TimeStruct

Definition at line 79 of file rename.hh.

Member Enumeration Documentation

◆ FullSource

template<class Impl >
enum DefaultRename::FullSource
private

Enum to record the source of a structure full stall.

Can come from either ROB, IQ, LSQ, and it is priortized in that order.

Enumerator
ROB 
IQ 
LQ 
SQ 
NONE 

Definition at line 468 of file rename.hh.

◆ RenameStatus

template<class Impl >
enum DefaultRename::RenameStatus

Overall rename status.

Used to determine if the CPU can deschedule itself due to a lack of activity.

Enumerator
Active 
Inactive 

Definition at line 96 of file rename.hh.

◆ ThreadStatus

template<class Impl >
enum DefaultRename::ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
StartSquash 
Squashing 
Blocked 
Unblocking 
SerializeStall 

Definition at line 102 of file rename.hh.

Constructor & Destructor Documentation

◆ DefaultRename()

template<class Impl >
DefaultRename< Impl >::DefaultRename ( O3CPU _cpu,
DerivO3CPUParams *  params 
)

Member Function Documentation

◆ block()

template<class Impl >
bool DefaultRename< Impl >::block ( ThreadID  tid)
private

◆ calcFreeIQEntries()

template<class Impl >
int DefaultRename< Impl >::calcFreeIQEntries ( ThreadID  tid)
inlineprivate

◆ calcFreeLQEntries()

template<class Impl >
int DefaultRename< Impl >::calcFreeLQEntries ( ThreadID  tid)
inlineprivate

◆ calcFreeROBEntries()

template<class Impl >
int DefaultRename< Impl >::calcFreeROBEntries ( ThreadID  tid)
inlineprivate

◆ calcFreeSQEntries()

template<class Impl >
int DefaultRename< Impl >::calcFreeSQEntries ( ThreadID  tid)
inlineprivate

◆ checkSignalsAndUpdate()

template<class Impl >
bool DefaultRename< Impl >::checkSignalsAndUpdate ( ThreadID  tid)
private

◆ checkStall()

template<class Impl >
bool DefaultRename< Impl >::checkStall ( ThreadID  tid)
private

◆ clearStates()

template<class Impl >
void DefaultRename< Impl >::clearStates ( ThreadID  tid)

◆ doSquash()

template<class Impl >
void DefaultRename< Impl >::doSquash ( const InstSeqNum squash_seq_num,
ThreadID  tid 
)
private

◆ drainSanityCheck()

template<class Impl >
void DefaultRename< Impl >::drainSanityCheck

◆ dumpHistory()

template<class Impl >
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.

◆ incrFullStat()

template<class Impl >
void DefaultRename< Impl >::incrFullStat ( const FullSource source)
inlineprivate

◆ isDrained()

template<class Impl >
bool DefaultRename< Impl >::isDrained

◆ name()

template<class Impl >
std::string DefaultRename< Impl >::name

Returns the name of rename.

Definition at line 92 of file rename_impl.hh.

◆ readFreeEntries()

template<class Impl >
void DefaultRename< Impl >::readFreeEntries ( ThreadID  tid)
private

◆ readStallSignals()

template<class Impl >
void DefaultRename< Impl >::readStallSignals ( ThreadID  tid)
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().

◆ regProbePoints()

template<class Impl >
void DefaultRename< Impl >::regProbePoints

◆ removeFromHistory()

template<class Impl >
void DefaultRename< Impl >::removeFromHistory ( InstSeqNum  inst_seq_num,
ThreadID  tid 
)
private

◆ rename()

template<class Impl >
void DefaultRename< Impl >::rename ( bool &  status_change,
ThreadID  tid 
)
private

◆ renameDestRegs()

template<class Impl >
void DefaultRename< Impl >::renameDestRegs ( const DynInstPtr inst,
ThreadID  tid 
)
inlineprivate

◆ renameInsts()

template<class Impl >
void DefaultRename< Impl >::renameInsts ( ThreadID  tid)
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().

◆ renameSrcRegs()

template<class Impl >
void DefaultRename< Impl >::renameSrcRegs ( const DynInstPtr inst,
ThreadID  tid 
)
inlineprivate

◆ resetStage()

template<class Impl >
void DefaultRename< Impl >::resetStage
private

◆ serializeAfter()

template<class Impl >
void DefaultRename< Impl >::serializeAfter ( InstQueue inst_list,
ThreadID  tid 
)
private

Either serializes on the next instruction available in the InstQueue, or records that it must serialize on the next instruction to enter rename.

Parameters
inst_listThe list of younger, unprocessed instructions for the thread that has the serializeAfter instruction.
tidThe thread id.

Definition at line 1396 of file rename_impl.hh.

References DefaultRename< Impl >::serializeOnNextInst.

Referenced by DefaultRename< Impl >::renameInsts().

◆ setActiveThreads()

template<class Impl >
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.

◆ setCommitStage()

template<class Impl >
void DefaultRename< Impl >::setCommitStage ( Commit commit_stage)
inline

Sets pointer to commit stage.

Used only for initialization.

Definition at line 153 of file rename.hh.

References DefaultRename< Impl >::commit_ptr.

◆ setDecodeQueue()

template<class Impl >
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().

◆ setFreeList()

template<class Impl >
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.

◆ setIEWStage()

template<class Impl >
void DefaultRename< Impl >::setIEWStage ( IEW iew_stage)
inline

Sets pointer to IEW stage.

Used only for initialization.

Definition at line 149 of file rename.hh.

References DefaultRename< Impl >::iew_ptr.

◆ setRenameMap()

template<class Impl >
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.

◆ setRenameQueue()

template<class Impl >
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.

◆ setScoreboard()

template<class Impl >
void DefaultRename< Impl >::setScoreboard ( Scoreboard _scoreboard)

Sets pointer to the scoreboard.

Definition at line 297 of file rename_impl.hh.

References DefaultRename< Impl >::scoreboard.

◆ setTimeBuffer()

template<class Impl >
void DefaultRename< Impl >::setTimeBuffer ( TimeBuffer< TimeStruct > *  tb_ptr)

◆ skidInsert()

template<class Impl >
void DefaultRename< Impl >::skidInsert ( ThreadID  tid)
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().

◆ skidsEmpty()

template<class Impl >
bool DefaultRename< Impl >::skidsEmpty
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.

◆ sortInsts()

template<class Impl >
void DefaultRename< Impl >::sortInsts
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().

◆ squash()

template<class Impl >
void DefaultRename< Impl >::squash ( const InstSeqNum squash_seq_num,
ThreadID  tid 
)

◆ startupStage()

template<class Impl >
void DefaultRename< Impl >::startupStage

Initializes variables for the stage.

Definition at line 215 of file rename_impl.hh.

References DefaultRename< Impl >::resetStage().

◆ takeOverFrom()

template<class Impl >
void DefaultRename< Impl >::takeOverFrom

Takes over from another CPU's thread.

Definition at line 319 of file rename_impl.hh.

References DefaultRename< Impl >::resetStage().

◆ tick()

template<class Impl >
void DefaultRename< Impl >::tick

◆ unblock()

template<class Impl >
bool DefaultRename< Impl >::unblock ( ThreadID  tid)
private

Switches rename to unblocking if the skid buffer is empty, and signals back that rename has unblocked.

Returns
Returns true if there is a status change.

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().

◆ updateStatus()

template<class Impl >
void DefaultRename< Impl >::updateStatus
private

◆ validInsts()

template<class Impl >
unsigned DefaultRename< Impl >::validInsts
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().

Member Data Documentation

◆ _status

template<class Impl >
RenameStatus DefaultRename< Impl >::_status
private

Rename status.

Definition at line 114 of file rename.hh.

Referenced by DefaultRename< Impl >::resetStage(), and DefaultRename< Impl >::updateStatus().

◆ activeThreads

template<class Impl >
std::list<ThreadID>* DefaultRename< Impl >::activeThreads
private

◆ blockThisCycle

template<class Impl >
bool DefaultRename< Impl >::blockThisCycle
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().

◆ commit_ptr

template<class Impl >
Commit* DefaultRename< Impl >::commit_ptr
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().

◆ commitToRenameDelay

template<class Impl >
unsigned DefaultRename< Impl >::commitToRenameDelay
private

Delay between commit and rename, in ticks.

Definition at line 433 of file rename.hh.

Referenced by DefaultRename< Impl >::setTimeBuffer().

◆ commitWidth

template<class Impl >
unsigned DefaultRename< Impl >::commitWidth
private

Commit width, in instructions.

Used so rename knows how many instructions might have freed registers in the previous cycle.

Definition at line 441 of file rename.hh.

◆ cpu

template<class Impl >
O3CPU* DefaultRename< Impl >::cpu
private

◆ decodeQueue

template<class Impl >
TimeBuffer<DecodeStruct>* DefaultRename< Impl >::decodeQueue
private

Decode instruction queue interface.

Definition at line 345 of file rename.hh.

Referenced by DefaultRename< Impl >::setDecodeQueue().

◆ decodeToRenameDelay

template<class Impl >
int DefaultRename< Impl >::decodeToRenameDelay
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().

◆ emptyROB

template<class Impl >
bool DefaultRename< Impl >::emptyROB[Impl::MaxThreads]
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().

◆ freeEntries

template<class Impl >
FreeEntries DefaultRename< Impl >::freeEntries[Impl::MaxThreads]
private

◆ freeList

template<class Impl >
FreeList* DefaultRename< Impl >::freeList
private

◆ fromCommit

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultRename< Impl >::fromCommit
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().

◆ fromDecode

template<class Impl >
TimeBuffer<DecodeStruct>::wire DefaultRename< Impl >::fromDecode
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().

◆ fromIEW

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultRename< Impl >::fromIEW
private

◆ historyBuffer

template<class Impl >
std::list<RenameHistory> DefaultRename< Impl >::historyBuffer[Impl::MaxThreads]
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().

◆ iew_ptr

template<class Impl >
IEW* DefaultRename< Impl >::iew_ptr
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().

◆ iewToRenameDelay

template<class Impl >
int DefaultRename< Impl >::iewToRenameDelay
private

Delay between iew and rename, in ticks.

Definition at line 427 of file rename.hh.

Referenced by DefaultRename< Impl >::setTimeBuffer().

◆ insts

template<class Impl >
InstQueue DefaultRename< Impl >::insts[Impl::MaxThreads]
private

◆ instsInProgress

template<class Impl >
int DefaultRename< Impl >::instsInProgress[Impl::MaxThreads]
private

◆ loadsInProgress

template<class Impl >
int DefaultRename< Impl >::loadsInProgress[Impl::MaxThreads]
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().

◆ numThreads

template<class Impl >
ThreadID DefaultRename< Impl >::numThreads
private

◆ ppRename

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultRename< Impl >::ppRename
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().

◆ ppSquashInRename

template<class Impl >
ProbePointArg<SeqNumRegPair>* DefaultRename< Impl >::ppSquashInRename
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().

◆ renameMap

template<class Impl >
RenameMap* DefaultRename< Impl >::renameMap[Impl::MaxThreads]
private

◆ renameQueue

template<class Impl >
TimeBuffer<RenameStruct>* DefaultRename< Impl >::renameQueue
private

Rename instruction queue.

Definition at line 339 of file rename.hh.

Referenced by DefaultRename< Impl >::setRenameQueue().

◆ renameStatus

template<class Impl >
ThreadStatus DefaultRename< Impl >::renameStatus[Impl::MaxThreads]
private

◆ renameWidth

template<class Impl >
unsigned DefaultRename< Impl >::renameWidth
private

Rename width, in instructions.

Definition at line 436 of file rename.hh.

Referenced by DefaultRename< Impl >::DefaultRename(), and DefaultRename< Impl >::renameInsts().

◆ resumeSerialize

template<class Impl >
bool DefaultRename< Impl >::resumeSerialize
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().

◆ resumeUnblocking

template<class Impl >
bool DefaultRename< Impl >::resumeUnblocking
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().

◆ scoreboard

template<class Impl >
Scoreboard* DefaultRename< Impl >::scoreboard
private

◆ serializeInst

template<class Impl >
DynInstPtr DefaultRename< Impl >::serializeInst[Impl::MaxThreads]
private

◆ serializeOnNextInst

template<class Impl >
bool DefaultRename< Impl >::serializeOnNextInst[Impl::MaxThreads]
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().

◆ skidBuffer

template<class Impl >
InstQueue DefaultRename< Impl >::skidBuffer[Impl::MaxThreads]
private

◆ skidBufferMax

template<class Impl >
unsigned DefaultRename< Impl >::skidBufferMax
private

The maximum skid buffer size.

Definition at line 463 of file rename.hh.

Referenced by DefaultRename< Impl >::DefaultRename(), and DefaultRename< Impl >::skidInsert().

◆ stalls

template<class Impl >
Stalls DefaultRename< Impl >::stalls[Impl::MaxThreads]
private

◆ stats

template<class Impl >
DefaultRename::RenameStats DefaultRename< Impl >::stats
private

◆ storesInProgress

template<class Impl >
int DefaultRename< Impl >::storesInProgress[Impl::MaxThreads]
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().

◆ timeBuffer

template<class Impl >
TimeBuffer<TimeStruct>* DefaultRename< Impl >::timeBuffer
private

Pointer to main time buffer used for backwards communication.

Definition at line 327 of file rename.hh.

Referenced by DefaultRename< Impl >::setTimeBuffer().

◆ toDecode

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultRename< Impl >::toDecode
private

◆ toIEW

template<class Impl >
TimeBuffer<RenameStruct>::wire DefaultRename< Impl >::toIEW
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().

◆ toIEWIndex

template<class Impl >
unsigned DefaultRename< Impl >::toIEWIndex
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().

◆ wroteToTimeBuffer

template<class Impl >
bool DefaultRename< Impl >::wroteToTimeBuffer
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().


The documentation for this class was generated from the following files:

Generated on Wed Sep 30 2020 14:02:23 for gem5 by doxygen 1.8.17