mem: Add check if SimpleDRAM nextReqEvent is scheduled

This check covers a case where a retry is called from the SimpleDRAM
causing a new request to appear before the DRAM itself schedules a
nextReqEvent. By adding this check, the event is not scheduled twice.
This commit is contained in:
Andreas Hansson 2013-03-01 13:20:33 -05:00
parent da5356ccce
commit e5bcb30756

View file

@ -396,8 +396,11 @@ SimpleDRAM::processWriteEvent()
}
// Once you're done emptying the write queue, check if there's
// anything in the read queue, and call schedule if required
schedule(nextReqEvent, busBusyUntil);
// anything in the read queue, and call schedule if required. The
// retry above could already have caused it to be scheduled, so
// first check
if (!nextReqEvent.scheduled())
schedule(nextReqEvent, busBusyUntil);
}
void