openocd: add cycle counter for trace timestamp

Added performance monitor hw-function cycle count.
Also fix for single-stepping exit, some additional register
exits and prevention of reboot failures.

Change-Id: I74196905dc39ecc14ae78366e7e1cb70ec7092f1
This commit is contained in:
Lars Rademacher
2013-10-30 13:08:14 +01:00
parent 1feab4fd54
commit 809af0ae55
4 changed files with 253 additions and 47 deletions

View File

@ -5,6 +5,7 @@
#include "../SALInst.hpp"
#include "../Listener.hpp"
#include "openocd_wrapper.hpp"
#if defined(CONFIG_FIRE_INTERRUPTS)
@ -21,7 +22,6 @@
namespace fail {
PandaController::PandaController()
: SimulatorController(new PandaMemoryManager()), m_CurrFlow(NULL)
{
@ -97,4 +97,14 @@ void PandaController::terminate(int exCode)
m_Flows.resume();
}
simtime_t PandaController::getTimerTicks()
{
return oocdw_read_cycle_counter();
}
simtime_t PandaController::getTimerTicksPerSecond()
{
return 1200*1000*1000;
}
} // end-of-namespace: fail

View File

@ -9,8 +9,6 @@
#include "../SimulatorController.hpp"
struct command_context;
namespace fail {
class ExperimentFlow;
@ -66,14 +64,9 @@ public:
*/
//void fireInterrupt(unsigned irq);
virtual simtime_t getTimerTicks() {
// ToDo (PORT)
return 0;
}
virtual simtime_t getTimerTicksPerSecond() {
// ToDo (PORT)
return 0;
}
virtual simtime_t getTimerTicks();
virtual simtime_t getTimerTicksPerSecond();
// Overloading super method to terminate OpenOCD properly
void terminate(int exCode = EXIT_SUCCESS);