diff -r 5ba95cf70567 -r 8a4cd39136a0 src/cpu/o3/rename.hh --- a/src/cpu/o3/rename.hh Fri May 13 14:28:16 2011 -0700 +++ b/src/cpu/o3/rename.hh Fri May 13 14:30:37 2011 -0700 @@ -343,6 +343,12 @@ */ int instsInProgress[Impl::MaxThreads]; + /** Count of memory reference instructions in progress that have been sent + * off to the IQ and ROB, but are not yet included in their occupancy + * counts. + */ + int memRefsInProgress[Impl::MaxThreads]; + /** Variable that tracks if decode has written to the time buffer this * cycle. Used to tell CPU if there is activity this cycle. */ diff -r 5ba95cf70567 -r 8a4cd39136a0 src/cpu/o3/rename_impl.hh --- a/src/cpu/o3/rename_impl.hh Fri May 13 14:28:16 2011 -0700 +++ b/src/cpu/o3/rename_impl.hh Fri May 13 14:30:37 2011 -0700 @@ -79,6 +79,7 @@ serializeInst[tid] = NULL; instsInProgress[tid] = 0; + memRefsInProgress[tid] = 0; emptyROB[tid] = true; @@ -334,6 +335,7 @@ serializeInst[tid] = NULL; instsInProgress[tid] = 0; + memRefsInProgress[tid] = 0; emptyROB[tid] = true; @@ -451,8 +453,10 @@ // @todo: make into updateProgress function for (ThreadID tid = 0; tid < numThreads; tid++) { instsInProgress[tid] -= fromIEW->iewInfo[tid].dispatched; + memRefsInProgress[tid] -= fromIEW->iewInfo[tid].dispatchedToLSQ; - assert(instsInProgress[tid] >=0); + assert(instsInProgress[tid] >= 0); + assert(memRefsInProgress[tid] >= 0); } } @@ -545,6 +549,9 @@ DPRINTF(Rename, "[tid:%u]: %i insts pipelining from Rename | %i insts " "dispatched to IQ last cycle.\n", tid, instsInProgress[tid], fromIEW->iewInfo[tid].dispatched); + DPRINTF(Rename, "[tid:%u]: %i memory insts pipelining from Rename | " + "%i insts dispatched to LSQ last cycle.\n", tid, + memRefsInProgress[tid], fromIEW->iewInfo[tid].dispatchedToLSQ); // Handle serializing the next instruction if necessary. if (serializeOnNextInst[tid]) { @@ -639,6 +646,10 @@ ++renamed_insts; + if (inst->isMemRef()) { + ++memRefsInProgress[tid]; + } + // Put instruction in rename queue. toIEW->insts[toIEWIndex] = inst; ++(toIEW->size); @@ -1078,7 +1089,8 @@ DefaultRename::calcFreeLSQEntries(ThreadID tid) { int num_free = freeEntries[tid].lsqEntries - - (instsInProgress[tid] - fromIEW->iewInfo[tid].dispatchedToLSQ); + (memRefsInProgress[tid] - + fromIEW->iewInfo[tid].dispatchedToLSQ); //DPRINTF(Rename,"[tid:%i]: %i lsq free\n",tid,num_free); @@ -1175,8 +1187,9 @@ freeEntries[tid].robEntries, freeEntries[tid].lsqEntries); - DPRINTF(Rename, "[tid:%i]: %i instructions not yet in ROB\n", - tid, instsInProgress[tid]); + DPRINTF(Rename, "[tid:%i]: %i instructions not yet in ROB, %i memory " + "references not yet in LSQ\n", + tid, instsInProgress[tid], memRefsInProgress[tid]); } template