/*
- * Copyright (c) 2012 ARM Limited
+ * Copyright (c) 2012-2013 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
}
}
-void
-FUPool::drainSanityCheck() const
+bool
+FUPool::isDrained() const
{
- assert(unitsToBeFreed.empty());
+ bool is_drained = true;
for (int i = 0; i < numFU; i++)
- assert(!unitBusy[i]);
+ is_drained = is_drained && !unitBusy[i];
+
+ return is_drained;
}
//
/*
- * Copyright (c) 2012 ARM Limited
+ * Copyright (c) 2012-2013 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
return maxIssueLatencies[capability];
}
- /** Perform sanity checks after a drain. */
- void drainSanityCheck() const;
+ /** Have all the FUs drained? */
+ bool isDrained() const;
/** Takes over from another CPU's thread. */
void takeOverFrom() {};
/*
- * Copyright (c) 2010-2012 ARM Limited
+ * Copyright (c) 2010-2013 ARM Limited
* All rights reserved.
*
* The license below extends only to copyright in the software and shall
}
}
+ // Also check the FU pool as instructions are "stored" in FU
+ // completion events until they are done and not accounted for
+ // above
+ if (drained && !fuPool->isDrained()) {
+ DPRINTF(Drain, "FU pool still busy.\n");
+ drained = false;
+ }
+
return drained;
}
instQueue.drainSanityCheck();
ldstQueue.drainSanityCheck();
- fuPool->drainSanityCheck();
}
template <class Impl>