mshr_queue.cc (11197:f8fdd931e674) mshr_queue.cc (11278:18411ccc4f3c)
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 225 unchanged lines hidden (view full) ---

234 if (!mshr->hasTargets() && !mshr->promoteDeferredTargets()) {
235 deallocateOne(mshr);
236 }
237
238 // Notify if MSHR queue no longer full
239 return was_full && !isFull();
240}
241
1/*
2 * Copyright (c) 2012-2013, 2015 ARM Limited
3 * All rights reserved.
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 225 unchanged lines hidden (view full) ---

234 if (!mshr->hasTargets() && !mshr->promoteDeferredTargets()) {
235 deallocateOne(mshr);
236 }
237
238 // Notify if MSHR queue no longer full
239 return was_full && !isFull();
240}
241
242void
243MSHRQueue::squash(int threadNum)
244{
245 for (auto i = allocatedList.begin(); i != allocatedList.end();) {
246 MSHR *mshr = *i;
247 if (mshr->threadNum == threadNum) {
248 while (mshr->hasTargets()) {
249 mshr->popTarget();
250 assert(0/*target->req->threadId()*/ == threadNum);
251 }
252 assert(!mshr->hasTargets());
253 assert(mshr->getNumTargets()==0);
254 if (!mshr->inService) {
255 i = deallocateOne(mshr);
256 } else {
257 //mshr->pkt->flags &= ~CACHE_LINE_FILL;
258 ++i;
259 }
260 } else {
261 ++i;
262 }
263 }
264}
265
266DrainState
267MSHRQueue::drain()
268{
269 return allocated == 0 ? DrainState::Drained : DrainState::Draining;
270}
242DrainState
243MSHRQueue::drain()
244{
245 return allocated == 0 ? DrainState::Drained : DrainState::Draining;
246}