summaryrefslogtreecommitdiff
path: root/cpu/base_cpu.hh
diff options
context:
space:
mode:
authorErik Hallnor <ehallnor@umich.edu>2003-10-16 17:04:18 -0400
committerErik Hallnor <ehallnor@umich.edu>2003-10-16 17:04:18 -0400
commit4134477369028e04dd265a43753868c01912c465 (patch)
tree23879b12a0c0079848cd97b294d141ae8cc4acde /cpu/base_cpu.hh
parentea5dc1d5dfabd31bdd62c8435f84ea21bf0f61c7 (diff)
downloadgem5-4134477369028e04dd265a43753868c01912c465.tar.xz
Add a commited loads event queue similar to the one for commited instructions.
Two new parameters for the CPU models, max_loads_any_thread and max_loads_all_threads. cpu/memtest/memtest.cc: cpu/memtest/memtest.hh: Swap out maxReads for the new commited loads model. --HG-- extra : convert_revision : 35031329bbc476122b2203104537a9f8b46addfa
Diffstat (limited to 'cpu/base_cpu.hh')
-rw-r--r--cpu/base_cpu.hh31
1 files changed, 24 insertions, 7 deletions
diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh
index d5c3b68d8..5946ced2f 100644
--- a/cpu/base_cpu.hh
+++ b/cpu/base_cpu.hh
@@ -81,27 +81,41 @@ class BaseCPU : public SimObject
#ifdef FULL_SYSTEM
BaseCPU(const std::string &_name, int _number_of_threads,
Counter max_insts_any_thread, Counter max_insts_all_threads,
+ Counter max_loads_any_thread, Counter max_loads_all_threads,
System *_system,
int num, Tick freq);
#else
BaseCPU(const std::string &_name, int _number_of_threads,
Counter max_insts_any_thread = 0,
- Counter max_insts_all_threads = 0);
+ Counter max_insts_all_threads = 0,
+ Counter max_loads_any_thread = 0,
+ Counter max_loads_all_threads = 0);
#endif
virtual ~BaseCPU() {}
virtual void regStats();
- /// Number of threads we're actually simulating (<= SMT_MAX_THREADS).
- /// This is a constant for the duration of the simulation.
+ /**
+ * Number of threads we're actually simulating (<= SMT_MAX_THREADS).
+ * This is a constant for the duration of the simulation.
+ */
int number_of_threads;
- /// Vector of per-thread instruction-based event queues. Used for
- /// scheduling events based on number of instructions committed by
- /// a particular thread.
+ /**
+ * Vector of per-thread instruction-based event queues. Used for
+ * scheduling events based on number of instructions committed by
+ * a particular thread.
+ */
EventQueue **comInsnEventQueue;
+ /**
+ * Vector of per-thread load-based event queues. Used for
+ * scheduling events based on number of loads committed by
+ *a particular thread.
+ */
+ EventQueue **comLoadEventQueue;
+
#ifdef FULL_SYSTEM
System *system;
#endif
@@ -109,7 +123,10 @@ class BaseCPU : public SimObject
virtual bool filterThisInstructionPrefetch(int thread_number,
short asid, Addr prefetchTarget) const { return true; }
- /// Return pointer to CPU's branch predictor (NULL if none).
+ /**
+ * Return pointer to CPU's branch predictor (NULL if none).
+ * @return Branch predictor pointer.
+ */
virtual BranchPred *getBranchPred() { return NULL; };
private: