111a112,115
> assert(!drainManager);
> if (switchedOut())
> return 0;
>
113,114c117
< (_status == BaseSimpleCPU::Running && isDrained()) ||
< _status == SwitchedOut) {
---
> (_status == BaseSimpleCPU::Running && isDrained())) {
125,126c128
< if (_status == BaseSimpleCPU::Running && !isDrained() &&
< !fetchEvent.scheduled()) {
---
> if (_status == BaseSimpleCPU::Running && !fetchEvent.scheduled())
128d129
< }
137a139,141
> assert(!drainManager);
> if (switchedOut())
> return;
140,144c144,147
< if (_status != SwitchedOut && _status != Idle) {
< if (system->getMemoryMode() != Enums::timing) {
< fatal("The timing CPU requires the memory system to be in "
< "'timing' mode.\n");
< }
---
> if (system->getMemoryMode() != Enums::timing) {
> fatal("The timing CPU requires the memory system to be in "
> "'timing' mode.\n");
> }
145a149,153
> assert(!threadContexts.empty());
> if (threadContexts.size() > 1)
> fatal("The timing CPU only supports one thread.\n");
>
> if (thread->status() == ThreadContext::Active) {
146a155,157
> _status = BaseSimpleCPU::Running;
> } else {
> _status = BaseSimpleCPU::Idle;
177d187
< _status = SwitchedOut;
187,201d196
< // if any of this CPU's ThreadContexts are active, mark the CPU as
< // running and schedule its tick event.
< for (int i = 0; i < threadContexts.size(); ++i) {
< ThreadContext *tc = threadContexts[i];
< if (tc->status() == ThreadContext::Active &&
< _status != BaseSimpleCPU::Running) {
< _status = BaseSimpleCPU::Running;
< break;
< }
< }
<
< if (_status != BaseSimpleCPU::Running) {
< _status = Idle;
< }
< assert(threadContexts.size() == 1);