changeset cc7a6660c8b7 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=cc7a6660c8b7
description:
        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.

diffstat:

 src/mem/simple_dram.cc |  7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diffs (17 lines):

diff -r 3f70fc65b14c -r cc7a6660c8b7 src/mem/simple_dram.cc
--- a/src/mem/simple_dram.cc    Fri Mar 01 13:20:32 2013 -0500
+++ b/src/mem/simple_dram.cc    Fri Mar 01 13:20:33 2013 -0500
@@ -396,8 +396,11 @@
     }
 
     // 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
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to