Hi Steve, That is pretty much what I had been doing. The problem I am facing is the check I put in must have been incorrect. I put a check after mq->deallocate(mshr) is called, this checks if the writeBuffer.allocated and mshrQueue.allocated are 0. However, it never seems to reach this code inside drain. Is that what I should be looking for to signal that the cache is drained?
Thanks, Tony On Wed, Oct 17, 2012 at 11:06 PM, Steve Reinhardt <ste...@gmail.com> wrote: > MSHRs should take care of themselves if you just wait for the outstanding > transactions to complete. In timing mode you'll probably have to write > back lines until the write buffer is full, then as the write buffer > empties, add a check if you're in drain mode and keep iterating until > you're all the way through the cache, then signal that the cache is drained > only when the write buffer is emptied. > > Steve > > On Tue, Oct 16, 2012 at 9:41 AM, Anthony Gutierrez <atgut...@umich.edu>wrote: > >> Hello Everyone, >> >> I am trying to clean and/or invalidate all cache lines during a drain. I >> think I would need to iterate through every cache block and call >> writebackBlock() to put them in the writeback buffer. Anybody have any >> suggestions on how to do this? I.e., how to prevent drain from completing >> until all writebacks have completed. Also, how should the MSHRs be handled? >> I am assuming for the cache to be truly cleaned the MSHRs would need to be >> empty as well? Any ideas? >> >> Thanks, >> Tony >> >> _______________________________________________ >> gem5-users mailing list >> gem5-users@gem5.org >> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >> > > > _______________________________________________ > gem5-users mailing list > gem5-users@gem5.org > http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users >
_______________________________________________ gem5-users mailing list gem5-users@gem5.org http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users