Go to the documentation of this file.
41 #ifndef __CPU_O3_ROB_HH__
42 #define __CPU_O3_ROB_HH__
48 #include "arch/registers.hh"
50 #include "config/the_isa.hh"
51 #include "enums/SMTQueuePolicy.hh"
53 struct DerivO3CPUParams;
63 typedef typename Impl::O3CPU
O3CPU;
88 ROB(
O3CPU *_cpu, DerivO3CPUParams *params);
90 std::string
name()
const;
334 #endif //__CPU_O3_ROB_HH__
InstIt squashIt[Impl::MaxThreads]
Iterator used for walking through the list of instructions when squashing.
void resetEntries()
Re-adjust ROB partitioning.
InstIt head
Iterator pointing to the instruction which is the first instruction in in the ROB.
std::list< ThreadID > * activeThreads
Active Threads in CPU.
bool isDoneSquashing(ThreadID tid) const
Reads the PC of the oldest head instruction.
Status
Possible ROB statuses.
int16_t ThreadID
Thread index/ID type.
DynInstPtr findInst(ThreadID tid, InstSeqNum squash_inst)
Returns a pointer to the instruction with the given sequence if it is in the ROB.
void squash(InstSeqNum squash_num, ThreadID tid)
Squashes all instructions younger than the given sequence number for the specific thread.
void updateHead()
Updates the head instruction with the new oldest instruction.
DynInstPtr readTailInst(ThreadID tid)
Returns pointer to the tail instruction within the ROB.
unsigned getMaxEntries(ThreadID tid)
Returns the maximum number of entries for a specific thread.
const DynInstPtr & readHeadInst(ThreadID tid)
Returns pointer to the head instruction within the ROB.
void updateTail()
Updates the tail instruction with the new youngest instruction.
unsigned maxEntries[Impl::MaxThreads]
Max Insts a Thread Can Have in the ROB.
DynInstPtr dummyInst
Dummy instruction returned if there are no insts left.
ThreadID numThreads
Number of active threads.
std::list< DynInstPtr > instList[Impl::MaxThreads]
ROB List of Instructions.
ROB(O3CPU *_cpu, DerivO3CPUParams *params)
ROB constructor.
This is a simple scalar statistic, like a counter.
int entryAmount(ThreadID num_threads)
Number of entries needed For 'num_threads' amount of threads.
int numInstsInROB
Number of instructions in the ROB.
std::pair< RegIndex, PhysRegIndex > UnmapInfo
void takeOverFrom()
Takes over another CPU's thread.
void drainSanityCheck() const
Perform sanity checks after a drain.
bool canCommit()
Is there any commitable head instruction across all threads ready.
void doSquash(ThreadID tid)
Executes the squash, marking squashed instructions.
bool isEmpty(ThreadID tid) const
Returns if a specific thread's partition is empty.
ROBStats(Stats::Group *parent)
InstIt tail
Iterator pointing to the instruction which is the last instruction in the ROB.
unsigned getThreadEntries(ThreadID tid)
Returns the number of entries being used by a specific thread.
bool isHeadReady(ThreadID tid)
Is the oldest instruction across all threads ready.
void resetState()
Reset the ROB state.
InstSeqNum squashedSeqNum[Impl::MaxThreads]
The sequence number of the squashed instruction.
O3CPU * cpu
Pointer to the CPU.
Impl::DynInstPtr DynInstPtr
bool doneSquashing[Impl::MaxThreads]
Is the ROB done squashing.
std::list< DynInstPtr >::iterator InstIt
unsigned squashWidth
Number of instructions that can be squashed in a single cycle.
Status robStatus[Impl::MaxThreads]
Per-thread ROB status.
unsigned threadEntries[Impl::MaxThreads]
Entries Per Thread.
void retireHead(ThreadID tid)
Retires the head instruction, removing it from the ROB.
bool isDoneSquashing()
Checks if the ROB is still in the process of squashing instructions for any thread.
unsigned numEntries
Number of instructions in the ROB.
bool isFull(ThreadID tid)
Returns if a specific thread's partition is full.
int countInsts()
This is more of a debugging function than anything.
bool isEmpty() const
Returns if the ROB is empty.
unsigned numFreeEntries()
Returns the number of total free entries in the ROB.
SMTQueuePolicy robPolicy
ROB resource sharing policy for SMT mode.
bool isFull()
Returns if the ROB is full.
void insertInst(const DynInstPtr &inst)
Function to insert an instruction into the ROB.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to the list of active threads.
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17