diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-23 19:09:18 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2003-10-23 19:09:18 -0700 |
commit | cc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb (patch) | |
tree | 1bae8b1b09fcc39d04631c84beaf51f830938372 /cpu/base_cpu.hh | |
parent | 320540829d62f9c5a5290a8c9bd991fda297a210 (diff) | |
parent | 6e2fc8ce766d1f9cb601b4a2a15d1ba294ce97a5 (diff) | |
download | gem5-cc9a838f4c5a5bf5e8951bdb351fc7d4b74661fb.tar.xz |
Merge stever@zizzer:/bk/m5 into isabel.reinhardt.house:/z/stever/bk/m5
--HG--
extra : convert_revision : b0f93bd35d767fd3a520a9fed70a71d40b0056db
Diffstat (limited to 'cpu/base_cpu.hh')
-rw-r--r-- | cpu/base_cpu.hh | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/cpu/base_cpu.hh b/cpu/base_cpu.hh index e5d9df6de..5a20aaa54 100644 --- a/cpu/base_cpu.hh +++ b/cpu/base_cpu.hh @@ -47,7 +47,6 @@ class BaseCPU : public SimObject { #ifdef FULL_SYSTEM protected: - int number; Tick frequency; uint8_t interrupts[NumInterruptLevels]; uint64_t intstatus; @@ -71,7 +70,7 @@ class BaseCPU : public SimObject #endif protected: - std::vector<ExecContext *> contexts; + std::vector<ExecContext *> execContexts; public: virtual void execCtxStatusChg() {} @@ -82,8 +81,7 @@ class BaseCPU : public SimObject 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); + System *_system, Tick freq); #else BaseCPU(const std::string &_name, int _number_of_threads, Counter max_insts_any_thread = 0, @@ -96,6 +94,16 @@ class BaseCPU : public SimObject virtual void regStats(); + virtual void registerExecContexts(); + + /// Prepare for another CPU to take over execution. Called by + /// takeOverFrom() on its argument. + virtual void switchOut(); + + /// Take over execution from the given CPU. Used for warm-up and + /// sampling. + virtual void takeOverFrom(BaseCPU *); + /** * Number of threads we're actually simulating (<= SMT_MAX_THREADS). * This is a constant for the duration of the simulation. |