assert(pkt->req->masterId() < system->maxMasters());
mshr_hits[pkt->cmdToIndex()][pkt->req->masterId()]++;
- if (mshr->threadNum != 0/*pkt->req->threadId()*/) {
- mshr->threadNum = -1;
- }
// We use forward_time here because it is the same
// considering new targets. We have multiple
// requests for the same address here. It
queue(NULL), order(0), blkAddr(0),
blkSize(0), isSecure(false), inService(false),
isForward(false), allocOnFill(false),
- threadNum(InvalidThreadID), data(NULL)
+ data(NULL)
{
}
_isUncacheable = target->req->isUncacheable();
inService = false;
downstreamPending = false;
- threadNum = 0;
assert(targets.isReset());
// Don't know of a case where we would allocate a new MSHR for a
// snoop (mem-side request), so set source according to request here
assert(inService); return postDowngrade;
}
- /** Thread number of the miss. */
- ThreadID threadNum;
-
private:
/** Data buffer (if needed). Currently used only for pending
return was_full && !isFull();
}
-void
-MSHRQueue::squash(int threadNum)
-{
- for (auto i = allocatedList.begin(); i != allocatedList.end();) {
- MSHR *mshr = *i;
- if (mshr->threadNum == threadNum) {
- while (mshr->hasTargets()) {
- mshr->popTarget();
- assert(0/*target->req->threadId()*/ == threadNum);
- }
- assert(!mshr->hasTargets());
- assert(mshr->getNumTargets()==0);
- if (!mshr->inService) {
- i = deallocateOne(mshr);
- } else {
- //mshr->pkt->flags &= ~CACHE_LINE_FILL;
- ++i;
- }
- } else {
- ++i;
- }
- }
-}
-
DrainState
MSHRQueue::drain()
{
/**
* Remove a MSHR from the queue. Returns an iterator into the
- * allocatedList for faster squash implementation.
+ * allocatedList.
* @param mshr The MSHR to remove.
* @return An iterator to the next entry in the allocatedList.
*/
*/
void markPending(MSHR *mshr);
- /**
- * Squash outstanding requests with the given thread number. If a request
- * is in service, just squashes the targets.
- * @param threadNum The thread to squash.
- */
- void squash(int threadNum);
-
/**
* Deallocate top target, possibly freeing the MSHR
* @return if MSHR queue is no longer full