Go to the documentation of this file.
45 #include "debug/DynInst.hh"
46 #include "debug/IQ.hh"
47 #include "debug/O3PipeView.hh"
58 : seqNum(seq_num), staticInst(static_inst), cpu(_cpu),
pc(_pc),
59 regs(staticInst->numSrcRegs(), staticInst->numDestRegs()),
60 predPC(pred_pc), macroop(_macroop)
83 "DynInst: [sn:%lli] Instruction created. Instcount for %s = %i\n",
95 :
DynInst(_staticInst, _macroop, {}, {}, 0,
nullptr)
101 if (debug::O3PipeView) {
102 Tick fetch = this->fetchTick;
108 DPRINTFR(O3PipeView,
"O3PipeView:fetch:%llu:0x%08llx:%d:%llu:%s\n",
115 val = (this->decodeTick == -1) ? 0 : fetch + this->decodeTick;
116 DPRINTFR(O3PipeView,
"O3PipeView:decode:%llu\n",
val);
117 val = (this->renameTick == -1) ? 0 : fetch + this->renameTick;
118 DPRINTFR(O3PipeView,
"O3PipeView:rename:%llu\n",
val);
119 val = (this->dispatchTick == -1) ? 0 : fetch + this->dispatchTick;
120 DPRINTFR(O3PipeView,
"O3PipeView:dispatch:%llu\n",
val);
121 val = (this->issueTick == -1) ? 0 : fetch + this->issueTick;
122 DPRINTFR(O3PipeView,
"O3PipeView:issue:%llu\n",
val);
123 val = (this->completeTick == -1) ? 0 : fetch + this->completeTick;
124 DPRINTFR(O3PipeView,
"O3PipeView:complete:%llu\n",
val);
125 val = (this->commitTick == -1) ? 0 : fetch + this->commitTick;
127 Tick valS = (this->storeTick == -1) ? 0 : fetch + this->storeTick;
128 DPRINTFR(O3PipeView,
"O3PipeView:retire:%llu:store:%llu\n",
142 "DynInst: [sn:%lli] Instruction destroyed. Instcount for %s = %i\n",
153 DynInst::dumpSNList()
155 std::set<InstSeqNum>::iterator sn_it =
cpu->snList.begin();
158 while (sn_it !=
cpu->snList.end()) {
159 cprintf(
"%i: [sn:%lli] not destroyed\n",
count, (*sn_it));
177 std::ostringstream
s;
187 DPRINTF(IQ,
"[sn:%lli] has %d ready out of %d sources. RTI %d)\n",
294 assert(byte_enable.size() == size);
297 true,
nullptr, size,
addr, flags,
nullptr,
nullptr,
306 true,
nullptr, 8, 0x0ul, flags,
nullptr,
nullptr);
314 assert(byte_enable.size() == size);
317 false,
data, size,
addr, flags, res,
nullptr,
332 false,
nullptr, size,
addr, flags,
nullptr,
void dumpInsts()
Debug function to print all instructions on the list.
Fault pushRequest(const DynInstPtr &inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op=nullptr, const std::vector< bool > &byte_enable=std::vector< bool >())
CPU pushRequest function, forwards request to LSQ.
constexpr decltype(nullptr) NoFault
@ Squashed
Instruction has committed.
Addr microPC() const
Read the micro PC of this instruction.
Fault initiateAcc()
Initiates the access.
void cprintf(const char *format, const Args &...args)
ThreadID threadNumber
The thread this instruction is from.
size_t numSrcRegs() const
Returns the number of source registers.
TheISA::PCState pc
PC state for this instruction.
void setCanIssue()
Sets this instruction as ready to issue.
RequestPtr req
A pointer to the original request.
bool isStoreConditional() const
std::bitset< NumStatus > status
The status of this BaseDynInst.
std::bitset< MaxFlags > instFlags
bool isPinnedRegsRenamed() const
Returns whether pinned registers are renamed.
InstSeqNum seqNum
The sequence number of the instruction.
size_t numDestRegs() const
Returns the number of destination registers.
ThreadState * thread
Pointer to the thread state.
virtual Fault execute(ExecContext *xc, Trace::InstRecord *traceData) const =0
void dump()
Dumps out contents of this BaseDynInst.
gem5::Checker< DynInstPtr > * checker
Pointer to the checker, which can dynamically verify instruction results at run time.
CPU * cpu
Pointer to the Impl's CPU object.
bool readyToIssue() const
Returns whether or not this instruction is ready to issue.
void markSrcRegReady()
Records that one of the source registers is ready.
O3CPU class, has each of the stages (fetch through commit) within it, as well as all of the time buff...
virtual std::string name() const
std::shared_ptr< FaultBase > Fault
void trap(const Fault &fault)
Traps to handle specified fault.
void incrNumPinnedWritesToComplete()
void setPinnedRegsSquashDone()
Sets dest registers' status updated after squash.
A Packet is used to encapsulate a transfer between two objects in the memory system (e....
Fault execute()
Executes the instruction.
GenericISA::DelaySlotPCState< 4 > PCState
uint64_t Tick
Tick count type.
const StaticInstPtr staticInst
The StaticInst used by this BaseDynInst.
uint8_t readyRegs
How many source registers are ready.
Fault writeMem(uint8_t *data, unsigned size, Addr addr, Request::Flags flags, uint64_t *res, const std::vector< bool > &byte_enable) override
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
bool readySrcIdx(int idx) const
Fault completeAcc(PacketPtr pkt)
Completes the access.
void setSquashed()
Sets this instruction as squashed.
PhysRegIdPtr renamedDestIdx(int idx) const
bool isPinnedRegsSquashDone() const
Return whether dest registers' pinning status updated after squash.
int instcount
Count of total number of dynamic instructions in flight.
Fault initiateMemAMO(Addr addr, unsigned size, Request::Flags flags, AtomicOpFunctorPtr amo_op) override
virtual Fault completeAcc(Packet *pkt, ExecContext *xc, Trace::InstRecord *trace_data) const
virtual const std::string & disassemble(Addr pc, const loader::SymbolTable *symtab=nullptr) const
Return string representation of disassembled instruction.
virtual Fault initiateAcc(ExecContext *xc, Trace::InstRecord *traceData) const
void incrNumPinnedWrites()
void trap(const Fault &fault, ThreadID tid, const StaticInstPtr &inst)
Traps to handle given fault.
Trace::InstRecord * traceData
InstRecord that tracks this instructions.
Fault initiateMemRead(Addr addr, unsigned size, Request::Flags flags, const std::vector< bool > &byte_enable) override
DynInst(const StaticInstPtr &staticInst, const StaticInstPtr ¯oop, TheISA::PCState pc, TheISA::PCState predPC, InstSeqNum seq_num, CPU *cpu)
BaseDynInst constructor given a binary instruction.
Fault initiateHtmCmd(Request::Flags flags) override
Initiate an HTM command, e.g.
bool isPinnedRegsWritten() const
Returns whether destination registers are written.
std::unique_ptr< AtomicOpFunctor > AtomicOpFunctorPtr
Fault fault
The kind of fault this instruction has generated.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Addr instAddr() const
Read the PC of this instruction.
uint8_t * memData
Pointer to the data for the memory access.
Generated on Tue Sep 21 2021 12:25:01 for gem5 by doxygen 1.8.17