Don't insert reponses into the list more than once
If you get inserted in the front, reschedule the event --HG-- extra : convert_revision : eccbacf5ec85600e5b68eb554fee2c0e2b65e965
This commit is contained in:
parent
11accacf7c
commit
29cefcbf13
2 changed files with 29 additions and 5 deletions
24
src/mem/cache/base_cache.hh
vendored
24
src/mem/cache/base_cache.hh
vendored
|
@ -571,9 +571,15 @@ class BaseCache : public MemObject
|
|||
bool done = false;
|
||||
|
||||
while (i != end && !done) {
|
||||
if (time < i->first)
|
||||
if (time < i->first) {
|
||||
if (i == cpuSidePort->transmitList.begin()) {
|
||||
//Inserting at begining, reschedule
|
||||
sendEvent->reschedule(time);
|
||||
}
|
||||
cpuSidePort->transmitList.insert(i,std::pair<Tick,PacketPtr>
|
||||
(time,pkt));
|
||||
done = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -624,9 +630,15 @@ class BaseCache : public MemObject
|
|||
bool done = false;
|
||||
|
||||
while (i != end && !done) {
|
||||
if (time < i->first)
|
||||
if (time < i->first) {
|
||||
if (i == cpuSidePort->transmitList.begin()) {
|
||||
//Inserting at begining, reschedule
|
||||
sendEvent->reschedule(time);
|
||||
}
|
||||
cpuSidePort->transmitList.insert(i,std::pair<Tick,PacketPtr>
|
||||
(time,pkt));
|
||||
done = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
@ -672,8 +684,14 @@ class BaseCache : public MemObject
|
|||
bool done = false;
|
||||
|
||||
while (i != end && !done) {
|
||||
if (time < i->first)
|
||||
if (time < i->first) {
|
||||
if (i == memSidePort->transmitList.begin()) {
|
||||
//Inserting at begining, reschedule
|
||||
memSendEvent->reschedule(time);
|
||||
}
|
||||
memSidePort->transmitList.insert(i,std::pair<Tick,PacketPtr>(time,pkt));
|
||||
done = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -118,8 +118,14 @@ SimpleTimingPort::sendTiming(PacketPtr pkt, Tick time)
|
|||
bool done = false;
|
||||
|
||||
while (i != end && !done) {
|
||||
if (time+curTick < i->first)
|
||||
if (time+curTick < i->first) {
|
||||
if (i == transmitList.begin()) {
|
||||
//Inserting at begining, reschedule
|
||||
sendEvent.reschedule(time+curTick);
|
||||
}
|
||||
transmitList.insert(i,std::pair<Tick,PacketPtr>(time+curTick,pkt));
|
||||
done = true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue