restarting from a checkpoint at tick N.
cpu/simple_cpu/simple_cpu.cc:
On a CPU switchover, schedule the new CPU's first tick event
for curTick+1 instead of curTick.
--HG--
extra : convert_revision :
f0757d6f028214d36c1cff992db688fd6e8a6fdc
ExecContext *xc = execContexts[i];
if (xc->status() == ExecContext::Active && _status != Running) {
_status = Running;
- tickEvent.schedule(curTick);
+ // the CpuSwitchEvent has a low priority, so it's
+ // scheduled *after* the current cycle's tick event. Thus
+ // the first tick event for the new context should take
+ // place on the *next* cycle.
+ tickEvent.schedule(curTick+1);
}
}
}
REGISTER_SIM_OBJECT("SimpleCPU", SimpleCPU)
+