Go to the documentation of this file.
42 #ifndef __CPU_O3_INST_QUEUE_IMPL_HH__
43 #define __CPU_O3_INST_QUEUE_IMPL_HH__
51 #include "debug/IQ.hh"
52 #include "enums/OpClass.hh"
53 #include "params/DerivO3CPU.hh"
63 :
Event(Stat_Event_Pri, AutoDelete),
64 inst(_inst), fuIdx(fu_idx), iqPtr(iq_ptr), freeFU(false)
72 iqPtr->processFUCompletion(inst, freeFU ? fuIdx : -1);
81 return "Functional unit completion";
86 const DerivO3CPUParams ¶ms)
102 numPhysRegs = params.numPhysIntRegs + params.numPhysFloatRegs +
103 params.numPhysVecRegs +
105 params.numPhysVecPredRegs +
106 params.numPhysCCRegs;
116 for (
ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
124 if (
iqPolicy == SMTQueuePolicy::Dynamic) {
130 }
else if (
iqPolicy == SMTQueuePolicy::Partitioned) {
139 DPRINTF(IQ,
"IQ sharing policy set to Partitioned:"
140 "%i entries per thread.\n",part_amt);
141 }
else if (
iqPolicy == SMTQueuePolicy::Threshold) {
142 double threshold = (double)params.smtIQThreshold / 100;
144 int thresholdIQ = (
int)((double)threshold *
numEntries);
151 DPRINTF(IQ,
"IQ sharing policy set to Threshold:"
152 "%i entries per thread.\n",thresholdIQ);
159 template <
class Impl>
164 cprintf(
"Nodes traversed: %i, removed: %i\n",
165 dependGraph.nodesTraversed, dependGraph.nodesRemoved);
169 template <
class Impl>
173 return cpu->name() +
".iq";
176 template <
class Impl>
181 "Number of instructions added to the IQ (excludes non-spec)"),
183 "Number of non-speculative instructions added to the IQ"),
186 "Number of integer instructions issued"),
188 "Number of float instructions issued"),
190 "Number of branch instructions issued"),
192 "Number of memory instructions issued"),
194 "Number of miscellaneous instructions issued"),
196 "Number of squashed instructions issued"),
198 "Number of squashed instructions iterated over during squash; "
199 "mainly for profiling"),
201 "Number of squashed operands that are examined and possibly "
202 "removed from graph"),
204 "Number of squashed non-spec instructions that were removed"),
207 "attempts to use FU when none available"),
209 "Number of instructions issued per FU type, per thread"),
211 "Inst issue rate", instsIssued / cpu->baseStats.numCycles),
214 "FU busy rate (busy events/executed inst)")
263 .
init(0,total_width,1)
278 .
init(
cpu->numThreads,Enums::Num_OpClass)
322 template <
class Impl>
325 :
Stats::Group(parent),
327 "Number of integer instruction queue reads"),
329 "Number of integer instruction queue writes"),
331 "Number of integer instruction queue wakeup accesses"),
333 "Number of floating instruction queue reads"),
335 "Number of floating instruction queue writes"),
337 "Number of floating instruction queue wakeup accesses"),
339 "Number of vector instruction queue reads"),
341 "Number of vector instruction queue writes"),
343 "Number of vector instruction queue wakeup accesses"),
346 "Number of floating point alu accesses"),
349 using namespace Stats;
387 template <
class Impl>
392 for (
ThreadID tid = 0; tid < Impl::MaxThreads; tid++) {
409 for (
ThreadID tid = 0; tid < Impl::MaxThreads; ++tid) {
427 template <
class Impl>
434 template <
class Impl>
441 template <
class Impl>
450 template <
class Impl>
463 template <
class Impl>
473 template <
class Impl>
480 template <
class Impl>
484 if (
iqPolicy == SMTQueuePolicy::Partitioned) {
492 template <
class Impl>
502 while (threads != end) {
505 if (
iqPolicy == SMTQueuePolicy::Partitioned) {
507 }
else if (
iqPolicy == SMTQueuePolicy::Threshold &&
508 active_threads == 1) {
515 template <
class Impl>
522 template <
class Impl>
531 template <
class Impl>
542 template <
class Impl>
553 template <
class Impl>
570 template <
class Impl>
574 if (new_inst->isFloating()) {
576 }
else if (new_inst->isVector()) {
584 DPRINTF(IQ,
"Adding instruction [sn:%llu] PC %s to the IQ.\n",
585 new_inst->seqNum, new_inst->pcState());
589 instList[new_inst->threadNumber].push_back(new_inst);
603 if (new_inst->isMemRef()) {
611 count[new_inst->threadNumber]++;
616 template <
class Impl>
622 if (new_inst->isFloating()) {
624 }
else if (new_inst->isVector()) {
634 DPRINTF(IQ,
"Adding non-speculative instruction [sn:%llu] PC %s "
636 new_inst->seqNum, new_inst->pcState());
640 instList[new_inst->threadNumber].push_back(new_inst);
652 if (new_inst->isMemRef()) {
658 count[new_inst->threadNumber]++;
663 template <
class Impl>
672 template <
class Impl>
673 typename Impl::DynInstPtr
679 if (inst->isFloating()) {
681 }
else if (inst->isVector()) {
689 template <
class Impl>
704 while (list_it != list_end_it) {
705 if ((*list_it).oldestInst > queue_entry.
oldestInst) {
716 template <
class Impl>
726 OpClass op_class = (*list_order_it).
queueType;
735 (*next_it).oldestInst < queue_entry.
oldestInst) {
742 template <
class Impl>
746 DPRINTF(IQ,
"Processing FU completion [sn:%llu]\n", inst->seqNum);
747 assert(!
cpu->switchedOut());
766 template <
class Impl>
770 DPRINTF(IQ,
"Attempting to schedule ready instructions from "
793 int total_issued = 0;
797 while (total_issued <
totalWidth && order_it != order_end_it) {
798 OpClass op_class = (*order_it).queueType;
804 if (issuing_inst->isFloating()) {
806 }
else if (issuing_inst->isVector()) {
812 assert(issuing_inst->seqNum == (*order_it).oldestInst);
814 if (issuing_inst->isSquashed()) {
833 ThreadID tid = issuing_inst->threadNumber;
835 if (op_class != No_OpClass) {
837 if (issuing_inst->isFloating()) {
839 }
else if (issuing_inst->isVector()) {
852 if (op_latency ==
Cycles(1)) {
867 cpu->schedule(execution,
880 DPRINTF(IQ,
"Thread %i: Issuing instruction PC %s "
882 tid, issuing_inst->pcState(),
883 issuing_inst->seqNum);
894 issuing_inst->setIssued();
898 issuing_inst->issueTick =
curTick() - issuing_inst->fetchTick;
901 if (!issuing_inst->isMemRef()) {
906 issuing_inst->clearInIQ();
928 cpu->activityThisCycle();
930 DPRINTF(IQ,
"Not able to schedule any instructions.\n");
934 template <
class Impl>
938 DPRINTF(IQ,
"Marking nonspeculative instruction [sn:%llu] as ready "
939 "to execute.\n", inst);
945 ThreadID tid = (*inst_it).second->threadNumber;
947 (*inst_it).second->setAtCommit();
949 (*inst_it).second->setCanIssue();
951 if (!(*inst_it).second->isMemRef()) {
957 (*inst_it).second = NULL;
962 template <
class Impl>
966 DPRINTF(IQ,
"[tid:%i] Committing instructions older than [sn:%llu]\n",
971 while (iq_it !=
instList[tid].end() &&
972 (*iq_it)->seqNum <= inst) {
980 template <
class Impl>
987 if (completed_inst->isFloating()) {
989 }
else if (completed_inst->isVector()) {
995 DPRINTF(IQ,
"Waking dependents of completed instruction.\n");
997 assert(!completed_inst->isSquashed());
1002 ThreadID tid = completed_inst->threadNumber;
1003 if (completed_inst->isMemRef()) {
1006 DPRINTF(IQ,
"Completing mem instruction PC: %s [sn:%llu]\n",
1007 completed_inst->pcState(), completed_inst->seqNum);
1010 completed_inst->memOpDone(
true);
1012 }
else if (completed_inst->isReadBarrier() ||
1013 completed_inst->isWriteBarrier()) {
1018 for (
int dest_reg_idx = 0;
1019 dest_reg_idx < completed_inst->numDestRegs();
1023 completed_inst->regs.renamedDestIdx(dest_reg_idx);
1028 DPRINTF(IQ,
"Reg %d [%s] is part of a fix mapping, skipping\n",
1036 completed_inst->setPinnedRegsWritten();
1039 DPRINTF(IQ,
"Reg %d [%s] is pinned, skipping\n",
1044 DPRINTF(IQ,
"Waking any dependents on register %i (%s).\n",
1053 DPRINTF(IQ,
"Waking up a dependent instruction, [sn:%llu] "
1054 "PC %s.\n", dep_inst->seqNum, dep_inst->pcState());
1060 dep_inst->markSrcRegReady();
1080 template <
class Impl>
1084 OpClass op_class = ready_inst->opClass();
1093 (*
readyIt[op_class]).oldestInst) {
1098 DPRINTF(IQ,
"Instruction is ready to issue, putting it onto "
1099 "the ready list, PC %s opclass:%i [sn:%llu].\n",
1100 ready_inst->pcState(), op_class, ready_inst->seqNum);
1103 template <
class Impl>
1107 DPRINTF(IQ,
"Rescheduling mem inst [sn:%llu]\n", resched_inst->seqNum);
1110 resched_inst->translationStarted(
false);
1111 resched_inst->translationCompleted(
false);
1113 resched_inst->clearCanIssue();
1117 template <
class Impl>
1124 template <
class Impl>
1131 template <
class Impl>
1135 blocked_inst->clearIssued();
1136 blocked_inst->clearCanIssue();
1140 template <
class Impl>
1149 template <
class Impl>
1150 typename Impl::DynInstPtr
1155 if ((*it)->translationCompleted() || (*it)->isSquashed()) {
1164 template <
class Impl>
1165 typename Impl::DynInstPtr
1177 template <
class Impl>
1186 template <
class Impl>
1190 DPRINTF(IQ,
"[tid:%i] Starting to squash instructions in "
1203 template <
class Impl>
1211 DPRINTF(IQ,
"[tid:%i] Squashing until sequence number %i!\n",
1216 while (squash_it !=
instList[tid].end() &&
1220 if (squashed_inst->isFloating()) {
1222 }
else if (squashed_inst->isVector()) {
1230 if (squashed_inst->threadNumber != tid ||
1231 squashed_inst->isSquashedInIQ()) {
1236 if (!squashed_inst->isIssued() ||
1237 (squashed_inst->isMemRef() &&
1238 !squashed_inst->memOpDone())) {
1240 DPRINTF(IQ,
"[tid:%i] Instruction [sn:%llu] PC %s squashed.\n",
1241 tid, squashed_inst->seqNum, squashed_inst->pcState());
1243 bool is_acq_rel = squashed_inst->isFullMemBarrier() &&
1244 (squashed_inst->isLoad() ||
1245 (squashed_inst->isStore() &&
1246 !squashed_inst->isStoreConditional()));
1250 (!squashed_inst->isNonSpeculative() &&
1251 !squashed_inst->isStoreConditional() &&
1252 !squashed_inst->isAtomic() &&
1253 !squashed_inst->isReadBarrier() &&
1254 !squashed_inst->isWriteBarrier())) {
1256 for (
int src_reg_idx = 0;
1257 src_reg_idx < squashed_inst->numSrcRegs();
1261 squashed_inst->regs.renamedSrcIdx(src_reg_idx);
1272 if (!squashed_inst->regs.readySrcIdx(src_reg_idx) &&
1281 }
else if (!squashed_inst->isStoreConditional() ||
1282 !squashed_inst->isCompleted()) {
1293 assert(squashed_inst->getFault() !=
NoFault ||
1294 squashed_inst->isMemRef());
1297 (*ns_inst_it).second = NULL;
1308 squashed_inst->setSquashedInIQ();
1312 squashed_inst->setIssued();
1313 squashed_inst->setCanCommit();
1314 squashed_inst->clearInIQ();
1317 count[squashed_inst->threadNumber]--;
1329 for (
int dest_reg_idx = 0;
1330 dest_reg_idx < squashed_inst->numDestRegs();
1334 squashed_inst->regs.renamedDestIdx(dest_reg_idx);
1346 template <
class Impl>
1352 int8_t total_src_regs = new_inst->numSrcRegs();
1353 bool return_val =
false;
1355 for (
int src_reg_idx = 0;
1356 src_reg_idx < total_src_regs;
1360 if (!new_inst->regs.readySrcIdx(src_reg_idx)) {
1361 PhysRegIdPtr src_reg = new_inst->regs.renamedSrcIdx(src_reg_idx);
1370 DPRINTF(IQ,
"Instruction PC %s has src reg %i (%s) that "
1371 "is being added to the dependency chain.\n",
1372 new_inst->pcState(), src_reg->
index(),
1381 DPRINTF(IQ,
"Instruction PC %s has src reg %i (%s) that "
1382 "became ready before it reached the IQ.\n",
1383 new_inst->pcState(), src_reg->
index(),
1386 new_inst->markSrcRegReady(src_reg_idx);
1394 template <
class Impl>
1402 int8_t total_dest_regs = new_inst->numDestRegs();
1404 for (
int dest_reg_idx = 0;
1405 dest_reg_idx < total_dest_regs;
1408 PhysRegIdPtr dest_reg = new_inst->regs.renamedDestIdx(dest_reg_idx);
1418 panic(
"Dependency graph %i (%s) (flat: %i) not empty!",
1430 template <
class Impl>
1436 if (inst->readyToIssue()) {
1439 if (inst->isMemRef()) {
1441 DPRINTF(IQ,
"Checking if memory instruction can issue.\n");
1450 OpClass op_class = inst->opClass();
1452 DPRINTF(IQ,
"Instruction is ready to issue, putting it onto "
1453 "the ready list, PC %s opclass:%i [sn:%llu].\n",
1454 inst->pcState(), op_class, inst->seqNum);
1463 (*
readyIt[op_class]).oldestInst) {
1470 template <
class Impl>
1477 template <
class Impl>
1492 cprintf(
"Non speculative list: ");
1494 while (non_spec_it != non_spec_end_it) {
1495 cprintf(
"%s [sn:%llu]", (*non_spec_it).second->pcState(),
1496 (*non_spec_it).second->seqNum);
1508 while (list_order_it != list_order_end_it) {
1509 cprintf(
"%i OpClass:%i [sn:%llu] ",
i, (*list_order_it).queueType,
1510 (*list_order_it).oldestInst);
1520 template <
class Impl>
1529 while (inst_list_it !=
instList[tid].end()) {
1530 cprintf(
"Instruction:%i\n", num);
1531 if (!(*inst_list_it)->isSquashed()) {
1532 if (!(*inst_list_it)->isIssued()) {
1534 cprintf(
"Count:%i\n", valid_num);
1535 }
else if ((*inst_list_it)->isMemRef() &&
1536 !(*inst_list_it)->memOpDone()) {
1540 cprintf(
"Count:%i\n", valid_num);
1544 cprintf(
"PC: %s\n[sn:%llu]\n[tid:%i]\n"
1545 "Issued:%i\nSquashed:%i\n",
1546 (*inst_list_it)->pcState(),
1547 (*inst_list_it)->seqNum,
1548 (*inst_list_it)->threadNumber,
1549 (*inst_list_it)->isIssued(),
1550 (*inst_list_it)->isSquashed());
1552 if ((*inst_list_it)->isMemRef()) {
1553 cprintf(
"MemOpDone:%i\n", (*inst_list_it)->memOpDone());
1563 cprintf(
"Insts to Execute list:\n");
1573 if (!(*inst_list_it)->isSquashed()) {
1574 if (!(*inst_list_it)->isIssued()) {
1576 cprintf(
"Count:%i\n", valid_num);
1577 }
else if ((*inst_list_it)->isMemRef() &&
1578 !(*inst_list_it)->memOpDone()) {
1582 cprintf(
"Count:%i\n", valid_num);
1586 cprintf(
"PC: %s\n[sn:%llu]\n[tid:%i]\n"
1587 "Issued:%i\nSquashed:%i\n",
1588 (*inst_list_it)->pcState(),
1589 (*inst_list_it)->seqNum,
1590 (*inst_list_it)->threadNumber,
1591 (*inst_list_it)->isIssued(),
1592 (*inst_list_it)->isSquashed());
1594 if ((*inst_list_it)->isMemRef()) {
1595 cprintf(
"MemOpDone:%i\n", (*inst_list_it)->memOpDone());
1605 #endif//__CPU_O3_INST_QUEUE_IMPL_HH__
Stats::Scalar instsIssued
static const OpClass Num_OpClasses
std::map< InstSeqNum, DynInstPtr > nonSpecInsts
List of non-speculative instructions that will be scheduled once the IQ gets a signal from commit.
Stats::Scalar fpInstQueueWakeupAccesses
void addIfReady(const DynInstPtr &inst)
Moves an instruction to the ready queue if it is ready.
Stats::Formula issueRate
Number of instructions issued per cycle.
void takeOverFrom()
Takes over execution from another CPU's thread.
void replay()
Replays all instructions that have been rescheduled by moving them to the ready list.
InstructionQueue::IQIOStats iqIOStats
IEW * iewStage
Pointer to IEW stage.
int wakeDependents(const DynInstPtr &completed_inst)
Wakes all dependents of a completed instruction.
void commit(const InstSeqNum &inst, ThreadID tid=0)
Commits all instructions up to and including the given sequence number, for a specific thread.
ReadyInstQueue readyInsts[Num_OpClasses]
List of ready instructions, per op class.
std::string name() const
Returns the name of the IQ.
void nonSpecInstReady(const DynInstPtr &inst)
Indicate that a non-speculative instruction is ready.
TimeBuffer< TimeStruct >::wire fromCommit
Wire to read information from timebuffer.
DynInstPtr getDeferredMemInstToExecute()
Gets a memory instruction that was referred due to a delayed DTB translation if it is now ready to ex...
void squash(ThreadID tid)
Squashes instructions for a thread.
DynInstPtr getBlockedMemInstToExecute()
Gets a memory instruction that was blocked on the cache.
unsigned count[Impl::MaxThreads]
Per Thread IQ count.
int16_t ThreadID
Thread index/ID type.
TimeBuffer< TimeStruct > * timeBuffer
The backwards time buffer.
Cycles commitToIEWDelay
Delay between commit stage and the IQ.
SMTQueuePolicy iqPolicy
IQ sharing policy for SMT.
std::list< ListOrderEntry >::iterator ListOrderIt
void resetEntries()
Resets max entries for all threads.
Stats::Scalar memInstsIssued
Stat for number of memory instructions issued.
std::list< DynInstPtr > retryMemInsts
List of instructions that were cache blocked, but a retry has been seen since, so they can now be ret...
const PhysRegIndex & flatIndex() const
Flat index accessor.
InstructionQueue(O3CPU *cpu_ptr, IEW *iew_ptr, const DerivO3CPUParams ¶ms)
Constructs an IQ.
void resetState()
Resets all instruction queue state.
static scfx_rep_node * list
int entryAmount(ThreadID num_threads)
Number of entries needed for given amount of threads.
void issue(const DynInstPtr &inst)
Issues the given instruction.
void deferMemInst(const DynInstPtr &deferred_inst)
Defers a memory instruction when its DTB translation incurs a hw page table walk.
int getUnit(OpClass capability)
Gets a FU providing the requested capability.
std::map< InstSeqNum, DynInstPtr >::iterator NonSpecMapIt
void drainSanityCheck() const
Perform sanity checks after a drain.
~InstructionQueue()
Destructs the IQ.
Stats::Vector statFuBusy
Distribution of the cycles it takes to issue an instruction.
int countInsts()
Debugging function to count how many entries are in the IQ.
DependencyGraph< DynInstPtr > dependGraph
std::list< DynInstPtr >::iterator ListIt
unsigned maxEntries[Impl::MaxThreads]
Max IQ Entries Per Thread.
void blockMemInst(const DynInstPtr &blocked_inst)
Defers a memory instruction when it is cache blocked.
bool isFixedMapping() const
Returns true if this register is always associated to the same architectural register.
Stats::Scalar intInstsIssued
Stat for number of integer instructions issued.
void moveToYoungerInst(ListOrderIt age_order_it)
Called when the oldest instruction has been removed from a ready queue; this places that ready queue ...
void cacheUnblocked()
Notify instruction queue that a previous blockage has resolved.
void completeInst(const DynInstPtr &inst)
Notifies completion of an instruction.
Stats::Scalar squashedInstsIssued
Stat for number of squashed instructions that were ready to issue.
void setIssueToExecuteQueue(TimeBuffer< IssueStruct > *i2eQueue)
Sets the timer buffer between issue and execute.
unsigned numPhysRegs
The number of physical registers in the CPU.
ListOrderIt readyIt[Num_OpClasses]
Iterators of each ready queue.
Stats::Scalar intInstQueueWakeupAccesses
void processFUCompletion(const DynInstPtr &inst, int fu_idx)
Process FU completion event.
void violation(const DynInstPtr &store_inst, const DynInstPtr &violating_load)
Indicates an ordering violation between a store and a younger load.
Derived & flags(Flags _flags)
Set the flags and marks this stat to print at the end of simulation.
O3CPU * cpu
Pointer to the CPU.
Derived & ysubnames(const char **names)
Stats::Scalar vecInstQueueWakeupAccesses
Stats::Scalar vecInstQueueReads
FUPool * fuPool
Function unit pool.
std::list< DynInstPtr > deferredMemInsts
List of instructions waiting for their DTB translation to complete (hw page table walk in progress).
Stats::Scalar nonSpecInstsAdded
Stat for number of non-speculative instructions added.
const RegIndex & index() const
Visible RegId methods.
unsigned totalWidth
The total number of instructions that can be issued in one cycle.
Stats::Scalar floatInstsIssued
Stat for number of floating point instructions issued.
void squash(const InstSeqNum &squashed_num, ThreadID tid)
Squashes all instructions up until a given sequence number for a specific thread.
Entry for the list age ordering by op class.
void insertNonSpec(const DynInstPtr &inst)
Inserts a non-speculative memory instruction.
static constexpr auto NoCapableFU
Derived & prereq(const Stat &prereq)
Set the prerequisite stat and marks this stat to print at the end of simulation.
MemDepUnit memDepUnit[Impl::MaxThreads]
The memory dependence unit, which tracks/predicts memory dependences between instructions.
void init(const DerivO3CPUParams ¶ms, ThreadID tid, O3CPU *cpu)
Initializes the unit with parameters and a thread id.
void insert(const DynInstPtr &new_inst)
Inserts a new instruction into the IQ.
void cprintf(const char *format, const Args &...args)
void addToProducers(const DynInstPtr &new_inst)
Adds an instruction to the dependency graph, as a producer.
#define ADD_STAT(n,...)
Convenience macro to add a stat to a statistics group.
Stats::Scalar instsAdded
Stat for number of instructions added.
std::list< ThreadID > * activeThreads
Pointer to list of active threads.
bool isDrained() const
Determine if we are drained.
void dumpLists()
Debugging function to dump all the list sizes, as well as print out the list of nonspeculative instru...
unsigned freeEntries
Number of free IQ entries left.
ThreadID numThreads
Number of Total Threads.
void reschedule(const DynInstPtr &inst)
Reschedules an instruction to be re-executed.
constexpr unsigned NumVecElemPerVecReg
InstructionQueue::IQStats iqStats
Stats::Formula fuBusyRate
Number of times the FU was busy per instruction issued.
int wbOutstanding
Number of instructions currently in flight to FUs.
Stats::Scalar squashedOperandsExamined
Stat for number of squashed instruction operands examined when squashing.
void replayMemInst(const DynInstPtr &replay_inst)
Replays a memory instruction.
Stats::Scalar fpInstQueueWrites
void dumpInsts()
Debugging function to dump out all instructions that are in the IQ.
void insertNonSpec(const DynInstPtr &new_inst)
Inserts a new, non-speculative instruction into the IQ.
constexpr decltype(nullptr) NoFault
void doSquash(ThreadID tid)
Does the actual squashing.
std::list< DynInstPtr > instsToExecute
List of instructions that are ready to be executed.
void setIQ(InstructionQueue< Impl > *iq_ptr)
Sets the pointer to the IQ.
void decrNumPinnedWritesToComplete()
void scheduleReadyInsts()
Schedules ready instructions, adding the ready ones (oldest first) to the queue to execute.
Impl::DynInstPtr DynInstPtr
const FlagsType dist
Print the distribution.
InstSeqNum squashedSeqNum[Impl::MaxThreads]
The sequence number of the squashed instruction.
Derived & init(size_type size)
Set this vector to have the given size.
void scheduleNonSpec(const InstSeqNum &inst)
Schedules a single specific non-speculative instruction.
void violation(const DynInstPtr &store, const DynInstPtr &faulting_load)
Indicates an ordering violation between a store and a load.
void insertBarrier(const DynInstPtr &barr_inst)
Inserts a barrier instruction.
FUCompletion(const DynInstPtr &_inst, int fu_idx, InstructionQueue< Impl > *iq_ptr)
Construct a FU completion event.
IQStats(O3CPU *cpu, const unsigned &total_width)
void regsReady(const DynInstPtr &inst)
Indicate that an instruction has its registers ready.
Stats::Vector2d statIssuedInstType
Stat for total number issued for each instruction type.
Stats::Scalar miscInstsIssued
Stat for number of miscellaneous instructions issued.
bool queueOnList[Num_OpClasses]
Tracks if each ready queue is on the age order list.
#define UNIT_RATE(T1, T2)
void insert(const DynInstPtr &inst)
Inserts a memory instruction.
virtual const char * description() const
Return a C string describing the event.
const char * className() const
Return a const char* with the register class name.
unsigned numEntries
The number of entries in the instruction queue.
Stats::Distribution numIssuedDist
Distribution of number of instructions in the queue.
Stats::Scalar intInstQueueReads
DynInstPtr getInstToExecute()
Returns the oldest scheduled instruction, and removes it from the list of instructions waiting to exe...
Distribution & init(Counter min, Counter max, Counter bkt)
Set the parameters of this distribution.
Stats::Scalar fpInstQueueReads
Stats::Scalar fpAluAccesses
const FlagsType pdf
Print the percent of the total that this entry represents.
Stats::Vector fuBusy
Number of times the FU was busy.
int getNumPinnedWritesToComplete() const
Stats::Scalar intInstQueueWrites
A standard instruction queue class.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets active threads list.
void freeUnitNextCycle(int fu_idx)
Frees a FU at the end of this cycle.
Stats::Scalar squashedInstsExamined
Stat for number of squashed instructions examined when squashing.
void addToOrderList(OpClass op_class)
Add an op class to the age order list.
Stats::Scalar squashedNonSpecRemoved
Stat for number of non-speculative instructions removed due to a squash.
Derived & init(size_type _x, size_type _y)
bool isPipelined(OpClass capability)
Returns the issue latency of the given capability.
void insertBarrier(const DynInstPtr &barr_inst)
Inserts a memory or write barrier into the IQ to make sure loads and stores are ordered properly.
void sample(const U &v, int n=1)
Add a value to the distribtion n times.
Cycles is a wrapper class for representing cycle counts, i.e.
Stats::Scalar intAluAccesses
Cycles getOpLatency(OpClass capability)
Returns the operation execution latency of the given capability.
Derived & subname(off_type index, const std::string &name)
Set the subfield name for the given index, and marks this stat to print at the end of simulation.
std::list< DynInstPtr > instList[Impl::MaxThreads]
List of all the instructions in the IQ (some of which may be issued).
std::vector< bool > regScoreboard
A cache of the recently woken registers.
std::list< DynInstPtr > blockedMemInsts
List of instructions that have been cache blocked.
bool addToDependents(const DynInstPtr &new_inst)
Adds an instruction to the dependency graph, as a consumer.
unsigned numFreeEntries()
Returns total number of free entries.
Tick curTick()
The universal simulation clock.
FU completion event class.
Stats::Scalar branchInstsIssued
Stat for number of branch instructions issued.
void rescheduleMemInst(const DynInstPtr &resched_inst)
Reschedules a memory instruction.
static constexpr auto NoFreeFU
void setTimeBuffer(TimeBuffer< TimeStruct > *tb_ptr)
Sets the global time buffer.
const FlagsType total
Print the total.
IQIOStats(Stats::Group *parent)
Stats::Scalar vecAluAccesses
bool isFull()
Returns whether or not the IQ is full.
TimeBuffer< IssueStruct > * issueToExecuteQueue
The queue to the execute stage.
bool hasReadyInsts()
Returns if there are any ready instructions in the IQ.
#define panic(...)
This implements a cprintf based panic() function.
void addReadyMemInst(const DynInstPtr &ready_inst)
Adds a ready memory instruction to the ready list.
Stats::Scalar vecInstQueueWrites
std::list< ListOrderEntry > listOrder
List that contains the age order of the oldest instruction of each ready queue.
Generated on Tue Jun 22 2021 15:28:26 for gem5 by doxygen 1.8.17