diff options
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/o3/decode_impl.hh | 3 | ||||
-rw-r--r-- | src/cpu/o3/fetch_impl.hh | 4 | ||||
-rw-r--r-- | src/cpu/o3/iew_impl.hh | 1 | ||||
-rw-r--r-- | src/cpu/o3/rename_impl.hh | 3 |
4 files changed, 8 insertions, 3 deletions
diff --git a/src/cpu/o3/decode_impl.hh b/src/cpu/o3/decode_impl.hh index 4ff82da8e..ca56ac1e4 100644 --- a/src/cpu/o3/decode_impl.hh +++ b/src/cpu/o3/decode_impl.hh @@ -209,7 +209,8 @@ bool DefaultDecode<Impl>::isDrained() const { for (ThreadID tid = 0; tid < numThreads; ++tid) { - if (!insts[tid].empty() || !skidBuffer[tid].empty()) + if (!insts[tid].empty() || !skidBuffer[tid].empty() || + (decodeStatus[tid] != Running && decodeStatus[tid] != Idle)) return false; } return true; diff --git a/src/cpu/o3/fetch_impl.hh b/src/cpu/o3/fetch_impl.hh index 3b29d87d4..7631b4c6a 100644 --- a/src/cpu/o3/fetch_impl.hh +++ b/src/cpu/o3/fetch_impl.hh @@ -424,8 +424,10 @@ template <class Impl> void DefaultFetch<Impl>::drainResume() { - for (ThreadID i = 0; i < numThreads; ++i) + for (ThreadID i = 0; i < numThreads; ++i) { + stalls[i].decode = false; stalls[i].drain = false; + } } template <class Impl> diff --git a/src/cpu/o3/iew_impl.hh b/src/cpu/o3/iew_impl.hh index e02429b14..78b83eba6 100644 --- a/src/cpu/o3/iew_impl.hh +++ b/src/cpu/o3/iew_impl.hh @@ -391,6 +391,7 @@ DefaultIEW<Impl>::isDrained() const DPRINTF(Drain, "%i: Skid buffer not empty.\n", tid); drained = false; } + drained = drained && dispatchStatus[tid] == Running; } // Also check the FU pool as instructions are "stored" in FU diff --git a/src/cpu/o3/rename_impl.hh b/src/cpu/o3/rename_impl.hh index b6ab4cc3a..00179faae 100644 --- a/src/cpu/o3/rename_impl.hh +++ b/src/cpu/o3/rename_impl.hh @@ -304,7 +304,8 @@ DefaultRename<Impl>::isDrained() const if (instsInProgress[tid] != 0 || !historyBuffer[tid].empty() || !skidBuffer[tid].empty() || - !insts[tid].empty()) + !insts[tid].empty() || + (renameStatus[tid] != Idle && renameStatus[tid] != Running)) return false; } return true; |