summaryrefslogtreecommitdiff
path: root/src/cpu/base.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2008-08-11 12:22:16 -0700
committerNathan Binkert <nate@binkert.org>2008-08-11 12:22:16 -0700
commitee62a0fec8e63f45f816c61ab9fb28aba7414185 (patch)
treea66f43493f7d7eacbd2ee0d3351bab6a50639447 /src/cpu/base.hh
parent3448a122085797a902e776f47bfe69a078bfca5e (diff)
downloadgem5-ee62a0fec8e63f45f816c61ab9fb28aba7414185.tar.xz
params: Convert the CPU objects to use the auto generated param structs.
A whole bunch of stuff has been converted to use the new params stuff, but the CPU wasn't one of them. While we're at it, make some things a bit more stylish. Most of the work was done by Gabe, I just cleaned stuff up a bit more at the end.
Diffstat (limited to 'src/cpu/base.hh')
-rw-r--r--src/cpu/base.hh40
1 files changed, 6 insertions, 34 deletions
diff --git a/src/cpu/base.hh b/src/cpu/base.hh
index bdc7d7c8b..6e9e1dc39 100644
--- a/src/cpu/base.hh
+++ b/src/cpu/base.hh
@@ -45,6 +45,7 @@
#include "arch/interrupts.hh"
#endif
+class BaseCPUParams;
class BranchPred;
class CheckerCPU;
class ThreadContext;
@@ -162,40 +163,9 @@ class BaseCPU : public MemObject
ThreadContext *getContext(int tn) { return threadContexts[tn]; }
public:
- struct Params
- {
- std::string name;
- int numberOfThreads;
- bool deferRegistration;
- Counter max_insts_any_thread;
- Counter max_insts_all_threads;
- Counter max_loads_any_thread;
- Counter max_loads_all_threads;
- Tick clock;
- bool functionTrace;
- Tick functionTraceStart;
- System *system;
- int cpu_id;
- Trace::InstTracer * tracer;
-
- Tick phase;
-#if FULL_SYSTEM
- Tick profile;
-
- bool do_statistics_insts;
- bool do_checkpoint_insts;
- bool do_quiesce;
-#endif
- Tick progress_interval;
- BaseCPU *checker;
-
- TheISA::CoreSpecific coreParams; //ISA-Specific Params That Set Up State in Core
-
- Params();
- };
-
- const Params *params;
-
+ typedef BaseCPUParams Params;
+ const Params *params() const
+ { return reinterpret_cast<const Params *>(_params); }
BaseCPU(Params *params);
virtual ~BaseCPU();
@@ -221,6 +191,8 @@ class BaseCPU : public MemObject
*/
int number_of_threads;
+ TheISA::CoreSpecific coreParams; //ISA-Specific Params That Set Up State in Core
+
/**
* Vector of per-thread instruction-based event queues. Used for
* scheduling events based on number of instructions committed by