ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Plugin.cpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-3-Clause
2//
3// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5// LICENSE file.
15#include "etiss/Plugin.h"
16
17using namespace etiss;
18
19Plugin::Plugin(unsigned type)
20 : plugin_cpu_(nullptr)
21 , plugin_system_(nullptr)
22 , plugin_arch_(nullptr)
23 , plugin_core_(nullptr)
24 , type_(type)
25 , name_("")
26 , tplugin_(0)
27 , splugin_(0)
28 , cplugin_(0)
29 , rplugin_(0)
30 , trplugin_(0)
31 , lastAssignedCoreName_("")
32{
33}
35
36void Plugin::init(ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch) {}
38
44
46
57
59{
60 return this;
61}
62
64{
65 return pointerCode;
66}
67
69{
70 this->type_ |= Plugin::COROUTINE;
71 this->cplugin_ = this;
72}
74void CoroutinePlugin::executionEnd(int32_t code) {}
75
82
plugins for extensions to code translation and instruction execution
the interface to translate instructions of and processor architecture
Definition CPUArch.h:116
A list of CodeSets.
Definition CodePart.h:532
virtual ~CoroutinePlugin()
Definition Plugin.cpp:73
virtual void executionEnd(int32_t code)
called when the simulation ends but before any deinitialization is done
Definition Plugin.cpp:74
static const unsigned REGISTERDEVICE
gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture])
Definition Plugin.h:56
InterruptListenerPlugin * tplugin_
Definition Plugin.h:181
Plugin(unsigned type=0)
Definition Plugin.cpp:19
static const unsigned COROUTINE
callback after execution of each translated block
Definition Plugin.h:54
TranslationPlugin * trplugin_
Definition Plugin.h:185
static const unsigned TRANSLATION
access to translated code during translation phase or when instruction tree is built
Definition Plugin.h:58
virtual void cleanup()
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Definition Plugin.cpp:37
CoroutinePlugin * cplugin_
Definition Plugin.h:183
SystemWrapperPlugin * splugin_
Definition Plugin.h:182
static const unsigned INTERRUPTLISTENER
access to translated code
Definition Plugin.h:53
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:36
unsigned type_
Definition Plugin.h:178
static const unsigned SYSTEMWRAPPER
can wrap/change ETISS_System structure at execution start
Definition Plugin.h:55
virtual ~Plugin()
Definition Plugin.cpp:34
RegisterDevicePlugin * rplugin_
Definition Plugin.h:184
virtual ~RegisterDevicePlugin()
Definition Plugin.cpp:88
virtual ~SystemWrapperPlugin()
Definition Plugin.cpp:81
virtual void initCodeBlock(etiss::CodeBlock &) const
called before instructions are translated for the code block
Definition Plugin.cpp:55
virtual void finalizeInstrSet(etiss::instr::ModedInstructionSet &) const
called after all instructions have been added to allow last changes
Definition Plugin.cpp:54
virtual void finalizeCodeBlock(etiss::CodeBlock &) const
called after all instructions have been translated for the code block
Definition Plugin.cpp:56
virtual void initInstrSet(etiss::instr::ModedInstructionSet &) const
called to add instructions to the instruction set
Definition Plugin.cpp:53
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:63
std::string pointerCode
Definition Plugin.h:248
virtual void * getPluginHandle()
called to get the handle that is available in translated code via getPoinerCode()....
Definition Plugin.cpp:58
virtual ~TranslationPlugin()
Definition Plugin.cpp:52
holds etiss::instr::VariableInstructionSet instances for different modes.
forwards: include/jit/*
Definition Benchmark.h:17
basic cpu state structure needed for execution of any cpu architecture.
Definition CPU.h:51
memory access and time synchronization functions.
Definition System.h:40