ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | List of all members
etiss::CoroutinePlugin Class Referenceabstract

this plugin will be called before a block is executed. More...

#include <Plugin.h>

Inheritance diagram for etiss::CoroutinePlugin:
Inheritance graph
[legend]
Collaboration diagram for etiss::CoroutinePlugin:
Collaboration graph
[legend]

Public Member Functions

 CoroutinePlugin ()
 
virtual ~CoroutinePlugin ()
 
virtual etiss::int32 execute ()=0
 called before a block and may act in the same way as a block More...
 
virtual void executionEnd (int32_t code)
 called when the simulation ends but before any deinitialization is done More...
 
virtual bool isActive ()
 indicates if the plugin will do something in execution loop. More...
 
- Public Member Functions inherited from etiss::Plugin
virtual ~Plugin ()
 
unsigned getType ()
 
InterruptListenerPlugingetInterruptListenerPlugin ()
 
CoroutinePlugingetCoroutinePlugin ()
 
SystemWrapperPlugingetSystemWrapperPlugin ()
 
RegisterDevicePlugingetRegisterDevicePlugin ()
 
TranslationPlugingetTranslationPlugin ()
 
std::string getPluginName () const
 
const std::string & getLastAssignedCoreName ()
 
std::string toString () const
 
- Public Member Functions inherited from etiss::ToString
 ToString ()
 
virtual ~ToString ()
 

Additional Inherited Members

- Static Public Attributes inherited from etiss::Plugin
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 inherited from etiss::Plugin
 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 inherited from etiss::Plugin
ETISS_CPUplugin_cpu_
 holds a pointer to the cpu structure. will be set before init call and after cleanup call More...
 
ETISS_Systemplugin_system_
 holds a pointer to the system structure. More...
 
CPUArchplugin_arch_
 holds a pointer to the CPUArch instance. will be set before init call and after cleanup call More...
 
CPUCoreplugin_core_
 holds a pointer to the associated CPUCore instance. More...
 

Detailed Description

this plugin will be called before a block is executed.

it may make the same modifications as a block of translated code and returned codes are also handled the same way as those returned by a translated block.

this plugin is especially important for interrupt handlers, timer implementations or possible memory management units

Definition at line 298 of file Plugin.h.

Constructor & Destructor Documentation

◆ CoroutinePlugin()

CoroutinePlugin::CoroutinePlugin ( )

◆ ~CoroutinePlugin()

CoroutinePlugin::~CoroutinePlugin ( )
virtual

Definition at line 111 of file Plugin.cpp.

Member Function Documentation

◆ execute()

virtual etiss::int32 etiss::CoroutinePlugin::execute ( )
pure virtual

called before a block and may act in the same way as a block

Implemented in etiss::plugin::gdb::Server, TracePrinter, etiss::InterruptHandler, and etiss::plugin::errorInjection::BlockAccurateHandler.

◆ executionEnd()

void CoroutinePlugin::executionEnd ( int32_t  code)
virtual

called when the simulation ends but before any deinitialization is done

Parameters
codethe code that will be returned by etiss::CPUCore::execute().

Definition at line 112 of file Plugin.cpp.

◆ isActive()

virtual bool etiss::CoroutinePlugin::isActive ( )
inlinevirtual

indicates if the plugin will do something in execution loop.

Important for Plugins which have an flag that must be set to execute.

Definition at line 316 of file Plugin.h.


The documentation for this class was generated from the following files: