gem5
|
Dynamic instruction for Minor. More...
#include <dyn_inst.hh>
Public Member Functions | |
MinorDynInst (InstId id_=InstId(), Fault fault_=NoFault) | |
bool | isBubble () const |
The BubbleIF interface. More... | |
bool | isFault () const |
Is this a fault rather than instruction. More... | |
bool | isInst () const |
Is this a real instruction. More... | |
bool | isMemRef () const |
Is this a real mem ref instruction. More... | |
bool | isNoCostInst () const |
Is this an instruction that can be executed `for free' and needn't spend time in an FU. More... | |
bool | isLastOpInInst () const |
Assuming this is not a fault, is this instruction either a whole instruction or the last microop from a macroop. More... | |
void | minorTraceInst (const Named &named_object) const |
Print (possibly verbose) instruction information for MinorTrace using the given Named object's name. More... | |
void | reportData (std::ostream &os) const |
ReportIF interface. More... | |
~MinorDynInst () | |
Public Member Functions inherited from RefCounted | |
RefCounted () | |
We initialize the reference count to zero and the first object to take ownership of it must increment it to one. More... | |
virtual | ~RefCounted () |
We make the destructor virtual because we're likely to have virtual functions on reference counted objects. More... | |
void | incref () |
Increment the reference count. More... | |
void | decref () |
Decrement the reference count and destroy the object if all references are gone. More... | |
Static Public Member Functions | |
static MinorDynInstPtr | bubble () |
There is a single bubble inst. More... | |
static void | init () |
Initialise the class. More... | |
Public Attributes | |
StaticInstPtr | staticInst |
InstId | id |
Trace::InstRecord * | traceData |
Trace information for this instruction's execution. More... | |
TheISA::PCState | pc |
The fetch address of this instruction. More... | |
Fault | fault |
This is actually a fault masquerading as an instruction. More... | |
bool | triedToPredict |
Tried to predict the destination of this inst (if a control instruction or a sys call) More... | |
bool | predictedTaken |
This instruction was predicted to change control flow and the following instructions will have a newer predictionSeqNum. More... | |
TheISA::PCState | predictedTarget |
Predicted branch target. More... | |
unsigned int | fuIndex |
Fields only set during execution. More... | |
bool | inLSQ |
This instruction is in the LSQ, not a functional unit. More... | |
bool | inStoreBuffer |
The instruction has been sent to the store buffer. More... | |
bool | canEarlyIssue |
Can this instruction be executed out of order. More... | |
InstSeqNum | instToWaitFor |
execSeqNum of the latest inst on which this inst depends. More... | |
Cycles | extraCommitDelay |
Extra delay at the end of the pipeline. More... | |
TimingExpr * | extraCommitDelayExpr |
Cycles | minimumCommitCycle |
Once issued, extraCommitDelay becomes minimumCommitCycle to account for delay in absolute time. More... | |
TheISA::RegIndex | flatDestRegIdx [TheISA::MaxInstDestRegs] |
Flat register indices so that, when clearing the scoreboard, we have the same register indices as when the instruction was marked up. More... | |
Addr | ea |
Effective address as set by ExecContext::setEA. More... | |
Static Private Attributes | |
static MinorDynInstPtr | bubbleInst = NULL |
A prototypical bubble instruction. More... | |
Dynamic instruction for Minor.
MinorDynInst implements the BubbleIF interface Has two separate notions of sequence number for pre/post-micro-op decomposition: fetchSeqNum and execSeqNum
Definition at line 157 of file dyn_inst.hh.
Definition at line 228 of file dyn_inst.hh.
Referenced by init().
Minor::MinorDynInst::~MinorDynInst | ( | ) |
Definition at line 228 of file dyn_inst.cc.
References traceData.
|
inlinestatic |
There is a single bubble inst.
Definition at line 244 of file dyn_inst.hh.
References bubbleInst.
Referenced by Minor::QueuedInst::bubble(), Minor::ForwardInstData::bubbleFill(), Minor::Execute::commit(), Minor::Execute::evaluate(), and Minor::Execute::takeInterrupt().
|
static |
Initialise the class.
Definition at line 81 of file dyn_inst.cc.
References bubbleInst, and MinorDynInst().
Referenced by MinorCPU::MinorCPU().
|
inline |
The BubbleIF interface.
Definition at line 241 of file dyn_inst.hh.
Referenced by isInst(), and reportData().
|
inline |
Is this a fault rather than instruction.
Definition at line 247 of file dyn_inst.hh.
References fault, and NoFault.
Referenced by isInst(), minorTraceInst(), Minor::operator<<(), and reportData().
|
inline |
Is this a real instruction.
Definition at line 250 of file dyn_inst.hh.
References isBubble(), and isFault().
Referenced by isMemRef(), and isNoCostInst().
bool Minor::MinorDynInst::isLastOpInInst | ( | ) | const |
Assuming this is not a fault, is this instruction either a whole instruction or the last microop from a macroop.
Definition at line 92 of file dyn_inst.cc.
References StaticInst::isLastMicroop(), StaticInst::isMicroop(), and staticInst.
|
inline |
Is this a real mem ref instruction.
Definition at line 253 of file dyn_inst.hh.
References isInst(), StaticInst::isMemRef(), and staticInst.
bool Minor::MinorDynInst::isNoCostInst | ( | ) | const |
Is this an instruction that can be executed `for free' and needn't spend time in an FU.
Definition at line 99 of file dyn_inst.cc.
References isInst(), StaticInst::opClass(), and staticInst.
void Minor::MinorDynInst::minorTraceInst | ( | const Named & | named_object | ) | const |
Print (possibly verbose) instruction information for MinorTrace using the given Named object's name.
Definition at line 171 of file dyn_inst.cc.
References StaticInst::destRegIdx(), StaticInst::disassemble(), fault, isFault(), StaticInst::isMacroop(), StaticInst::machInst, MINORINST, StaticInst::numDestRegs(), StaticInst::numSrcRegs(), StaticInst::opClass(), pc, predictedTaken, StaticInst::printFlags(), Minor::printRegName(), StaticInst::srcRegIdx(), and staticInst.
void Minor::MinorDynInst::reportData | ( | std::ostream & | os | ) | const |
ReportIF interface.
Definition at line 105 of file dyn_inst.cc.
References id, isBubble(), and isFault().
|
staticprivate |
A prototypical bubble instruction.
You must call MinorDynInst::init to initialise this
Definition at line 162 of file dyn_inst.hh.
bool Minor::MinorDynInst::canEarlyIssue |
Can this instruction be executed out of order.
In this model, this only happens with mem refs that need to be issued early to allow other instructions to fill the fetch delay
Definition at line 203 of file dyn_inst.hh.
Addr Minor::MinorDynInst::ea |
Effective address as set by ExecContext::setEA.
Definition at line 225 of file dyn_inst.hh.
Cycles Minor::MinorDynInst::extraCommitDelay |
Extra delay at the end of the pipeline.
Definition at line 212 of file dyn_inst.hh.
TimingExpr* Minor::MinorDynInst::extraCommitDelayExpr |
Definition at line 213 of file dyn_inst.hh.
Fault Minor::MinorDynInst::fault |
This is actually a fault masquerading as an instruction.
Definition at line 176 of file dyn_inst.hh.
Referenced by isFault(), minorTraceInst(), and Minor::operator<<().
TheISA::RegIndex Minor::MinorDynInst::flatDestRegIdx[TheISA::MaxInstDestRegs] |
Flat register indices so that, when clearing the scoreboard, we have the same register indices as when the instruction was marked up.
Definition at line 222 of file dyn_inst.hh.
unsigned int Minor::MinorDynInst::fuIndex |
Fields only set during execution.
FU this instruction is issued to
Definition at line 192 of file dyn_inst.hh.
InstId Minor::MinorDynInst::id |
Definition at line 167 of file dyn_inst.hh.
Referenced by Minor::operator<<(), and reportData().
bool Minor::MinorDynInst::inLSQ |
This instruction is in the LSQ, not a functional unit.
Definition at line 195 of file dyn_inst.hh.
bool Minor::MinorDynInst::inStoreBuffer |
The instruction has been sent to the store buffer.
Definition at line 198 of file dyn_inst.hh.
InstSeqNum Minor::MinorDynInst::instToWaitFor |
execSeqNum of the latest inst on which this inst depends.
This can be used as a sanity check for dependency ordering where slightly out of order execution is required (notably initiateAcc for memory ops)
Definition at line 209 of file dyn_inst.hh.
Cycles Minor::MinorDynInst::minimumCommitCycle |
Once issued, extraCommitDelay becomes minimumCommitCycle to account for delay in absolute time.
Definition at line 217 of file dyn_inst.hh.
TheISA::PCState Minor::MinorDynInst::pc |
The fetch address of this instruction.
Definition at line 173 of file dyn_inst.hh.
Referenced by minorTraceInst(), and Minor::operator<<().
bool Minor::MinorDynInst::predictedTaken |
This instruction was predicted to change control flow and the following instructions will have a newer predictionSeqNum.
Definition at line 184 of file dyn_inst.hh.
Referenced by minorTraceInst().
TheISA::PCState Minor::MinorDynInst::predictedTarget |
Predicted branch target.
Definition at line 187 of file dyn_inst.hh.
StaticInstPtr Minor::MinorDynInst::staticInst |
Definition at line 165 of file dyn_inst.hh.
Referenced by isLastOpInInst(), isMemRef(), isNoCostInst(), minorTraceInst(), and Minor::operator<<().
Trace::InstRecord* Minor::MinorDynInst::traceData |
Trace information for this instruction's execution.
Definition at line 170 of file dyn_inst.hh.
Referenced by ~MinorDynInst().
bool Minor::MinorDynInst::triedToPredict |
Tried to predict the destination of this inst (if a control instruction or a sys call)
Definition at line 180 of file dyn_inst.hh.