diff options
author | Ali Saidi <saidi@eecs.umich.edu> | 2006-07-19 17:59:04 -0400 |
---|---|---|
committer | Ali Saidi <saidi@eecs.umich.edu> | 2006-07-19 17:59:04 -0400 |
commit | 15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a (patch) | |
tree | 610a888b2de5d25c166f65819d8ad3058d13723c /src/sim/sim_object.cc | |
parent | b36796914af8bfc6729cc8a519e57572460e43e8 (diff) | |
parent | 6175f712b3216f3e5387b07d9c41c1931c09acd9 (diff) | |
download | gem5-15e5ce96c76a20b9b27e5f7d7ed29e962422ad1a.tar.xz |
Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem.head
--HG--
extra : convert_revision : 8c747208d72ffbb0160a2ad4a75383420debdf83
Diffstat (limited to 'src/sim/sim_object.cc')
-rw-r--r-- | src/sim/sim_object.cc | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/src/sim/sim_object.cc b/src/sim/sim_object.cc index 551555b25..d12b06b7a 100644 --- a/src/sim/sim_object.cc +++ b/src/sim/sim_object.cc @@ -37,7 +37,6 @@ #include "base/misc.hh" #include "base/trace.hh" #include "base/stats/events.hh" -#include "base/serializer.hh" #include "sim/host.hh" #include "sim/sim_object.hh" #include "sim/stats.hh" @@ -73,7 +72,7 @@ SimObject::SimObject(Params *p) doRecordEvent = !Stats::event_ignore.match(name()); simObjectList.push_back(this); - state = Atomic; + state = Running; } // @@ -89,7 +88,7 @@ SimObject::SimObject(const string &_name) doRecordEvent = !Stats::event_ignore.match(name()); simObjectList.push_back(this); - state = Atomic; + state = Running; } void @@ -270,38 +269,23 @@ SimObject::recordEvent(const std::string &stat) Stats::recordEvent(stat); } -bool -SimObject::quiesce(Event *quiesce_event) +unsigned int +SimObject::drain(Event *drain_event) { - if (state != QuiescedAtomic && state != Atomic) { - panic("Must implement your own quiesce function if it is to be used " - "in timing mode!"); - } - state = QuiescedAtomic; - return false; + state = Drained; + return 0; } void SimObject::resume() { - if (state == QuiescedAtomic) { - state = Atomic; - } else if (state == QuiescedTiming) { - state = Timing; - } + state = Running; } void SimObject::setMemoryMode(State new_mode) { - assert(new_mode == Timing || new_mode == Atomic); - if (state == QuiescedAtomic && new_mode == Timing) { - state = QuiescedTiming; - } else if (state == QuiescedTiming && new_mode == Atomic) { - state = QuiescedAtomic; - } else { - state = new_mode; - } + panic("setMemoryMode() should only be called on systems"); } void |