diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-03-10 10:01:29 -0500 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-03-10 10:01:29 -0500 |
commit | e3d96aa889680469be44bb9cd59d3db837cb4dc4 (patch) | |
tree | 5dbb9b1342e4e9cc0a86b36687e17e41b15f8a9a /sim | |
parent | f102365bfe14d25e40fb6d5cbd184138c0593c55 (diff) | |
download | gem5-e3d96aa889680469be44bb9cd59d3db837cb4dc4.tar.xz |
Compiles now (with CPU_MODELS=SimpleCPU), but hangs
on execution.
configs/test/test.py:
Move test binary out of m5-test, don't depend on
m5-test/Benchmarks.
python/m5/objects/System.py:
Split out full-system-only parameters (lost in merge).
sim/system.cc:
Need to be able to instantiate System directly in SE mode
(lost in merge).
sim/system.hh:
A few more functions here are FS-only.
configs/test/hello:
Add in binary.
--HG--
rename : configs/test.py => configs/test/test.py
extra : convert_revision : 4051b18772e0a0dcb97eb591d4373683be9f4395
Diffstat (limited to 'sim')
-rw-r--r-- | sim/system.cc | 30 | ||||
-rw-r--r-- | sim/system.hh | 2 |
2 files changed, 31 insertions, 1 deletions
diff --git a/sim/system.cc b/sim/system.cc index f1d0579d7..05b41e32b 100644 --- a/sim/system.cc +++ b/sim/system.cc @@ -217,5 +217,35 @@ printSystems() System::printSystems(); } +#if FULL_SYSTEM + +// In full system mode, only derived classes (e.g. AlphaLinuxSystem) +// can be created directly. + DEFINE_SIM_OBJECT_CLASS_NAME("System", System) +#else + +BEGIN_DECLARE_SIM_OBJECT_PARAMS(System) + + SimObjectParam<Memory *> physmem; + +END_DECLARE_SIM_OBJECT_PARAMS(System) + +BEGIN_INIT_SIM_OBJECT_PARAMS(System) + + INIT_PARAM(physmem, "physical memory") + +END_INIT_SIM_OBJECT_PARAMS(System) + +CREATE_SIM_OBJECT(System) +{ + System::Params *p = new System::Params; + p->name = getInstanceName(); + p->physmem = physmem; + return new System(p); +} + +REGISTER_SIM_OBJECT("System", System) + +#endif diff --git a/sim/system.hh b/sim/system.hh index cbe876c42..0d5b40e3d 100644 --- a/sim/system.hh +++ b/sim/system.hh @@ -101,6 +101,7 @@ class System : public SimObject protected: +#if FULL_SYSTEM /** * Fix up an address used to match PCs for hooking simulator * events on to target function executions. See comment in @@ -125,7 +126,6 @@ class System : public SimObject return NULL; } -#if FULL_SYSTEM /** Add a function-based event to kernel code. */ template <class T> T *System::addKernelFuncEvent(const char *lbl) |