ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
base plugin class that provides access to different plugin functions if present More...
#include <Plugin.h>
Public Member Functions | |
virtual | ~Plugin () |
unsigned | getType () |
InterruptListenerPlugin * | getInterruptListenerPlugin () |
CoroutinePlugin * | getCoroutinePlugin () |
SystemWrapperPlugin * | getSystemWrapperPlugin () |
RegisterDevicePlugin * | getRegisterDevicePlugin () |
TranslationPlugin * | getTranslationPlugin () |
std::string | getPluginName () const |
const std::string & | getLastAssignedCoreName () |
std::string | toString () const |
Public Member Functions inherited from etiss::ToString | |
ToString () | |
virtual | ~ToString () |
Static Public Attributes | |
static const unsigned | INTERRUPTLISTENER = 1 << 0 |
access to translated code More... | |
static const unsigned | COROUTINE = 1 << 1 |
callback after execution of each translated block More... | |
static const unsigned | SYSTEMWRAPPER = 1 << 2 |
can wrap/change ETISS_System structure at execution start More... | |
static const unsigned | REGISTERDEVICE |
gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) More... | |
static const unsigned | TRANSLATION |
access to translated code during translation phase or when instruction tree is built More... | |
Protected Member Functions | |
Plugin (unsigned type=0) | |
virtual std::string | _getPluginName () const =0 |
virtual void | init (ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch) |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute). More... | |
virtual void | cleanup () |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished. More... | |
void | setCorrespondingCPUCoreName (std::string name) |
virtual void | addedToCPUCore (etiss::CPUCore *core) |
called as soon a plugin has been added to its CPUCore. More... | |
virtual void | removedFromCPUCore (etiss::CPUCore *core) |
called as soon a plugin has been removed from its CPUCore. More... | |
Protected Attributes | |
ETISS_CPU * | plugin_cpu_ |
holds a pointer to the cpu structure. will be set before init call and after cleanup call More... | |
ETISS_System * | plugin_system_ |
holds a pointer to the system structure. More... | |
CPUArch * | plugin_arch_ |
holds a pointer to the CPUArch instance. will be set before init call and after cleanup call More... | |
CPUCore * | plugin_core_ |
holds a pointer to the associated CPUCore instance. More... | |
Private Attributes | |
unsigned | type_ |
std::string | name_ |
contains a name that is build from the return value of getPluginName_() + the implemented interfaces of a plugin More... | |
InterruptListenerPlugin * | tplugin_ |
SystemWrapperPlugin * | splugin_ |
CoroutinePlugin * | cplugin_ |
RegisterDevicePlugin * | rplugin_ |
TranslationPlugin * | trplugin_ |
std::string | lastAssignedCoreName_ |
Friends | |
class | InterruptListenerPlugin |
class | TranslationPlugin |
class | CoroutinePlugin |
class | SystemWrapperPlugin |
class | RegisterDevicePlugin |
class | CPUCore |
base plugin class that provides access to different plugin functions if present
|
protected |
Definition at line 57 of file Plugin.cpp.
|
virtual |
Definition at line 72 of file Plugin.cpp.
|
protectedpure virtual |
Implemented in etiss::plugin::gdb::Server, TracePrinter, etiss::DataSheetAccurateTiming, etiss::mm::DMMUWrapper, etiss::InterruptHandler, etiss::plugin::VariableValueLogger, etiss::plugin::PrintInstruction, etiss::plugin::Logger, etiss::plugin::InstructionSpecificAddressCallback, etiss::plugin::InstructionAccurateCallback, etiss::plugin::errorInjection::BlockAccurateHandler, and etiss::CPUArch.
Referenced by getPluginName().
|
inlineprotectedvirtual |
|
protectedvirtual |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Only the SystemWrapperPlugin::unwrap function is called AFTER Plugin::cleanup
Reimplemented in etiss::plugin::gdb::Server, TracePrinter, and etiss::plugin::errorInjection::BlockAccurateHandler.
Definition at line 75 of file Plugin.cpp.
|
inline |
Definition at line 112 of file Plugin.h.
References cplugin_.
|
inline |
Definition at line 108 of file Plugin.h.
References tplugin_.
Referenced by etiss::CPUCore::InterruptVectorWrapper::setBit().
|
inline |
Definition at line 175 of file Plugin.h.
References lastAssignedCoreName_.
|
inline |
Definition at line 130 of file Plugin.h.
References _getPluginName(), COROUTINE, INTERRUPTLISTENER, name_, REGISTERDEVICE, SYSTEMWRAPPER, TRANSLATION, and type_.
Referenced by etiss::CPUCore::execute(), and toString().
|
inline |
Definition at line 120 of file Plugin.h.
References rplugin_.
|
inline |
Definition at line 116 of file Plugin.h.
References splugin_.
|
inline |
Definition at line 125 of file Plugin.h.
References trplugin_.
Referenced by etiss::Translation::init().
|
inline |
Definition at line 104 of file Plugin.h.
References type_.
|
protectedvirtual |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute).
Only exception is the SystemWrapperPlugin whose SystemWrapperPlugin::wrap function is called BEFORE Plugin::init
Reimplemented in TracePrinter, etiss::plugin::gdb::Server, and etiss::plugin::errorInjection::BlockAccurateHandler.
Definition at line 74 of file Plugin.cpp.
|
inlineprotectedvirtual |
called as soon a plugin has been removed from its CPUCore.
similar to addedToCPUCore() it is possible to modify the CPUCore
Definition at line 215 of file Plugin.h.
Referenced by etiss::CPUCore::removePlugin().
|
inlineprotected |
Definition at line 204 of file Plugin.h.
References lastAssignedCoreName_.
Referenced by etiss::CPUArch::CPUArch().
|
inline |
Definition at line 177 of file Plugin.h.
References getPluginName().
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
callback after execution of each translated block
Definition at line 93 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), and getPluginName().
|
private |
Definition at line 223 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), and getCoroutinePlugin().
|
static |
access to translated code
Definition at line 92 of file Plugin.h.
Referenced by getPluginName(), and etiss::InterruptListenerPlugin::InterruptListenerPlugin().
|
private |
Definition at line 226 of file Plugin.h.
Referenced by getLastAssignedCoreName(), and setCorrespondingCPUCoreName().
|
mutableprivate |
contains a name that is build from the return value of getPluginName_() + the implemented interfaces of a plugin
Definition at line 219 of file Plugin.h.
Referenced by getPluginName().
|
protected |
|
protected |
holds a pointer to the associated CPUCore instance.
this pointer is valid as long a plugin is associtated with a cpu core. use with caution since this pointer may change in a non threadsafe manner.
Definition at line 200 of file Plugin.h.
Referenced by etiss::plugin::InstructionAccurateCallback::call(), etiss::plugin::errorInjection::BlockAccurateHandler::execute(), etiss::plugin::VariableValueLogger::finalizeInstrSet(), etiss::plugin::gdb::Server::handlePacket(), etiss::CPUCore::removePlugin(), and etiss::plugin::VariableValueLogger::writeValue().
|
protected |
holds a pointer to the cpu structure. will be set before init call and after cleanup call
Definition at line 195 of file Plugin.h.
Referenced by etiss::plugin::InstructionAccurateCallback::call(), etiss::plugin::fault::SwitchSystem::dread(), etiss::plugin::fault::SwitchSystem::dwrite(), etiss::InterruptHandler::execute(), etiss::plugin::fault::SwitchSystem::iread(), etiss::plugin::fault::SwitchSystem::iwrite(), and etiss::plugin::VariableValueLogger::writeValue().
|
protected |
holds a pointer to the system structure.
will be set before init call and after cleanup call
Definition at line 196 of file Plugin.h.
Referenced by etiss::plugin::fault::SwitchSystem::dread(), etiss::plugin::fault::SwitchSystem::dwrite(), etiss::plugin::fault::SwitchSystem::iread(), and etiss::plugin::fault::SwitchSystem::iwrite().
|
static |
gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture])
Definition at line 95 of file Plugin.h.
Referenced by getPluginName(), and etiss::RegisterDevicePlugin::RegisterDevicePlugin().
|
private |
Definition at line 224 of file Plugin.h.
Referenced by getRegisterDevicePlugin(), and etiss::RegisterDevicePlugin::RegisterDevicePlugin().
|
private |
Definition at line 222 of file Plugin.h.
Referenced by getSystemWrapperPlugin(), and etiss::SystemWrapperPlugin::SystemWrapperPlugin().
|
static |
can wrap/change ETISS_System structure at execution start
Definition at line 94 of file Plugin.h.
Referenced by getPluginName(), and etiss::SystemWrapperPlugin::SystemWrapperPlugin().
|
private |
Definition at line 221 of file Plugin.h.
Referenced by getInterruptListenerPlugin(), and etiss::InterruptListenerPlugin::InterruptListenerPlugin().
|
static |
access to translated code during translation phase or when instruction tree is built
Definition at line 97 of file Plugin.h.
Referenced by getPluginName(), and etiss::TranslationPlugin::TranslationPlugin().
|
private |
Definition at line 225 of file Plugin.h.
Referenced by getTranslationPlugin(), and etiss::TranslationPlugin::TranslationPlugin().
|
private |
Definition at line 218 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), getPluginName(), getType(), etiss::InterruptListenerPlugin::InterruptListenerPlugin(), etiss::RegisterDevicePlugin::RegisterDevicePlugin(), etiss::SystemWrapperPlugin::SystemWrapperPlugin(), and etiss::TranslationPlugin::TranslationPlugin().