cpu: fix case with o3 cpu blocking and unblocking decode in cycle
authorAli Saidi <Ali.Saidi@ARM.com>
Fri, 15 Feb 2013 22:40:08 +0000 (17:40 -0500)
committerAli Saidi <Ali.Saidi@ARM.com>
Fri, 15 Feb 2013 22:40:08 +0000 (17:40 -0500)
Fix a case in the O3 CPU where the decode stage blocks and unblocks in a
single cycle sending both signals to fetch which causes an assert or worse.
The previous check could never work before since the status was set to Blocked
before a test for the status being Unblocking was executed.

src/cpu/o3/decode_impl.hh

index cd226017f79c8f20ef6454ede1e7dc8a25cbd303..f87ec0bfaa6662edd248ac2cc4d606733665467f 100644 (file)
@@ -241,7 +241,9 @@ DefaultDecode<Impl>::block(ThreadID tid)
         // Set the status to Blocked.
         decodeStatus[tid] = Blocked;
 
-        if (decodeStatus[tid] != Unblocking) {
+        if (toFetch->decodeUnblock[tid]) {
+            toFetch->decodeUnblock[tid] = false;
+        } else {
             toFetch->decodeBlock[tid] = true;
             wroteToTimeBuffer = true;
         }