diff options
-rw-r--r-- | src/cpu/minor/decode.cc | 4 | ||||
-rw-r--r-- | src/cpu/minor/execute.cc | 10 | ||||
-rw-r--r-- | src/cpu/minor/fetch2.cc | 4 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/cpu/minor/decode.cc b/src/cpu/minor/decode.cc index 390ca5f11..94d3dec03 100644 --- a/src/cpu/minor/decode.cc +++ b/src/cpu/minor/decode.cc @@ -314,7 +314,9 @@ Decode::getScheduledThread() } for (auto tid : priority_list) { - if (getInput(tid) && !decodeInfo[tid].blocked) { + if (cpu.getContext(tid)->status() == ThreadContext::Active && + getInput(tid) && + !decodeInfo[tid].blocked) { threadPriority = tid; return tid; } diff --git a/src/cpu/minor/execute.cc b/src/cpu/minor/execute.cc index 93c0895ac..d7cb475c6 100644 --- a/src/cpu/minor/execute.cc +++ b/src/cpu/minor/execute.cc @@ -1676,7 +1676,12 @@ Execute::getCommittingThread() for (auto tid : priority_list) { ExecuteThreadInfo &ex_info = executeInfo[tid]; - bool can_commit_insts = !ex_info.inFlightInsts->empty(); + + bool is_thread_active = + cpu.getContext(tid)->status() == ThreadContext::Active; + bool can_commit_insts = !ex_info.inFlightInsts->empty() && + is_thread_active; + if (can_commit_insts) { QueuedInst *head_inflight_inst = &(ex_info.inFlightInsts->front()); MinorDynInstPtr inst = head_inflight_inst->inst; @@ -1742,7 +1747,8 @@ Execute::getIssuingThread() } for (auto tid : priority_list) { - if (getInput(tid)) { + if (cpu.getContext(tid)->status() == ThreadContext::Active && + getInput(tid)) { issuePriority = tid; return tid; } diff --git a/src/cpu/minor/fetch2.cc b/src/cpu/minor/fetch2.cc index 09a06fc24..180890147 100644 --- a/src/cpu/minor/fetch2.cc +++ b/src/cpu/minor/fetch2.cc @@ -584,7 +584,9 @@ Fetch2::getScheduledThread() } for (auto tid : priority_list) { - if (getInput(tid) && !fetchInfo[tid].blocked) { + if (cpu.getContext(tid)->status() == ThreadContext::Active && + getInput(tid) && + !fetchInfo[tid].blocked) { threadPriority = tid; return tid; } |