summaryrefslogtreecommitdiff
path: root/src/cpu/simple/timing.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/cpu/simple/timing.hh')
-rw-r--r--src/cpu/simple/timing.hh7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cpu/simple/timing.hh b/src/cpu/simple/timing.hh
index cab2057ea..52807ba08 100644
--- a/src/cpu/simple/timing.hh
+++ b/src/cpu/simple/timing.hh
@@ -320,11 +320,14 @@ class TimingSimpleCPU : public BaseSimpleCPU
* of a gem5 microcode sequence.
*
* <li>Stay at PC is true.
+ *
+ * <li>A fetch event is scheduled. Normally this would never be the
+ case with microPC() == 0, but right after a context is
+ activated it can happen.
* </ul>
*/
bool isDrained() {
- return microPC() == 0 &&
- !stayAtPC;
+ return microPC() == 0 && !stayAtPC && !fetchEvent.scheduled();
}
/**