CPU: Get rid of the now unnecessary getInst/setInst family of functions.
[gem5.git] / src / cpu / ozone / inst_queue.hh
index a11d5204bc060b4904e98466474db9db12d1a5bc..2f544e307485c17178d2ace5f1437c08978aa7e5 100644 (file)
@@ -38,8 +38,8 @@
 
 #include "base/statistics.hh"
 #include "base/timebuf.hh"
+#include "base/types.hh"
 #include "cpu/inst_seq.hh"
-#include "sim/host.hh"
 
 class FUPool;
 class MemInterface;
@@ -130,7 +130,7 @@ class InstQueue
     void setTimeBuffer(TimeBuffer<TimeStruct> *tb_ptr);
 
     /** Number of entries needed for given amount of threads. */
-    int entryAmount(int num_threads);
+    int entryAmount(ThreadID num_threads);
 
     /** Resets max entries for all threads. */
     void resetEntries();
@@ -139,13 +139,13 @@ class InstQueue
     unsigned numFreeEntries();
 
     /** Returns number of free entries for a thread. */
-    unsigned numFreeEntries(unsigned tid);
+    unsigned numFreeEntries(ThreadID tid);
 
     /** Returns whether or not the IQ is full. */
     bool isFull();
 
     /** Returns whether or not the IQ is full for a specific thread. */
-    bool isFull(unsigned tid);
+    bool isFull(ThreadID tid);
 
     /** Returns if there are any ready instructions in the IQ. */
     bool hasReadyInsts();
@@ -179,7 +179,7 @@ class InstQueue
      * Commits all instructions up to and including the given sequence number,
      * for a specific thread.
      */
-    void commit(const InstSeqNum &inst, unsigned tid = 0);
+    void commit(const InstSeqNum &inst, ThreadID tid = 0);
 
     /** Wakes all dependents of a completed instruction. */
     void wakeDependents(DynInstPtr &completed_inst);
@@ -206,10 +206,10 @@ class InstQueue
      * Squashes instructions for a thread. Squashing information is obtained
      * from the time buffer.
      */
-    void squash(unsigned tid); // Probably want the ISN
+    void squash(ThreadID tid); // Probably want the ISN
 
     /** Returns the number of used entries for a thread. */
-    unsigned getCount(unsigned tid) { return count[tid]; };
+    unsigned getCount(ThreadID tid) { return count[tid]; };
 
     /** Updates the number of free entries. */
     void updateFreeEntries(int num) { freeEntries += num; }
@@ -219,7 +219,7 @@ class InstQueue
 
   private:
     /** Does the actual squashing. */
-    void doSquash(unsigned tid);
+    void doSquash(ThreadID tid);
 
     /////////////////////////
     // Various pointers
@@ -473,35 +473,35 @@ class InstQueue
     void dumpInsts();
 
     /** Stat for number of instructions added. */
-    Stats::Scalar<> iqInstsAdded;
+    Stats::Scalar iqInstsAdded;
     /** Stat for number of non-speculative instructions added. */
-    Stats::Scalar<> iqNonSpecInstsAdded;
-//    Stats::Scalar<> iqIntInstsAdded;
+    Stats::Scalar iqNonSpecInstsAdded;
+//    Stats::Scalar iqIntInstsAdded;
     /** Stat for number of integer instructions issued. */
-    Stats::Scalar<> iqIntInstsIssued;
-//    Stats::Scalar<> iqFloatInstsAdded;
+    Stats::Scalar iqIntInstsIssued;
+//    Stats::Scalar iqFloatInstsAdded;
     /** Stat for number of floating point instructions issued. */
-    Stats::Scalar<> iqFloatInstsIssued;
-//    Stats::Scalar<> iqBranchInstsAdded;
+    Stats::Scalar iqFloatInstsIssued;
+//    Stats::Scalar iqBranchInstsAdded;
     /** Stat for number of branch instructions issued. */
-    Stats::Scalar<> iqBranchInstsIssued;
-//    Stats::Scalar<> iqMemInstsAdded;
+    Stats::Scalar iqBranchInstsIssued;
+//    Stats::Scalar iqMemInstsAdded;
     /** Stat for number of memory instructions issued. */
-    Stats::Scalar<> iqMemInstsIssued;
-//    Stats::Scalar<> iqMiscInstsAdded;
+    Stats::Scalar iqMemInstsIssued;
+//    Stats::Scalar iqMiscInstsAdded;
     /** Stat for number of miscellaneous instructions issued. */
-    Stats::Scalar<> iqMiscInstsIssued;
+    Stats::Scalar iqMiscInstsIssued;
     /** Stat for number of squashed instructions that were ready to issue. */
-    Stats::Scalar<> iqSquashedInstsIssued;
+    Stats::Scalar iqSquashedInstsIssued;
     /** Stat for number of squashed instructions examined when squashing. */
-    Stats::Scalar<> iqSquashedInstsExamined;
+    Stats::Scalar iqSquashedInstsExamined;
     /** Stat for number of squashed instruction operands examined when
      * squashing.
      */
-    Stats::Scalar<> iqSquashedOperandsExamined;
+    Stats::Scalar iqSquashedOperandsExamined;
     /** Stat for number of non-speculative instructions removed due to a squash.
      */
-    Stats::Scalar<> iqSquashedNonSpecRemoved;
+    Stats::Scalar iqSquashedNonSpecRemoved;
 
 };