ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Plugin.cpp
Go to the documentation of this file.
1
53#include "etiss/Plugin.h"
54
55using namespace etiss;
56
57Plugin::Plugin(unsigned type)
58 : plugin_cpu_(nullptr)
59 , plugin_system_(nullptr)
60 , plugin_arch_(nullptr)
61 , plugin_core_(nullptr)
62 , type_(type)
63 , name_("")
64 , tplugin_(0)
65 , splugin_(0)
66 , cplugin_(0)
67 , rplugin_(0)
68 , trplugin_(0)
69 , lastAssignedCoreName_("")
70{
71}
73
74void Plugin::init(ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch) {}
76
82
84
95
97{
98 return this;
99}
100
102{
103 return pointerCode;
104}
105
107{
108 this->type_ |= Plugin::COROUTINE;
109 this->cplugin_ = this;
110}
112void CoroutinePlugin::executionEnd(int32_t code) {}
113
120
plugins for extensions to code translation and instruction execution
the interface to translate instructions of and processor architecture
Definition CPUArch.h:162
A list of CodeSets.
Definition CodePart.h:570
virtual ~CoroutinePlugin()
Definition Plugin.cpp:111
virtual void executionEnd(int32_t code)
called when the simulation ends but before any deinitialization is done
Definition Plugin.cpp:112
static const unsigned REGISTERDEVICE
gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture])
Definition Plugin.h:95
InterruptListenerPlugin * tplugin_
Definition Plugin.h:221
Plugin(unsigned type=0)
Definition Plugin.cpp:57
static const unsigned COROUTINE
callback after execution of each translated block
Definition Plugin.h:93
TranslationPlugin * trplugin_
Definition Plugin.h:225
static const unsigned TRANSLATION
access to translated code during translation phase or when instruction tree is built
Definition Plugin.h:97
virtual void cleanup()
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Definition Plugin.cpp:75
CoroutinePlugin * cplugin_
Definition Plugin.h:223
SystemWrapperPlugin * splugin_
Definition Plugin.h:222
static const unsigned INTERRUPTLISTENER
access to translated code
Definition Plugin.h:92
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)...
Definition Plugin.cpp:74
unsigned type_
Definition Plugin.h:218
static const unsigned SYSTEMWRAPPER
can wrap/change ETISS_System structure at execution start
Definition Plugin.h:94
virtual ~Plugin()
Definition Plugin.cpp:72
RegisterDevicePlugin * rplugin_
Definition Plugin.h:224
virtual void initCodeBlock(etiss::CodeBlock &) const
called before instructions are translated for the code block
Definition Plugin.cpp:93
virtual void finalizeInstrSet(etiss::instr::ModedInstructionSet &) const
called after all instructions have been added to allow last changes
Definition Plugin.cpp:92
virtual void finalizeCodeBlock(etiss::CodeBlock &) const
called after all instructions have been translated for the code block
Definition Plugin.cpp:94
virtual void initInstrSet(etiss::instr::ModedInstructionSet &) const
called to add instructions to the instruction set
Definition Plugin.cpp:91
std::string getPointerCode() const
returns a C code expression that allows to get or assign a pointer to the variable assigned to this t...
Definition Plugin.cpp:101
std::string pointerCode
Definition Plugin.h:288
virtual void * getPluginHandle()
called to get the handle that is available in translated code via getPoinerCode()....
Definition Plugin.cpp:96
virtual ~TranslationPlugin()
Definition Plugin.cpp:90
holds etiss::instr::VariableInstructionSet instances for different modes.
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition Benchmark.h:53
basic cpu state structure needed for execution of any cpu architecture.
Definition CPU.h:89
memory access and time synchronization functions.
Definition System.h:78