From 4134477369028e04dd265a43753868c01912c465 Mon Sep 17 00:00:00 2001 From: Erik Hallnor Date: Thu, 16 Oct 2003 17:04:18 -0400 Subject: 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 --- cpu/base_cpu.hh | 31 ++++++++++++++++++++++++------- 1 file changed, 24 insertions(+), 7 deletions(-) (limited to 'cpu/base_cpu.hh') 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: -- cgit v1.2.3