A few minor fixes to sampling... seems to work now for the base case
of two CPUs and one switch-over event. Still some stats glitches though. cpu/simple_cpu/simple_cpu.cc: Schedule switched-to CPU right on curTick so we don't lose a cycle. Remember to switch out old CPU. --HG-- extra : convert_revision : f1bf21cac054c74f59770d8b20b30118f46be6f1
This commit is contained in:
parent
cc9a838f4c
commit
cd6b6df581
1 changed files with 5 additions and 2 deletions
|
@ -204,9 +204,11 @@ SimpleCPU::takeOverFrom(BaseCPU *oldCPU)
|
|||
ExecContext *xc = execContexts[i];
|
||||
if (xc->status() == ExecContext::Active && _status != Running) {
|
||||
_status = Running;
|
||||
tickEvent.schedule(curTick + 1);
|
||||
tickEvent.schedule(curTick);
|
||||
}
|
||||
}
|
||||
|
||||
oldCPU->switchOut();
|
||||
}
|
||||
|
||||
|
||||
|
@ -772,7 +774,8 @@ CREATE_SIM_OBJECT(SimpleCPU)
|
|||
cpu = new SimpleCPU(getInstanceName(), workload,
|
||||
max_insts_any_thread, max_insts_all_threads,
|
||||
max_loads_any_thread, max_loads_all_threads,
|
||||
icache->getInterface(), dcache->getInterface());
|
||||
(icache) ? icache->getInterface() : NULL,
|
||||
(dcache) ? dcache->getInterface() : NULL);
|
||||
|
||||
#endif // FULL_SYSTEM
|
||||
|
||||
|
|
Loading…
Reference in a new issue