diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2006-12-16 07:35:56 -0500 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2006-12-16 07:35:56 -0500 |
commit | c6944e320cfa86d3f2ce628457aff4bc431e7189 (patch) | |
tree | c8752f8f6d8fbf92d2417c4fb958096303dfbcdc /src/cpu | |
parent | 244506ae12d079e012ec40fe85b68f54d3fd91c6 (diff) | |
download | gem5-c6944e320cfa86d3f2ce628457aff4bc431e7189.tar.xz |
Add in capability to return to unblocking after a squash. This is needed because if you don't squash -all- the instructions, you need to keep clearing out whatever is left in the skid buffer.
--HG--
extra : convert_revision : 7308eda27f4366348cf5fce71ddfa4b217bc172d
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/o3/rename.hh | 4 | ||||
-rw-r--r-- | src/cpu/o3/rename_impl.hh | 44 |
2 files changed, 40 insertions, 8 deletions
diff --git a/src/cpu/o3/rename.hh b/src/cpu/o3/rename.hh index 1ede6f355..6b4628f92 100644 --- a/src/cpu/o3/rename.hh +++ b/src/cpu/o3/rename.hh @@ -415,6 +415,10 @@ class DefaultRename * after squashing. */ bool resumeSerialize; + /** Whether or not rename needs to resume clearing out the skidbuffer + * after squashing. */ + bool resumeUnblocking; + /** The number of threads active in rename. */ unsigned numThreads; diff --git a/src/cpu/o3/rename_impl.hh b/src/cpu/o3/rename_impl.hh index 0c211b183..7a7234965 100644 --- a/src/cpu/o3/rename_impl.hh +++ b/src/cpu/o3/rename_impl.hh @@ -44,6 +44,7 @@ DefaultRename<Impl>::DefaultRename(Params *params) renameWidth(params->renameWidth), commitWidth(params->commitWidth), resumeSerialize(false), + resumeUnblocking(false), numThreads(params->numberOfThreads), maxPhysicalRegs(params->numPhysIntRegs + params->numPhysFloatRegs) { @@ -405,6 +406,9 @@ DefaultRename<Impl>::squash(const InstSeqNum &squash_seq_num, unsigned tid) } slist_it++; } + resumeUnblocking = (skidBuffer[tid].size() != 0); + DPRINTF(Rename, "Resume unblocking set to %s\n", + resumeUnblocking ? "true" : "false"); #else skidBuffer[tid].clear(); #endif @@ -496,6 +500,12 @@ DefaultRename<Impl>::rename(bool &status_change, unsigned tid) block(tid); toDecode->renameUnblock[tid] = false; } + } else if (renameStatus[tid] == Unblocking) { + if (resumeUnblocking) { + block(tid); + resumeUnblocking = false; + toDecode->renameUnblock[tid] = false; + } } if (renameStatus[tid] == Running || @@ -761,7 +771,17 @@ DefaultRename<Impl>::skidInsert(unsigned tid) } if (skidBuffer[tid].size() > skidBufferMax) + { + typename InstQueue::iterator it; + warn("Skidbuffer contents:\n"); + for(it = skidBuffer[tid].begin(); it != skidBuffer[tid].end(); it++) + { + warn("[tid:%u]: %s [sn:%i].\n", tid, + (*it)->staticInst->disassemble(inst->readPC()), + (*it)->seqNum); + } panic("Skidbuffer Exceeded Max Size"); + } } template <class Impl> @@ -848,7 +868,10 @@ DefaultRename<Impl>::block(unsigned tid) // Only signal backwards to block if the previous stages do not think // rename is already blocked. if (renameStatus[tid] != Blocked) { - if (renameStatus[tid] != Unblocking) { + // If resumeUnblocking is set, we unblocked during the squash, + // but now we're have unblocking status. We need to tell earlier + // stages to block. + if (resumeUnblocking || renameStatus[tid] != Unblocking) { toDecode->renameBlock[tid] = true; toDecode->renameUnblock[tid] = false; wroteToTimeBuffer = true; @@ -1264,18 +1287,23 @@ DefaultRename<Impl>::checkSignalsAndUpdate(unsigned tid) if (renameStatus[tid] == Squashing) { // Switch status to running if rename isn't being told to block or // squash this cycle. - if (!resumeSerialize) { - DPRINTF(Rename, "[tid:%u]: Done squashing, switching to running.\n", - tid); - - renameStatus[tid] = Running; - return false; - } else { + if (resumeSerialize) { DPRINTF(Rename, "[tid:%u]: Done squashing, switching to serialize.\n", tid); renameStatus[tid] = SerializeStall; return true; + } else if (resumeUnblocking) { + DPRINTF(Rename, "[tid:%u]: Done squashing, switching to unblocking.\n", + tid); + renameStatus[tid] = Unblocking; + return true; + } else { + DPRINTF(Rename, "[tid:%u]: Done squashing, switching to running.\n", + tid); + + renameStatus[tid] = Running; + return false; } } |