46 #ifndef __CPU_MINOR_DYN_INST_HH__ 47 #define __CPU_MINOR_DYN_INST_HH__ 111 threadId(thread_id), streamSeqNum(stream_seq_num),
112 predictionSeqNum(prediction_seq_num), lineSeqNum(line_seq_num),
113 fetchSeqNum(fetch_seq_num), execSeqNum(exec_seq_num)
124 bool ret = (threadId == rhs.
threadId &&
230 RegId flatDestRegIdx[TheISA::MaxInstDestRegs];
234 staticInst(NULL), id(id_), traceData(NULL),
236 triedToPredict(false), predictedTaken(false),
237 fuIndex(0), inLSQ(false), translationFault(
NoFault),
238 inStoreBuffer(false), canEarlyIssue(false), predicate(true),
239 memAccPredicate(true), instToWaitFor(0), extraCommitDelay(
Cycles(0)),
240 extraCommitDelayExpr(NULL), minimumCommitCycle(
Cycles(0))
245 bool isBubble()
const {
return id.fetchSeqNum == 0; }
248 static MinorDynInstPtr
bubble() {
return bubbleInst; }
254 bool isInst()
const {
return !isBubble() && !isFault(); }
261 bool isNoCostInst()
const;
265 bool isLastOpInInst()
const;
272 void minorTraceInst(
const Named &named_object)
const;
275 void reportData(std::ostream &os)
const;
std::ostream & operator<<(std::ostream &os, const InstId &id)
Print this id in the usual slash-separated format expected by MinorTrace.
bool isMemRef() const
Is this a real mem ref instruction.
decltype(nullptr) constexpr NoFault
Cycles is a wrapper class for representing cycle counts, i.e.
bool predicate
Flag controlling conditional execution of the instruction.
bool triedToPredict
Tried to predict the destination of this inst (if a control instruction or a sys call) ...
static const InstSeqNum firstPredictionSeqNum
bool canEarlyIssue
Can this instruction be executed out of order.
Fault fault
This is actually a fault masquerading as an instruction.
Cycles minimumCommitCycle
Once issued, extraCommitDelay becomes minimumCommitCycle to account for delay in absolute time...
RefCountingPtr< MinorDynInst > MinorDynInstPtr
MinorDynInsts are currently reference counted.
unsigned int fuIndex
Fields only set during execution.
Id for lines and instructions.
Minor contains all the definitions within the MinorCPU apart from the CPU class itself.
MinorDynInst(InstId id_=InstId(), Fault fault_=NoFault)
Fault translationFault
Translation fault in case of a mem ref.
bool predictedTaken
This instruction was predicted to change control flow and the following instructions will have a newe...
bool isFault() const
Is this a fault rather than instruction.
InstSeqNum execSeqNum
'Execute' sequence number.
InstSeqNum predictionSeqNum
The predicted qualifier to stream, attached by Fetch2 as a consequence of branch prediction.
InstSeqNum fetchSeqNum
Fetch sequence number.
TimingExpr * extraCommitDelayExpr
bool readPredicate() const
static const InstSeqNum firstExecSeqNum
Cycles extraCommitDelay
Extra delay at the end of the pipeline.
Classes for managing reference counted objects.
static const InstSeqNum firstFetchSeqNum
TheISA::PCState predictedTarget
Predicted branch target.
InstSeqNum instToWaitFor
execSeqNum of the latest inst on which this inst depends.
bool readMemAccPredicate() const
bool memAccPredicate
Flag controlling conditional execution of the memory access associated with the instruction (only mea...
Derive from RefCounted if you want to enable reference counting of this class.
static MinorDynInstPtr bubbleInst
A prototypical bubble instruction.
Classes for buffer, queue and FIFO behaviour.
InstId(ThreadID thread_id=0, InstSeqNum stream_seq_num=0, InstSeqNum prediction_seq_num=0, InstSeqNum line_seq_num=0, InstSeqNum fetch_seq_num=0, InstSeqNum exec_seq_num=0)
Very boring default constructor.
InstSeqNum streamSeqNum
The 'stream' this instruction belongs to.
int16_t ThreadID
Thread index/ID type.
Dynamic instruction for Minor.
TheISA::PCState pc
The fetch address of this instruction.
bool inStoreBuffer
The instruction has been sent to the store buffer.
bool inLSQ
This instruction is in the LSQ, not a functional unit.
bool isInst() const
Is this a real instruction.
static MinorDynInstPtr bubble()
There is a single bubble inst.
bool operator==(const InstId &rhs)
InstSeqNum lineSeqNum
Line sequence number.
void setPredicate(bool val)
Register ID: describe an architectural register with its class and index.
static const InstSeqNum firstLineSeqNum
void setMemAccPredicate(bool val)
GenericISA::DelaySlotPCState< MachInst > PCState
bool isBubble() const
The BubbleIF interface.
std::shared_ptr< FaultBase > Fault
ThreadID threadId
The thread to which this line/instruction belongs.
const FlagsType init
This Stat is Initialized.
Trace::InstRecord * traceData
Trace information for this instruction's execution.
static const InstSeqNum firstStreamSeqNum
First sequence numbers to use in initialisation of the pipeline and to be expected on the first line/...