panda: comment fix & remove unimplemented functions
Change-Id: Ibe533a41871bbf186272d6df43966dabb692dede
This commit is contained in:
@ -15,13 +15,16 @@
|
|||||||
#error Save/Restore is not yet implemented for Pandaboard
|
#error Save/Restore is not yet implemented for Pandaboard
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_EVENT_IOPORT)
|
||||||
|
#error IoPort events not implemented for pandaboard
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace fail {
|
namespace fail {
|
||||||
|
|
||||||
|
|
||||||
PandaController::PandaController()
|
PandaController::PandaController()
|
||||||
: SimulatorController(new PandaMemoryManager()), m_CurrFlow(NULL)
|
: SimulatorController(new PandaMemoryManager()), m_CurrFlow(NULL)
|
||||||
{
|
{
|
||||||
// ToDo: Multiple CPUs? => for (unsigned i = 0; i < BX_SMP_PROCESSORS; i++)
|
|
||||||
addCPU(new ConcreteCPU(0));
|
addCPU(new ConcreteCPU(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,25 +54,6 @@ void PandaController::onTimerTrigger(void* thisPtr)
|
|||||||
simulator.m_LstList.triggerActiveListeners();
|
simulator.m_LstList.triggerActiveListeners();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PandaController::onIOPort(ConcreteCPU* cpu, unsigned char data, unsigned port, bool out) {
|
|
||||||
// Check for active IOPortListeners:
|
|
||||||
ListenerManager::iterator it = m_LstList.begin();
|
|
||||||
while (it != m_LstList.end()) {
|
|
||||||
BaseListener* pLi = *it;
|
|
||||||
IOPortListener* pIOPt = dynamic_cast<IOPortListener*>(pLi);
|
|
||||||
if (pIOPt != NULL && pIOPt->isMatching(port, out)) {
|
|
||||||
pIOPt->setData(data);
|
|
||||||
pIOPt->setTriggerCPU(cpu);
|
|
||||||
it = m_LstList.makeActive(it);
|
|
||||||
// "it" has already been set to the next element (by calling
|
|
||||||
// makeActive()):
|
|
||||||
continue; // -> skip iterator increment
|
|
||||||
}
|
|
||||||
it++;
|
|
||||||
}
|
|
||||||
m_LstList.triggerActiveListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PandaController::save(const std::string& path)
|
bool PandaController::save(const std::string& path)
|
||||||
{
|
{
|
||||||
// ToDo (PORT): Save
|
// ToDo (PORT): Save
|
||||||
|
|||||||
@ -34,39 +34,30 @@ public:
|
|||||||
/* ********************************************************************
|
/* ********************************************************************
|
||||||
* Standard Listener Handler API:
|
* Standard Listener Handler API:
|
||||||
* ********************************************************************/
|
* ********************************************************************/
|
||||||
/**
|
|
||||||
* I/O port communication handler. This method is called (from
|
|
||||||
* the IOPortCom aspect) every time when pandaboard performs a port I/O operation.
|
|
||||||
* @param cpu the CPU that caused the IO port access
|
|
||||||
* @param data the data transmitted
|
|
||||||
* @param port the port it was transmitted on
|
|
||||||
* @param out \c true if the I/O traffic has been outbound, \c false otherwise
|
|
||||||
*/
|
|
||||||
void onIOPort(ConcreteCPU* cpu, unsigned char data, unsigned port, bool out);
|
|
||||||
/**
|
/**
|
||||||
* Internal handler for TimerListeners. This method is called when a previously
|
* Internal handler for TimerListeners. This method is called when a previously
|
||||||
* registered (openocd-wrapper) timer triggers. It searches for the provided
|
* registered timer in openocd main loop triggers. It searches for the
|
||||||
* TimerListener object within the ListenerManager and fires such an event
|
* provided TimerListener object within the ListenerManager and fires
|
||||||
* by calling \c triggerActiveListeners().
|
* such an event by calling * \c triggerActiveListeners().
|
||||||
* @param thisPtr a pointer to the TimerListener-object triggered
|
* @param thisPtr a pointer to the TimerListener-object triggered.
|
||||||
*/
|
*/
|
||||||
void onTimerTrigger(void *thisPtr);
|
void onTimerTrigger(void *thisPtr);
|
||||||
/* ********************************************************************
|
/* ********************************************************************
|
||||||
* Simulator Controller & Access API:
|
* Simulator Controller & Access API:
|
||||||
* ********************************************************************/
|
* ********************************************************************/
|
||||||
/**
|
/**
|
||||||
* Save device state.
|
* Save simulator state.
|
||||||
* @param path Location to store state information
|
* @param path Location to store state information
|
||||||
* @return \c true if the state has been successfully saved, \c false otherwise
|
* @return \c true if the state has been successfully saved, \c false otherwise
|
||||||
*/
|
*/
|
||||||
bool save(const std::string& path);
|
bool save(const std::string& path);
|
||||||
/**
|
/**
|
||||||
* Restore device state. Clears all Listeners.
|
* Restore simulator state. Clears all Listeners.
|
||||||
* @param path Location to previously saved state information
|
* @param path Location to previously saved state information
|
||||||
*/
|
*/
|
||||||
void restore(const std::string& path);
|
void restore(const std::string& path);
|
||||||
/**
|
/**
|
||||||
* Reboot pandaboard. Clears all Listeners.
|
* Reboot simulator. Clears all Listeners.
|
||||||
*/
|
*/
|
||||||
void reboot();
|
void reboot();
|
||||||
/**
|
/**
|
||||||
@ -76,12 +67,10 @@ public:
|
|||||||
//void fireInterrupt(unsigned irq);
|
//void fireInterrupt(unsigned irq);
|
||||||
|
|
||||||
virtual simtime_t getTimerTicks() {
|
virtual simtime_t getTimerTicks() {
|
||||||
// return bx_pc_system.time_ticks();
|
|
||||||
// ToDo (PORT)
|
// ToDo (PORT)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual simtime_t getTimerTicksPerSecond() {
|
virtual simtime_t getTimerTicksPerSecond() {
|
||||||
// return bx_pc_system.time_ticks() / bx_pc_system.time_usec() * 1000000; /* imprecise hack */
|
|
||||||
// ToDo (PORT)
|
// ToDo (PORT)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user