ecos: fix golden-run runtime conversion

BochsController::getTimerTicksPerSecond() only works reliably when the
simulation is already running (e.g., after a restore()).  This broke
timeout conditions for the very first experiment in a FailBochs instance.

Change-Id: Ice5f0aa0c6759f2d9341ad4f21d5c346307b4c12
This commit is contained in:
Horst Schirmeier
2014-04-15 17:30:05 +02:00
parent b1c9c295ca
commit 07968377b3
2 changed files with 11 additions and 4 deletions

View File

@ -116,6 +116,10 @@ public:
*/
void fireInterruptDone();
virtual simtime_t getTimerTicks() { return bx_pc_system.time_ticks(); }
/**
* Only works reliably when the simulation has already begun, e.g., after
* calling simulator.restore().
*/
virtual simtime_t getTimerTicksPerSecond() { return bx_pc_system.time_ticks() / bx_pc_system.time_usec() * 1000000; /* imprecise hack */ }
/* ********************************************************************
* BochsController-specific (not implemented in SimulatorController!):