summaryrefslogtreecommitdiff
path: root/src/sim/system.cc
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:50:09 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:50:09 -0400
commitefc06d0545912f4589e86fe32deac98805786ee6 (patch)
tree7655d0f658e0582d9985551d193811d8525d1fbc /src/sim/system.cc
parent1e4acb8e017ce81694c514af21ad817e9b1a078e (diff)
parente1b8e71500b7b66b115345eeaef7216617487456 (diff)
downloadgem5-efc06d0545912f4589e86fe32deac98805786ee6.tar.xz
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem src/python/m5/main.py: merge two help fixes --HG-- extra : convert_revision : b5c4a88bb84b726bebd3e357a4ef29acc0d95600
Diffstat (limited to 'src/sim/system.cc')
-rw-r--r--src/sim/system.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/sim/system.cc b/src/sim/system.cc
index 2780d0fda..ad70b9b03 100644
--- a/src/sim/system.cc
+++ b/src/sim/system.cc
@@ -63,7 +63,7 @@ System::System(Params *p)
#else
page_ptr(0),
#endif
- _params(p)
+ memoryMode(p->mem_mode), _params(p)
{
// add self to global system list
systemList.push_back(this);
@@ -257,6 +257,9 @@ printSystems()
System::printSystems();
}
+const char *System::MemoryModeStrings[3] = {"invalid", "atomic",
+ "timing"};
+
#if FULL_SYSTEM
// In full system mode, only derived classes (e.g. AlphaLinuxSystem)
@@ -269,12 +272,15 @@ DEFINE_SIM_OBJECT_CLASS_NAME("System", System)
BEGIN_DECLARE_SIM_OBJECT_PARAMS(System)
SimObjectParam<PhysicalMemory *> physmem;
+ SimpleEnumParam<System::MemoryMode> mem_mode;
END_DECLARE_SIM_OBJECT_PARAMS(System)
BEGIN_INIT_SIM_OBJECT_PARAMS(System)
- INIT_PARAM(physmem, "physical memory")
+ INIT_PARAM(physmem, "physical memory"),
+ INIT_ENUM_PARAM(mem_mode, "Memory Mode, (1=atomic, 2=timing)",
+ System::MemoryModeStrings)
END_INIT_SIM_OBJECT_PARAMS(System)
@@ -283,6 +289,7 @@ CREATE_SIM_OBJECT(System)
System::Params *p = new System::Params;
p->name = getInstanceName();
p->physmem = physmem;
+ p->mem_mode = mem_mode;
return new System(p);
}