diff options
author | Kevin Lim <ktlim@umich.edu> | 2006-06-29 19:45:24 -0400 |
---|---|---|
committer | Kevin Lim <ktlim@umich.edu> | 2006-06-29 19:45:24 -0400 |
commit | 2416ba606aed95098ce8e43f813fa57dd9f91974 (patch) | |
tree | c68ecce7b7699953f5d5cd8e85eb1365606e52bb /src/cpu/simple/atomic.cc | |
parent | f64c175f9ae81be3c002a82ea14a2844a7ee100e (diff) | |
download | gem5-2416ba606aed95098ce8e43f813fa57dd9f91974.tar.xz |
Various fixes for the CPU models to support the features that have been moved to python.
src/cpu/base.cc:
src/cpu/base.hh:
src/cpu/simple/atomic.hh:
Switching out no longer takes a sampler.
src/cpu/simple/atomic.cc:
Fix up switching out. Also fix up serialization; the nameOut() was messing up the ordering.
src/cpu/simple/timing.cc:
Add in quiesce, fix up serialization.
src/cpu/simple/timing.hh:
Add in queisce, fix up serialization.
--HG--
extra : convert_revision : 9d59d53bdf269d4d82fb119e5ae7c8a5d475880b
Diffstat (limited to 'src/cpu/simple/atomic.cc')
-rw-r--r-- | src/cpu/simple/atomic.cc | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc index 071193f02..7be74e97e 100644 --- a/src/cpu/simple/atomic.cc +++ b/src/cpu/simple/atomic.cc @@ -145,8 +145,8 @@ AtomicSimpleCPU::~AtomicSimpleCPU() void AtomicSimpleCPU::serialize(ostream &os) { - BaseSimpleCPU::serialize(os); SERIALIZE_ENUM(_status); + BaseSimpleCPU::serialize(os); nameOut(os, csprintf("%s.tickEvent", name())); tickEvent.serialize(os); } @@ -154,21 +154,18 @@ AtomicSimpleCPU::serialize(ostream &os) void AtomicSimpleCPU::unserialize(Checkpoint *cp, const string §ion) { - BaseSimpleCPU::unserialize(cp, section); UNSERIALIZE_ENUM(_status); + BaseSimpleCPU::unserialize(cp, section); tickEvent.unserialize(cp, csprintf("%s.tickEvent", section)); } void -AtomicSimpleCPU::switchOut(Sampler *s) +AtomicSimpleCPU::switchOut() { - sampler = s; - if (status() == Running) { - _status = SwitchedOut; + assert(status() == Running || status() == Idle); + _status = SwitchedOut; - tickEvent.squash(); - } - sampler->signalSwitched(); + tickEvent.squash(); } |