Skip to content

Commit

Permalink
cpu: fix case with o3 cpu blocking and unblocking decode in cycle
Browse files Browse the repository at this point in the history
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
Ali Saidi authored and Ali Saidi committed Feb 15, 2013
1 parent b84bd30 commit 7ae06a3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/cpu/o3/decode_impl.hh
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ DefaultDecode<Impl>::block(ThreadID tid)
// Set the status to Blocked. // Set the status to Blocked.
decodeStatus[tid] = Blocked; decodeStatus[tid] = Blocked;


if (decodeStatus[tid] != Unblocking) { if (toFetch->decodeUnblock[tid]) {
toFetch->decodeUnblock[tid] = false;
} else {
toFetch->decodeBlock[tid] = true; toFetch->decodeBlock[tid] = true;
wroteToTimeBuffer = true; wroteToTimeBuffer = true;
} }
Expand Down

0 comments on commit 7ae06a3

Please sign in to comment.