From 8acecfef9b0e9a1c34b338a6862a3cc38b2f490b Mon Sep 17 00:00:00 2001 From: Lisa Hsu Date: Wed, 11 Oct 2006 18:53:50 -0400 Subject: since memoryMode was put into the System (from SimObject), things got broken - this fixes it so that changeToTiming/changeToAtomic works. src/python/m5/SimObject.py: now that setMemoryMode is a method in System, need to convert the SimObject * _ccObject into a system ptr to call setMemoryMode. src/sim/main.cc: need this conversion now. src/sim/sim_object.hh: put the enum back into SimObject. src/sim/system.hh: memoryMode is now a part of SimObject, need the ::'s --HG-- extra : convert_revision : 0ade06957fa57b497798e1f50c237ca1badc821d --- src/sim/system.hh | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'src/sim/system.hh') diff --git a/src/sim/system.hh b/src/sim/system.hh index 3ab1d81f2..827fe5c78 100644 --- a/src/sim/system.hh +++ b/src/sim/system.hh @@ -62,22 +62,16 @@ class RemoteGDB; class System : public SimObject { public: - enum MemoryMode { - Invalid=0, - Atomic, - Timing - }; static const char *MemoryModeStrings[3]; - - MemoryMode getMemoryMode() { assert(memoryMode); return memoryMode; } + SimObject::MemoryMode getMemoryMode() { assert(memoryMode); return memoryMode; } /** Change the memory mode of the system. This should only be called by the * python!! * @param mode Mode to change to (atomic/timing) */ - void setMemoryMode(MemoryMode mode); + void setMemoryMode(SimObject::MemoryMode mode); PhysicalMemory *physmem; PCEventQueue pcEventQueue; @@ -126,7 +120,7 @@ class System : public SimObject protected: - MemoryMode memoryMode; + SimObject::MemoryMode memoryMode; #if FULL_SYSTEM /** @@ -173,7 +167,7 @@ class System : public SimObject { std::string name; PhysicalMemory *physmem; - MemoryMode mem_mode; + SimObject::MemoryMode mem_mode; #if FULL_SYSTEM Tick boot_cpu_frequency; -- cgit v1.2.3