{ retryTid = tid; }
/** Debugging function to print out all instructions. */
- void dumpInsts();
+ void dumpInsts() const;
/** Debugging function to print out instructions from a specific thread. */
- void dumpInsts(ThreadID tid)
+ void dumpInsts(ThreadID tid) const
{ thread[tid].dumpInsts(); }
/** Executes a read operation, using the load specified at the load
template<class Impl>
void
-LSQ<Impl>::dumpInsts()
+LSQ<Impl>::dumpInsts() const
{
- list<ThreadID>::iterator threads = activeThreads->begin();
- list<ThreadID>::iterator end = activeThreads->end();
+ list<ThreadID>::const_iterator threads = activeThreads->begin();
+ list<ThreadID>::const_iterator end = activeThreads->end();
while (threads != end) {
ThreadID tid = *threads++;
bool sendStore(PacketPtr data_pkt);
/** Increments the given store index (circular queue). */
- inline void incrStIdx(int &store_idx);
+ inline void incrStIdx(int &store_idx) const;
/** Decrements the given store index (circular queue). */
- inline void decrStIdx(int &store_idx);
+ inline void decrStIdx(int &store_idx) const;
/** Increments the given load index (circular queue). */
- inline void incrLdIdx(int &load_idx);
+ inline void incrLdIdx(int &load_idx) const;
/** Decrements the given load index (circular queue). */
- inline void decrLdIdx(int &load_idx);
+ inline void decrLdIdx(int &load_idx) const;
public:
/** Debugging function to dump instructions in the LSQ. */
- void dumpInsts();
+ void dumpInsts() const;
private:
/** Pointer to the CPU. */
template <class Impl>
inline void
-LSQUnit<Impl>::incrStIdx(int &store_idx)
+LSQUnit<Impl>::incrStIdx(int &store_idx) const
{
if (++store_idx >= SQEntries)
store_idx = 0;
template <class Impl>
inline void
-LSQUnit<Impl>::decrStIdx(int &store_idx)
+LSQUnit<Impl>::decrStIdx(int &store_idx) const
{
if (--store_idx < 0)
store_idx += SQEntries;
template <class Impl>
inline void
-LSQUnit<Impl>::incrLdIdx(int &load_idx)
+LSQUnit<Impl>::incrLdIdx(int &load_idx) const
{
if (++load_idx >= LQEntries)
load_idx = 0;
template <class Impl>
inline void
-LSQUnit<Impl>::decrLdIdx(int &load_idx)
+LSQUnit<Impl>::decrLdIdx(int &load_idx) const
{
if (--load_idx < 0)
load_idx += LQEntries;
template <class Impl>
void
-LSQUnit<Impl>::dumpInsts()
+LSQUnit<Impl>::dumpInsts() const
{
cprintf("Load store queue: Dumping instructions.\n");
cprintf("Load queue size: %i\n", loads);
int load_idx = loadHead;
while (load_idx != loadTail && loadQueue[load_idx]) {
- cprintf("%s ", loadQueue[load_idx]->pcState());
+ const DynInstPtr &inst(loadQueue[load_idx]);
+ cprintf("%s.[sn:%i] ", inst->pcState(), inst->seqNum);
incrLdIdx(load_idx);
}
+ cprintf("\n");
cprintf("Store queue size: %i\n", stores);
cprintf("Store queue: ");
int store_idx = storeHead;
while (store_idx != storeTail && storeQueue[store_idx].inst) {
- cprintf("%s ", storeQueue[store_idx].inst->pcState());
+ const DynInstPtr &inst(storeQueue[store_idx].inst);
+ cprintf("%s.[sn:%i] ", inst->pcState(), inst->seqNum);
incrStIdx(store_idx);
}