Hello,
I have noticed two requests are running in parallel for the shared L2 cache with blocking MSHR, when simulating a multi-threaded application. I looked at the code in CCache.cpp to locate the problem. After spending a long time, I noticed when a pending request is issued in doReq() (i.e., the path with retrying set to true) the MSHR is not updated to prevent the next request from being issued while the first one has not retired yet. The part of code is given below. The debug assertion "I(!mshr->canIssue(addr))" indicates that the MSHR should not be empty when we get to this point as "mshr->canIssue(addr)" returns true if the MSHR is empty. To fix this, I added the line marked by "added by me".
if (retrying) { // reissued operation
mreq->clearRetrying();
mshr->addEntry(addr, 0); //////////////////////////////////////////////////////////////// added by me
I(!mshr->canIssue(addr)); // the req is already queued if retrying
}else{
...
I am wondering if my understanding is correct?
BTW, I changed the ESESC ARM version to incorporate MESI protocol taken from the ESESC MIPS version. I use the MSHR from the ARM version.
The simulator version I am using is 2013-ARMv7.
Any help is greatly appreciated.
Thank you very much in advance,
Alireza