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.
}
// 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