gem5  v22.0.0.1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes | List of all members
gem5::minor::MinorDynInst Class Reference

Dynamic instruction for Minor. More...

#include <dyn_inst.hh>

Inheritance diagram for gem5::minor::MinorDynInst:
gem5::RefCounted

Public Member Functions

 MinorDynInst (StaticInstPtr si, 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 BaseISA::RegClasses &reg_classes) 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...
 
bool readPredicate () const
 
void setPredicate (bool val)
 
bool readMemAccPredicate () const
 
void setMemAccPredicate (bool val)
 
 ~MinorDynInst ()
 
- Public Member Functions inherited from gem5::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 () const
 Increment the reference count. More...
 
void decref () const
 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...
 

Public Attributes

const StaticInstPtr staticInst
 
InstId id
 
Trace::InstRecordtraceData = nullptr
 Trace information for this instruction's execution. More...
 
std::unique_ptr< PCStateBasepc
 The fetch address of this instruction. More...
 
Fault fault
 This is actually a fault masquerading as an instruction. More...
 
bool triedToPredict = false
 Tried to predict the destination of this inst (if a control instruction or a sys call) More...
 
bool predictedTaken = false
 This instruction was predicted to change control flow and the following instructions will have a newer predictionSeqNum. More...
 
std::unique_ptr< PCStateBasepredictedTarget
 Predicted branch target. More...
 
unsigned int fuIndex = 0
 Fields only set during execution. More...
 
bool inLSQ = false
 This instruction is in the LSQ, not a functional unit. More...
 
Fault translationFault
 Translation fault in case of a mem ref. More...
 
bool inStoreBuffer = false
 The instruction has been sent to the store buffer. More...
 
bool canEarlyIssue = false
 Can this instruction be executed out of order. More...
 
bool predicate = true
 Flag controlling conditional execution of the instruction. More...
 
bool memAccPredicate = true
 Flag controlling conditional execution of the memory access associated with the instruction (only meaningful for loads/stores) More...
 
InstSeqNum instToWaitFor = 0
 execSeqNum of the latest inst on which this inst depends. More...
 
Cycles extraCommitDelay {0}
 Extra delay at the end of the pipeline. More...
 
TimingExprextraCommitDelayExpr = nullptr
 
Cycles minimumCommitCycle {0}
 Once issued, extraCommitDelay becomes minimumCommitCycle to account for delay in absolute time. More...
 
std::vector< RegIdflatDestRegIdx
 Flat register indices so that, when clearing the scoreboard, we have the same register indices as when the instruction was marked up. More...
 

Static Private Attributes

static MinorDynInstPtr bubbleInst
 A prototypical bubble instruction. More...
 

Detailed Description

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 163 of file dyn_inst.hh.

Constructor & Destructor Documentation

◆ MinorDynInst()

gem5::minor::MinorDynInst::MinorDynInst ( StaticInstPtr  si,
InstId  id_ = InstId(),
Fault  fault_ = NoFault 
)
inline

Definition at line 241 of file dyn_inst.hh.

◆ ~MinorDynInst()

gem5::minor::MinorDynInst::~MinorDynInst ( )

Definition at line 229 of file dyn_inst.cc.

References traceData.

Member Function Documentation

◆ bubble()

static MinorDynInstPtr gem5::minor::MinorDynInst::bubble ( )
inlinestatic

◆ isBubble()

bool gem5::minor::MinorDynInst::isBubble ( ) const
inline

The BubbleIF interface.

Definition at line 248 of file dyn_inst.hh.

Referenced by isInst(), and reportData().

◆ isFault()

bool gem5::minor::MinorDynInst::isFault ( ) const
inline

Is this a fault rather than instruction.

Definition at line 254 of file dyn_inst.hh.

References fault, and gem5::NoFault.

Referenced by isInst(), minorTraceInst(), gem5::minor::operator<<(), and reportData().

◆ isInst()

bool gem5::minor::MinorDynInst::isInst ( ) const
inline

Is this a real instruction.

Definition at line 257 of file dyn_inst.hh.

References isBubble(), and isFault().

Referenced by isMemRef(), and isNoCostInst().

◆ isLastOpInInst()

bool gem5::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 89 of file dyn_inst.cc.

References gem5::StaticInst::isLastMicroop(), gem5::StaticInst::isMicroop(), and staticInst.

◆ isMemRef()

bool gem5::minor::MinorDynInst::isMemRef ( ) const
inline

Is this a real mem ref instruction.

Definition at line 260 of file dyn_inst.hh.

References isInst(), gem5::StaticInst::isMemRef(), and staticInst.

◆ isNoCostInst()

bool gem5::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 96 of file dyn_inst.cc.

References isInst(), gem5::StaticInst::opClass(), and staticInst.

◆ minorTraceInst()

void gem5::minor::MinorDynInst::minorTraceInst ( const Named named_object,
const BaseISA::RegClasses reg_classes 
) const

◆ readMemAccPredicate()

bool gem5::minor::MinorDynInst::readMemAccPredicate ( ) const
inline

Definition at line 282 of file dyn_inst.hh.

References memAccPredicate.

◆ readPredicate()

bool gem5::minor::MinorDynInst::readPredicate ( ) const
inline

Definition at line 278 of file dyn_inst.hh.

References predicate.

◆ reportData()

void gem5::minor::MinorDynInst::reportData ( std::ostream &  os) const

ReportIF interface.

Definition at line 102 of file dyn_inst.cc.

References id, isBubble(), isFault(), gem5::NoFault, gem5::X86ISA::os, and translationFault.

