Skip to content
Browse files

cpu: fix case with o3 cpu blocking and unblocking decode in cycle

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.
  • Loading branch information...
1 parent b84bd30 commit 7ae06a3b3bb6c5438cd9cac7f1fe5f8cdb65e07d @AGSaidi AGSaidi committed
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/cpu/o3/decode_impl.hh
4 src/cpu/o3/decode_impl.hh
@@ -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;

0 comments on commit 7ae06a3

Please sign in to comment.
Something went wrong with that request. Please try again.