gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  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 TheISA::RegIndex RegIndex
 
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 regStats ()
 Registers statistics. 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 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,
short int > 
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 (DynInstPtr &inst, ThreadID tid)
 Renames the source registers of an instruction. More...
 
void renameDestRegs (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...
 
PhysRegIndex maxPhysicalRegs
 
Stats::Scalar renameSquashCycles
 Stat for total number of cycles spent squashing. More...
 
Stats::Scalar renameIdleCycles
 Stat for total number of cycles spent idle. More...
 
Stats::Scalar renameBlockCycles
 Stat for total number of cycles spent blocking. More...
 
Stats::Scalar renameSerializeStallCycles
 Stat for total number of cycles spent stalling for a serializing inst. More...
 
Stats::Scalar renameRunCycles
 Stat for total number of cycles spent running normally. More...
 
Stats::Scalar renameUnblockCycles
 Stat for total number of cycles spent unblocking. More...
 
Stats::Scalar renameRenamedInsts
 Stat for total number of renamed instructions. More...
 
Stats::Scalar renameSquashedInsts
 Stat for total number of squashed instructions that rename discards. More...
 
Stats::Scalar renameROBFullEvents
 Stat for total number of times that the ROB starts a stall in rename. More...
 
Stats::Scalar renameIQFullEvents
 Stat for total number of times that the IQ starts a stall in rename. More...
 
Stats::Scalar renameLQFullEvents
 Stat for total number of times that the LQ starts a stall in rename. More...
 
Stats::Scalar renameSQFullEvents
 Stat for total number of times that the SQ starts a stall in rename. More...
 
Stats::Scalar renameFullRegistersEvents
 Stat for total number of times that rename runs out of free registers to use to rename. More...
 
Stats::Scalar renameRenamedOperands
 Stat for total number of renamed destination registers. More...
 
Stats::Scalar renameRenameLookups
 Stat for total number of source register rename lookups. More...
 
Stats::Scalar intRenameLookups
 
Stats::Scalar fpRenameLookups
 
Stats::Scalar renameCommittedMaps
 Stat for total number of committed renaming mappings. More...
 
Stats::Scalar renameUndoneMaps
 Stat for total number of mappings that were undone due to a squash. More...
 
Stats::Scalar renamedSerializing
 Number of serialize instructions handled. More...
 
Stats::Scalar renamedTempSerializing
 Number of instructions marked as temporarily serializing. More...
 
Stats::Scalar renameSkidInsts
 Number of instructions inserted into skid buffers. More...
 

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 70 of file rename.hh.

Member Typedef Documentation

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

Definition at line 86 of file rename.hh.

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

Definition at line 74 of file rename.hh.

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

Definition at line 79 of file rename.hh.

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

Definition at line 75 of file rename.hh.

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

Definition at line 82 of file rename.hh.

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

Definition at line 85 of file rename.hh.

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

Definition at line 95 of file rename.hh.

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

Definition at line 76 of file rename.hh.

template<class Impl >
typedef TheISA::RegIndex DefaultRename< Impl >::RegIndex

Definition at line 89 of file rename.hh.

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

Definition at line 83 of file rename.hh.

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

Definition at line 80 of file rename.hh.

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

Probe points.

Definition at line 125 of file rename.hh.

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

Definition at line 81 of file rename.hh.

Member Enumeration Documentation

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 473 of file rename.hh.

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 101 of file rename.hh.

template<class Impl >
enum DefaultRename::ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
StartSquash 
Squashing 
Blocked 
Unblocking 
SerializeStall 

Definition at line 107 of file rename.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Switches rename to blocking, and signals back that rename has become blocked.

Returns
Returns true if there is a status change.

Definition at line 854 of file rename_impl.hh.

References DPRINTF.

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

Calculates the number of free IQ entries for a specific thread.

Definition at line 1162 of file rename_impl.hh.

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

Calculates the number of free LQ entries for a specific thread.

Definition at line 1174 of file rename_impl.hh.

References DPRINTF.

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

Calculates the number of free ROB entries for a specific thread.

Definition at line 1150 of file rename_impl.hh.

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

Calculates the number of free SQ entries for a specific thread.

Definition at line 1186 of file rename_impl.hh.

References DPRINTF.

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

Checks the signals and updates the status.

Definition at line 1288 of file rename_impl.hh.

References DPRINTF, and Running.

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

Checks if any stages are telling rename to block.

Definition at line 1226 of file rename_impl.hh.

References DPRINTF.

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

Executes actual squash, removing squashed instructions.

Definition at line 909 of file rename_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultRename< Impl >::drainSanityCheck ( ) const

Perform sanity checks after a drain.

Definition at line 323 of file rename_impl.hh.

template<class Impl >
void DefaultRename< Impl >::dumpHistory ( )

Debugging function used to dump history buffer of renamings.

Definition at line 1425 of file rename_impl.hh.

References cprintf().

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

Function used to increment the stat that corresponds to the source of the stall.

Definition at line 1402 of file rename_impl.hh.

References panic.

template<class Impl >
bool DefaultRename< Impl >::isDrained ( ) const

Has the stage drained?

Definition at line 301 of file rename_impl.hh.

References Running.

template<class Impl >
std::string DefaultRename< Impl >::name ( ) const

Returns the name of rename.

Definition at line 85 of file rename_impl.hh.

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

Gets the number of free entries for a specific thread.

Definition at line 1258 of file rename_impl.hh.

References DPRINTF.

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

Reads signals telling rename to block/unblock.

Definition at line 1212 of file rename_impl.hh.

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

Registers probes.

Definition at line 189 of file rename_impl.hh.

template<class Impl >
void DefaultRename< Impl >::regStats ( )

Registers statistics.

Definition at line 92 of file rename_impl.hh.

References name(), and Stats::total.

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

Removes a committed instruction's rename history.

Definition at line 958 of file rename_impl.hh.

References DPRINTF, and X86ISA::size().

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

Determines what to do based on rename's current status.

Parameters
status_changerename() sets this variable if there was a status change (ie switching from blocking to unblocking).
tidThread id to rename instructions from.

Definition at line 450 of file rename_impl.hh.

References DPRINTF, and Running.

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

Renames instructions for the given thread.

Also handles serializing instructions.

Definition at line 504 of file rename_impl.hh.

References DPRINTF, and Running.

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

Reset this pipeline stage.

Definition at line 241 of file rename_impl.hh.

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 1388 of file rename_impl.hh.

template<class Impl >
void DefaultRename< Impl >::setActiveThreads ( std::list< ThreadID > *  at_ptr)

Sets pointer to list of active threads.

Definition at line 271 of file rename_impl.hh.

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

Sets pointer to commit stage.

Used only for initialization.

Definition at line 161 of file rename.hh.

References DefaultRename< Impl >::commit_ptr.

template<class Impl >
void DefaultRename< Impl >::setDecodeQueue ( TimeBuffer< DecodeStruct > *  dq_ptr)

Sets pointer to time buffer coming from decode.

Definition at line 224 of file rename_impl.hh.

References TimeBuffer< T >::getWire().

template<class Impl >
void DefaultRename< Impl >::setFreeList ( FreeList fl_ptr)

Sets pointer to the free list.

Definition at line 287 of file rename_impl.hh.

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

Sets pointer to IEW stage.

Used only for initialization.

Definition at line 157 of file rename.hh.

References DefaultRename< Impl >::iew_ptr.

template<class Impl >
void DefaultRename< Impl >::setRenameMap ( RenameMap  rm_ptr[Impl::MaxThreads])

Sets pointer to rename maps (per-thread structures).

Definition at line 279 of file rename_impl.hh.

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 214 of file rename_impl.hh.

References TimeBuffer< T >::getWire().

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

Sets pointer to the scoreboard.

Definition at line 294 of file rename_impl.hh.

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

Sets the main backwards communication time buffer pointer.

Definition at line 198 of file rename_impl.hh.

References TimeBuffer< T >::getWire().

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 747 of file rename_impl.hh.

References DPRINTF, panic, X86ISA::size(), and warn.

template<class Impl >
bool DefaultRename< Impl >::skidsEmpty ( )
private

Returns if all of the skid buffers are empty.

Definition at line 798 of file rename_impl.hh.

template<class Impl >
void DefaultRename< Impl >::sortInsts ( )
private

Separates instructions from decode into individual lists of instructions sorted by thread.

Definition at line 782 of file rename_impl.hh.

References curTick(), DTRACE, and ArmISA::i.

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

Squashes all instructions in a thread.

Definition at line 335 of file rename_impl.hh.

References DPRINTF, and ArmISA::i.

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

Initializes variables for the stage.

Definition at line 234 of file rename_impl.hh.

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

Takes over from another CPU's thread.

Definition at line 316 of file rename_impl.hh.

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

Ticks rename, which processes all input signals and attempts to rename as many instructions as possible.

Definition at line 386 of file rename_impl.hh.

References DPRINTF.

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 888 of file rename_impl.hh.

References DPRINTF, and Running.

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

Updates overall rename status based on all of the threads' statuses.

Definition at line 815 of file rename_impl.hh.

References DPRINTF.

template<class Impl >
unsigned DefaultRename< Impl >::validInsts ( )
private

Returns the number of valid instructions coming from decode.

Definition at line 1198 of file rename_impl.hh.

References ArmISA::i.

Member Data Documentation

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

Rename status.

Definition at line 119 of file rename.hh.

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

Pointer to the list of active threads.

Definition at line 366 of file rename.hh.

template<class Impl >
bool DefaultRename< Impl >::blockThisCycle
private

Whether or not rename needs to block this cycle.

Definition at line 452 of file rename.hh.

template<class Impl >
Commit* DefaultRename< Impl >::commit_ptr
private

Pointer to commit stage.

Used only for initialization.

Definition at line 169 of file rename.hh.

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

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

Delay between commit and rename, in ticks.

Definition at line 436 of file rename.hh.

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 444 of file rename.hh.

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

Pointer to CPU.

Definition at line 327 of file rename.hh.

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

Decode instruction queue interface.

Definition at line 348 of file rename.hh.

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

Delay between decode and rename, in ticks.

Definition at line 433 of file rename.hh.

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

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 410 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::fpRenameLookups
private

Definition at line 518 of file rename.hh.

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

Per-thread tracking of the number of free entries of back-end structures.

Definition at line 404 of file rename.hh.

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

Free list interface.

Definition at line 363 of file rename.hh.

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

Wire to get commit's output from backwards time buffer.

Definition at line 336 of file rename.hh.

template<class Impl >
TimeBuffer<DecodeStruct>::wire DefaultRename< Impl >::fromDecode
private

Wire to get decode's output from decode queue.

Definition at line 351 of file rename.hh.

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

Wire to get IEW's output from backwards time buffer.

Definition at line 333 of file rename.hh.

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 324 of file rename.hh.

template<class Impl >
IEW* DefaultRename< Impl >::iew_ptr
private

Pointer to IEW stage.

Used only for initialization.

Definition at line 166 of file rename.hh.

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

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

Delay between iew and rename, in ticks.

Definition at line 430 of file rename.hh.

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

Queue of all instructions coming from decode this cycle.

Definition at line 354 of file rename.hh.

template<class Impl >
int DefaultRename< Impl >::instsInProgress[Impl::MaxThreads]
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 374 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::intRenameLookups
private

Definition at line 517 of file rename.hh.

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 379 of file rename.hh.

template<class Impl >
PhysRegIndex DefaultRename< Impl >::maxPhysicalRegs
private

Definition at line 468 of file rename.hh.

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

The number of threads active in rename.

Definition at line 463 of file rename.hh.

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultRename< Impl >::ppRename
private

To probe when register renaming for an instruction is complete.

Definition at line 127 of file rename.hh.

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 132 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameBlockCycles
private

Stat for total number of cycles spent blocking.

Definition at line 491 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameCommittedMaps
private

Stat for total number of committed renaming mappings.

Definition at line 520 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renamedSerializing
private

Number of serialize instructions handled.

Definition at line 524 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renamedTempSerializing
private

Number of instructions marked as temporarily serializing.

Definition at line 526 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameFullRegistersEvents
private

Stat for total number of times that rename runs out of free registers to use to rename.

Definition at line 512 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameIdleCycles
private

Stat for total number of cycles spent idle.

Definition at line 489 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameIQFullEvents
private

Stat for total number of times that the IQ starts a stall in rename.

Definition at line 505 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameLQFullEvents
private

Stat for total number of times that the LQ starts a stall in rename.

Definition at line 507 of file rename.hh.

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

Rename map interface.

Definition at line 360 of file rename.hh.

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

Rename instruction queue.

Definition at line 342 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameRenamedInsts
private

Stat for total number of renamed instructions.

Definition at line 499 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameRenamedOperands
private

Stat for total number of renamed destination registers.

Definition at line 514 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameRenameLookups
private

Stat for total number of source register rename lookups.

Definition at line 516 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameROBFullEvents
private

Stat for total number of times that the ROB starts a stall in rename.

Definition at line 503 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameRunCycles
private

Stat for total number of cycles spent running normally.

Definition at line 495 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameSerializeStallCycles
private

Stat for total number of cycles spent stalling for a serializing inst.

Definition at line 493 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameSkidInsts
private

Number of instructions inserted into skid buffers.

Definition at line 528 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameSQFullEvents
private

Stat for total number of times that the SQ starts a stall in rename.

Definition at line 509 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameSquashCycles
private

Stat for total number of cycles spent squashing.

Definition at line 487 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameSquashedInsts
private

Stat for total number of squashed instructions that rename discards.

Definition at line 501 of file rename.hh.

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

Per-thread status.

Definition at line 122 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameUnblockCycles
private

Stat for total number of cycles spent unblocking.

Definition at line 497 of file rename.hh.

template<class Impl >
Stats::Scalar DefaultRename< Impl >::renameUndoneMaps
private

Stat for total number of mappings that were undone due to a squash.

Definition at line 522 of file rename.hh.

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

Rename width, in instructions.

Definition at line 439 of file rename.hh.

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

template<class Impl >
bool DefaultRename< Impl >::resumeSerialize
private

Whether or not rename needs to resume a serialize instruction after squashing.

Definition at line 456 of file rename.hh.

template<class Impl >
bool DefaultRename< Impl >::resumeUnblocking
private

Whether or not rename needs to resume clearing out the skidbuffer after squashing.

Definition at line 460 of file rename.hh.

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

Pointer to the scoreboard.

Definition at line 369 of file rename.hh.

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

The serialize instruction that rename has stalled on.

Definition at line 422 of file rename.hh.

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 427 of file rename.hh.

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

Skid buffer between rename and decode.

Definition at line 357 of file rename.hh.

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

The maximum skid buffer size.

Definition at line 466 of file rename.hh.

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

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

Tracks which stages are telling decode to stall.

Definition at line 419 of file rename.hh.

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 384 of file rename.hh.

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

Pointer to main time buffer used for backwards communication.

Definition at line 330 of file rename.hh.

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

Wire to write infromation heading to previous stages.

Definition at line 339 of file rename.hh.

template<class Impl >
TimeBuffer<RenameStruct>::wire DefaultRename< Impl >::toIEW
private

Wire to write any information heading to IEW.

Definition at line 345 of file rename.hh.

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 449 of file rename.hh.

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 389 of file rename.hh.


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

Generated on Fri Jun 9 2017 13:04:07 for gem5 by doxygen 1.8.6