From e5bcb3075615d2dade3e51501d3f634178598428 Mon Sep 17 00:00:00 2001 From: Andreas Hansson Date: Fri, 1 Mar 2013 13:20:33 -0500 Subject: [PATCH] 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. --- src/mem/simple_dram.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/mem/simple_dram.cc b/src/mem/simple_dram.cc index 340a57088..90517ec62 100644 --- a/src/mem/simple_dram.cc +++ b/src/mem/simple_dram.cc @@ -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 -- 2.30.2