|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
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 | |
| static const unsigned | COROUTINE = 1 << 1 |
| callback after execution of each translated block | |
| static const unsigned | SYSTEMWRAPPER = 1 << 2 |
| can wrap/change ETISS_System structure at execution start | |
| static const unsigned | REGISTERDEVICE |
| gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) | |
| static const unsigned | TRANSLATION |
| access to translated code during translation phase or when instruction tree is built | |
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). | |
| virtual void | cleanup () |
| this function is called after cpu execution loop (etiss::CPUCore::execute) finished. | |
| void | setCorrespondingCPUCoreName (std::string name) |
| virtual void | addedToCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been added to its CPUCore. | |
| virtual void | removedFromCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been removed from its CPUCore. | |
Protected Attributes | |
| ETISS_CPU * | plugin_cpu_ |
| holds a pointer to the cpu structure. will be set before init call and after cleanup call | |
| ETISS_System * | plugin_system_ |
| holds a pointer to the system structure. | |
| CPUArch * | plugin_arch_ |
| holds a pointer to the CPUArch instance. will be set before init call and after cleanup call | |
| CPUCore * | plugin_core_ |
| holds a pointer to the associated CPUCore instance. | |
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 | |
| 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 19 of file Plugin.cpp.
|
virtual |
Definition at line 34 of file Plugin.cpp.
|
protectedpure virtual |
Implemented in etiss::CPUArch, etiss::plugin::errorInjection::BlockAccurateHandler, etiss::plugin::InstructionAccurateCallback, etiss::plugin::InstructionSpecificAddressCallback, etiss::plugin::Logger, etiss::plugin::PrintInstruction, etiss::plugin::VariableValueLogger, etiss::InterruptHandler, etiss::mm::DMMUWrapper, etiss::DataSheetAccurateTiming, TracePrinter, and etiss::plugin::gdb::Server.
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::errorInjection::BlockAccurateHandler, TracePrinter, and etiss::plugin::gdb::Server.
Definition at line 37 of file Plugin.cpp.
|
inline |
Definition at line 73 of file Plugin.h.
References cplugin_.
|
inline |
Definition at line 69 of file Plugin.h.
References tplugin_.
Referenced by etiss::CPUCore::InterruptVectorWrapper::setBit().

|
inline |
Definition at line 135 of file Plugin.h.
References lastAssignedCoreName_.
|
inline |
Definition at line 91 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 81 of file Plugin.h.
References rplugin_.
|
inline |
Definition at line 77 of file Plugin.h.
References splugin_.
|
inline |
Definition at line 86 of file Plugin.h.
References trplugin_.
Referenced by etiss::Translation::init().

|
inline |
Definition at line 65 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 etiss::plugin::errorInjection::BlockAccurateHandler, etiss::plugin::gdb::Server, and TracePrinter.
Definition at line 36 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 175 of file Plugin.h.
Referenced by etiss::CPUCore::removePlugin().

|
inlineprotected |
Definition at line 164 of file Plugin.h.
References lastAssignedCoreName_.
Referenced by etiss::CPUArch::CPUArch().

|
inline |
Definition at line 137 of file Plugin.h.
References getPluginName().

|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
callback after execution of each translated block
Definition at line 54 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), and getPluginName().
|
private |
Definition at line 183 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), and getCoroutinePlugin().
|
static |
access to translated code
Definition at line 53 of file Plugin.h.
Referenced by getPluginName(), and etiss::InterruptListenerPlugin::InterruptListenerPlugin().
|
private |
Definition at line 186 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 179 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 160 of file Plugin.h.
Referenced by etiss::plugin::InstructionAccurateCallback::call_on_entry(), 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 155 of file Plugin.h.
Referenced by etiss::plugin::InstructionAccurateCallback::call_on_entry(), 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 156 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 56 of file Plugin.h.
Referenced by getPluginName(), and etiss::RegisterDevicePlugin::RegisterDevicePlugin().
|
private |
Definition at line 184 of file Plugin.h.
Referenced by getRegisterDevicePlugin(), and etiss::RegisterDevicePlugin::RegisterDevicePlugin().
|
private |
Definition at line 182 of file Plugin.h.
Referenced by getSystemWrapperPlugin(), and etiss::SystemWrapperPlugin::SystemWrapperPlugin().
|
static |
can wrap/change ETISS_System structure at execution start
Definition at line 55 of file Plugin.h.
Referenced by getPluginName(), and etiss::SystemWrapperPlugin::SystemWrapperPlugin().
|
private |
Definition at line 181 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 58 of file Plugin.h.
Referenced by getPluginName(), and etiss::TranslationPlugin::TranslationPlugin().
|
private |
Definition at line 185 of file Plugin.h.
Referenced by getTranslationPlugin(), and etiss::TranslationPlugin::TranslationPlugin().
|
private |
Definition at line 178 of file Plugin.h.
Referenced by etiss::CoroutinePlugin::CoroutinePlugin(), getPluginName(), getType(), etiss::InterruptListenerPlugin::InterruptListenerPlugin(), etiss::RegisterDevicePlugin::RegisterDevicePlugin(), etiss::SystemWrapperPlugin::SystemWrapperPlugin(), and etiss::TranslationPlugin::TranslationPlugin().