◆ setMemAccPredicate()

void gem5::minor::MinorDynInst::setMemAccPredicate ( bool  val)
inline

Definition at line 284 of file dyn_inst.hh.

References memAccPredicate, and gem5::X86ISA::val.

◆ setPredicate()

void gem5::minor::MinorDynInst::setPredicate ( bool  val)
inline

Definition at line 280 of file dyn_inst.hh.

References predicate, and gem5::X86ISA::val.

Member Data Documentation

◆ bubbleInst

MinorDynInstPtr gem5::minor::MinorDynInst::bubbleInst
staticprivate
Initial value:
= []() {
auto *inst = new MinorDynInst(nullStaticInstPtr);
assert(inst->isBubble());
inst->incref();
return inst;
}()

A prototypical bubble instruction.

You must call MinorDynInst::init to initialise this

Definition at line 168 of file dyn_inst.hh.

Referenced by bubble().

◆ canEarlyIssue

bool gem5::minor::MinorDynInst::canEarlyIssue = false

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 212 of file dyn_inst.hh.

◆ extraCommitDelay

Cycles gem5::minor::MinorDynInst::extraCommitDelay {0}

Extra delay at the end of the pipeline.

Definition at line 228 of file dyn_inst.hh.

◆ extraCommitDelayExpr

TimingExpr* gem5::minor::MinorDynInst::extraCommitDelayExpr = nullptr

Definition at line 229 of file dyn_inst.hh.

◆ fault

Fault gem5::minor::MinorDynInst::fault

This is actually a fault masquerading as an instruction.

Definition at line 182 of file dyn_inst.hh.

Referenced by isFault(), minorTraceInst(), and gem5::minor::operator<<().

◆ flatDestRegIdx

std::vector<RegId> gem5::minor::MinorDynInst::flatDestRegIdx

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 238 of file dyn_inst.hh.

◆ fuIndex

unsigned int gem5::minor::MinorDynInst::fuIndex = 0

Fields only set during execution.

FU this instruction is issued to

Definition at line 198 of file dyn_inst.hh.

◆ id

InstId gem5::minor::MinorDynInst::id

Definition at line 173 of file dyn_inst.hh.

Referenced by gem5::minor::operator<<(), and reportData().

◆ inLSQ

bool gem5::minor::MinorDynInst::inLSQ = false

This instruction is in the LSQ, not a functional unit.

Definition at line 201 of file dyn_inst.hh.

◆ inStoreBuffer

bool gem5::minor::MinorDynInst::inStoreBuffer = false

The instruction has been sent to the store buffer.

Definition at line 207 of file dyn_inst.hh.

◆ instToWaitFor

InstSeqNum gem5::minor::MinorDynInst::instToWaitFor = 0

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 225 of file dyn_inst.hh.

◆ memAccPredicate

bool gem5::minor::MinorDynInst::memAccPredicate = true

Flag controlling conditional execution of the memory access associated with the instruction (only meaningful for loads/stores)

Definition at line 219 of file dyn_inst.hh.

Referenced by readMemAccPredicate(), and setMemAccPredicate().

◆ minimumCommitCycle

Cycles gem5::minor::MinorDynInst::minimumCommitCycle {0}

Once issued, extraCommitDelay becomes minimumCommitCycle to account for delay in absolute time.

Definition at line 233 of file dyn_inst.hh.

◆ pc

std::unique_ptr<PCStateBase> gem5::minor::MinorDynInst::pc

The fetch address of this instruction.

Definition at line 179 of file dyn_inst.hh.

Referenced by minorTraceInst(), and gem5::minor::operator<<().

◆ predicate

bool gem5::minor::MinorDynInst::predicate = true

Flag controlling conditional execution of the instruction.

Definition at line 215 of file dyn_inst.hh.

Referenced by readPredicate(), and setPredicate().

◆ predictedTaken

bool gem5::minor::MinorDynInst::predictedTaken = false

This instruction was predicted to change control flow and the following instructions will have a newer predictionSeqNum.

Definition at line 190 of file dyn_inst.hh.

Referenced by minorTraceInst().

◆ predictedTarget

std::unique_ptr<PCStateBase> gem5::minor::MinorDynInst::predictedTarget

Predicted branch target.

Definition at line 193 of file dyn_inst.hh.

◆ staticInst

const StaticInstPtr gem5::minor::MinorDynInst::staticInst

◆ traceData

Trace::InstRecord* gem5::minor::MinorDynInst::traceData = nullptr

Trace information for this instruction's execution.

Definition at line 176 of file dyn_inst.hh.

Referenced by ~MinorDynInst().

◆ translationFault

Fault gem5::minor::MinorDynInst::translationFault

Translation fault in case of a mem ref.

Definition at line 204 of file dyn_inst.hh.

Referenced by gem5::minor::operator<<(), and reportData().

◆ triedToPredict

bool gem5::minor::MinorDynInst::triedToPredict = false

Tried to predict the destination of this inst (if a control instruction or a sys call)

Definition at line 186 of file dyn_inst.hh.


The documentation for this class was generated from the following files:
gem5::minor::MinorDynInst::MinorDynInst
MinorDynInst(StaticInstPtr si, InstId id_=InstId(), Fault fault_=NoFault)
Definition: dyn_inst.hh:241
gem5::nullStaticInstPtr
const StaticInstPtr nullStaticInstPtr
Statically allocated null StaticInstPtr.
Definition: null_static_inst.cc:36

Generated on Sat Jun 18 2022 08:14:25 for gem5 by doxygen 1.8.17