From ad296b068cf4a0b043988be518994ac6bd7582f0 Mon Sep 17 00:00:00 2001 From: Rekai Gonzalez-Alberquilla Date: Thu, 22 Sep 2016 10:49:10 +0100 Subject: cpu: Fix the O3 CPU Drain The drain did not wait until stages were ready again. Therefore, as a result of messages in the TimeBuffer being drain, the state after the drain was not consistent and asserts fired in some places when the draining happened after a stage got blocked, but before the notification arrived to the previous stages. Change-Id: Ib50b3b40b7f745b62c1eba2931dec76860824c71 Reviewed-by: Andreas Sandberg --- src/cpu/o3/decode_impl.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/cpu/o3/decode_impl.hh') 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::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; -- cgit v1.2.3