// Wake the CPU and record activity so everything can drain out if
// the CPU was not able to immediately drain.
- if (!isDrained()) {
+ if (!isCpuDrained()) {
// If a thread is suspended, wake it up so it can be drained
for (auto t : threadContexts) {
if (t->status() == ThreadContext::Suspended){
// Flush out any old data from the time buffers. In
// particular, there might be some data in flight from the
// fetch stage that isn't visible in any of the CPU buffers we
- // test in isDrained().
+ // test in isCpuDrained().
for (int i = 0; i < timeBuffer.getSize(); ++i) {
timeBuffer.advance();
fetchQueue.advance();
bool
FullO3CPU<Impl>::tryDrain()
{
- if (drainState() != DrainState::Draining || !isDrained())
+ if (drainState() != DrainState::Draining || !isCpuDrained())
return false;
if (tickEvent.scheduled())
void
FullO3CPU<Impl>::drainSanityCheck() const
{
- assert(isDrained());
+ assert(isCpuDrained());
fetch.drainSanityCheck();
decode.drainSanityCheck();
rename.drainSanityCheck();
template <class Impl>
bool
-FullO3CPU<Impl>::isDrained() const
+FullO3CPU<Impl>::isCpuDrained() const
{
bool drained(true);
void drainSanityCheck() const;
/** Check if a system is in a drained state. */
- bool isDrained() const;
+ bool isCpuDrained() const;
public:
/** Constructs a CPU with the given parameters. */
if (switchedOut())
return DrainState::Drained;
- if (!isDrained()) {
+ if (!isCpuDrained()) {
DPRINTF(Drain, "Requesting drain.\n");
return DrainState::Draining;
} else {
return false;
DPRINTF(Drain, "tryCompleteDrain.\n");
- if (!isDrained())
+ if (!isCpuDrained())
return false;
DPRINTF(Drain, "CPU done draining, processing drain event\n");
assert(!tickEvent.scheduled());
assert(_status == BaseSimpleCPU::Running || _status == Idle);
- assert(isDrained());
+ assert(isCpuDrained());
}
* <li>Stay at PC is true.
* </ul>
*/
- bool isDrained() {
+ bool isCpuDrained() const {
SimpleExecContext &t_info = *threadInfo[curThread];
return t_info.thread->microPC() == 0 &&
return DrainState::Drained;
if (_status == Idle ||
- (_status == BaseSimpleCPU::Running && isDrained())) {
+ (_status == BaseSimpleCPU::Running && isCpuDrained())) {
DPRINTF(Drain, "No need to drain.\n");
activeThreads.clear();
return DrainState::Drained;
return false;
DPRINTF(Drain, "tryCompleteDrain.\n");
- if (!isDrained())
+ if (!isCpuDrained())
return false;
DPRINTF(Drain, "CPU done draining, processing drain event\n");
* activated it can happen.
* </ul>
*/
- bool isDrained() {
+ bool isCpuDrained() const {
SimpleExecContext& t_info = *threadInfo[curThread];
SimpleThread* thread = t_info.thread;