summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/memtest/memtest.cc13
-rw-r--r--src/cpu/o3/fetch_impl.hh2
-rw-r--r--src/cpu/simple/atomic.cc2
-rw-r--r--src/cpu/simple/timing.cc3
4 files changed, 15 insertions, 5 deletions
diff --git a/src/cpu/memtest/memtest.cc b/src/cpu/memtest/memtest.cc
index f42f0f8e2..024cd7e41 100644
--- a/src/cpu/memtest/memtest.cc
+++ b/src/cpu/memtest/memtest.cc
@@ -360,7 +360,11 @@ MemTest::tick()
//For now we only allow one outstanding request per addreess per tester
//This means we assume CPU does write forwarding to reads that alias something
//in the cpu store buffer.
- if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) return;
+ if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) {
+ delete result;
+ delete req;
+ return;
+ }
else outstandingAddrs.insert(paddr);
// ***** NOTE FOR RON: I'm not sure how to access checkMem. - Kevin
@@ -395,7 +399,12 @@ MemTest::tick()
//For now we only allow one outstanding request per addreess per tester
//This means we assume CPU does write forwarding to reads that alias something
//in the cpu store buffer.
- if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) return;
+ if (outstandingAddrs.find(paddr) != outstandingAddrs.end()) {
+ delete [] result;
+ delete req;
+ return;
+ }
+
else outstandingAddrs.insert(paddr);
/*
diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh
index 072580af7..147c670de 100644
--- a/src/cpu/o3/fetch_impl.hh
+++ b/src/cpu/o3/fetch_impl.hh
@@ -1285,8 +1285,8 @@ template<class Impl>
void
DefaultFetch<Impl>::recvRetry()
{
- assert(cacheBlocked);
if (retryPkt != NULL) {
+ assert(cacheBlocked);
assert(retryTid != -1);
assert(fetchStatus[retryTid] == IcacheWaitRetry);
diff --git a/src/cpu/simple/atomic.cc b/src/cpu/simple/atomic.cc
index 490be20ae..fe421ae6c 100644
--- a/src/cpu/simple/atomic.cc
+++ b/src/cpu/simple/atomic.cc
@@ -182,9 +182,9 @@ AtomicSimpleCPU::unserialize(Checkpoint *cp, const string &section)
void
AtomicSimpleCPU::resume()
{
- assert(system->getMemoryMode() == System::Atomic);
changeState(SimObject::Running);
if (thread->status() == ThreadContext::Active) {
+ assert(system->getMemoryMode() == System::Atomic);
if (!tickEvent.scheduled())
tickEvent.schedule(curTick);
}
diff --git a/src/cpu/simple/timing.cc b/src/cpu/simple/timing.cc
index 33f673cbc..ad5c0e5d6 100644
--- a/src/cpu/simple/timing.cc
+++ b/src/cpu/simple/timing.cc
@@ -147,6 +147,8 @@ void
TimingSimpleCPU::resume()
{
if (_status != SwitchedOut && _status != Idle) {
+ assert(system->getMemoryMode() == System::Timing);
+
// Delete the old event if it existed.
if (fetchEvent) {
if (fetchEvent->scheduled())
@@ -160,7 +162,6 @@ TimingSimpleCPU::resume()
fetchEvent->schedule(curTick);
}
- assert(system->getMemoryMode() == System::Timing);
changeState(SimObject::Running);
previousTick = curTick;
}