diff options
author | Andreas Hansson <andreas.hansson@arm.com> | 2013-03-01 13:20:33 -0500 |
---|---|---|
committer | Andreas Hansson <andreas.hansson@arm.com> | 2013-03-01 13:20:33 -0500 |
commit | e5bcb3075615d2dade3e51501d3f634178598428 (patch) | |
tree | ec594725dd31281af0ab8f738120fa83ba3f92b8 /src/mem | |
parent | da5356cccea52dfc49ce2adf07049b2ac9dea7b9 (diff) | |
download | gem5-e5bcb3075615d2dade3e51501d3f634178598428.tar.xz |
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 (limited to 'src/mem')
-rw-r--r-- | src/mem/simple_dram.cc | 7 |
1 files 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 |