44 #ifndef __CPU_O3_ROB_HH__
45 #define __CPU_O3_ROB_HH__
51 #include "arch/registers.hh"
53 #include "config/the_isa.hh"
55 struct DerivO3CPUParams;
67 typedef typename Impl::O3CPU
O3CPU;
99 ROB(
O3CPU *_cpu, DerivO3CPUParams *params);
101 std::string
name()
const;
343 #endif //__CPU_O3_ROB_HH__
void takeOverFrom()
Takes over another CPU's thread.
std::list< ThreadID > * activeThreads
Active Threads in CPU.
bool canCommit()
Is there any commitable head instruction across all threads ready.
bool isFull()
Returns if the ROB is full.
unsigned threadEntries[Impl::MaxThreads]
Entries Per Thread.
void doSquash(ThreadID tid)
Executes the squash, marking squashed instructions.
ROBPolicy
SMT ROB Sharing Policy.
void retireHead(ThreadID tid)
Retires the head instruction, removing it from the ROB.
bool isDoneSquashing(ThreadID tid) const
Reads the PC of the oldest head instruction.
void resetState()
Reset the ROB state.
bool isEmpty(ThreadID tid) const
Returns if a specific thread's partition is empty.
int numInstsInROB
Number of instructions in the ROB.
void insertInst(DynInstPtr &inst)
Function to insert an instruction into the ROB.
InstIt head
Iterator pointing to the instruction which is the first instruction in in the ROB.
Status robStatus[Impl::MaxThreads]
Per-thread ROB status.
bool isEmpty() const
Returns if the ROB is empty.
Status
Possible ROB statuses.
ROB(O3CPU *_cpu, DerivO3CPUParams *params)
ROB constructor.
bool isDoneSquashing()
Checks if the ROB is still in the process of squashing instructions for any thread.
ThreadID numThreads
Number of active threads.
DynInstPtr findInst(ThreadID tid, InstSeqNum squash_inst)
Returns a pointer to the instruction with the given sequence if it is in the ROB. ...
InstIt tail
Iterator pointing to the instruction which is the last instruction in the ROB.
void updateHead()
Updates the head instruction with the new oldest instruction.
InstSeqNum squashedSeqNum[Impl::MaxThreads]
The sequence number of the squashed instruction.
This is a simple scalar statistic, like a counter.
DynInstPtr readTailInst(ThreadID tid)
Returns pointer to the tail instruction within the ROB.
Impl::DynInstPtr DynInstPtr
std::pair< RegIndex, PhysRegIndex > UnmapInfo
std::list< DynInstPtr >::iterator InstIt
TheISA::RegIndex RegIndex
unsigned numFreeEntries()
Returns the number of total free entries in the ROB.
ROBPolicy robPolicy
ROB resource sharing policy for SMT mode.
std::list< DynInstPtr > instList[Impl::MaxThreads]
ROB List of Instructions.
unsigned getThreadEntries(ThreadID tid)
Returns the number of entries being used by a specific thread.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to the list of active threads.
void drainSanityCheck() const
Perform sanity checks after a drain.
InstIt squashIt[Impl::MaxThreads]
Iterator used for walking through the list of instructions when squashing.
void updateTail()
Updates the tail instruction with the new youngest instruction.
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,16,32,64}_t.
void squash(InstSeqNum squash_num, ThreadID tid)
Squashes all instructions younger than the given sequence number for the specific thread...
int16_t ThreadID
Thread index/ID type.
void regStats()
Registers statistics.
O3CPU * cpu
Pointer to the CPU.
void resetEntries()
Re-adjust ROB partitioning.
bool isHeadReady(ThreadID tid)
Is the oldest instruction across all threads ready.
bool doneSquashing[Impl::MaxThreads]
Is the ROB done squashing.
int countInsts()
This is more of a debugging function than anything.
unsigned getMaxEntries(ThreadID tid)
Returns the maximum number of entries for a specific thread.
unsigned squashWidth
Number of instructions that can be squashed in a single cycle.
DynInstPtr readHeadInst(ThreadID tid)
Returns pointer to the head instruction within the ROB.
DynInstPtr dummyInst
Dummy instruction returned if there are no insts left.
bool isFull(ThreadID tid)
Returns if a specific thread's partition is full.
unsigned numEntries
Number of instructions in the ROB.
int entryAmount(ThreadID num_threads)
Number of entries needed For 'num_threads' amount of threads.
unsigned maxEntries[Impl::MaxThreads]
Max Insts a Thread Can Have in the ROB.