ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
class that handles interrupt signaling and checking. More...
#include <InterruptHandler.h>
Public Member Functions | |
InterruptHandler (etiss::InterruptVector *interruptVector, etiss::InterruptEnable *interruptEnable, std::shared_ptr< etiss::CPUArch > arch, InterruptType itype=EDGE_TRIGGERED, bool sync=true) | |
virtual | ~InterruptHandler () |
virtual void | setLine (unsigned line, bool state, etiss::uint64 time_ps) |
set the state of a line at a given time. More... | |
virtual etiss::int32 | execute () |
apply interrupt changes to the InterruptVector More... | |
virtual std::string | _getPluginName () const |
Public Member Functions inherited from etiss::CoroutinePlugin | |
CoroutinePlugin () | |
virtual | ~CoroutinePlugin () |
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 () |
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 () |
Protected Attributes | |
const InterruptType | itype_ |
std::mutex | mu_ |
const bool | sync_ |
InterruptVector *const | vector_ |
InterruptEnable *const | enable_ |
std::list< std::pair< etiss::uint64, std::pair< unsigned, bool > > > | pending_ |
list: (time , (line ,state) ) More... | |
const std::shared_ptr< etiss::CPUArch > | cpuarch_ |
std::set< unsigned > | ed_raised_ |
bool | empty_ |
Protected Attributes inherited from etiss::Plugin | |
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... | |
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 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... | |
class that handles interrupt signaling and checking.
functions are declared virtual to allow customization
Definition at line 85 of file InterruptHandler.h.
InterruptHandler::InterruptHandler | ( | etiss::InterruptVector * | interruptVector, |
etiss::InterruptEnable * | interruptEnable, | ||
std::shared_ptr< etiss::CPUArch > | arch, | ||
InterruptType | itype = EDGE_TRIGGERED , |
||
bool | sync = true |
||
) |
Definition at line 56 of file InterruptHandler.cpp.
References empty_.
|
virtual |
Definition at line 63 of file InterruptHandler.cpp.
|
virtual |
Implements etiss::Plugin.
Definition at line 172 of file InterruptHandler.cpp.
|
virtual |
apply interrupt changes to the InterruptVector
Implements etiss::CoroutinePlugin.
Definition at line 85 of file InterruptHandler.cpp.
References etiss::InterruptVector::consumed_by_interruptlistener_, ETISS_CPU::cpuTime_ps, ed_raised_, etiss::EDGE_TRIGGERED, empty_, enable_, etiss::InterruptVector::isActive(), etiss::InterruptEnable::isEnabled(), itype_, etiss::LEVEL_TRIGGERED, mu_, etiss::mm::NOERROR, pending_, etiss::Plugin::plugin_cpu_, etiss::InterruptVector::setBit(), stream_code_info, sync_, and vector_.
|
virtual |
set the state of a line at a given time.
changes will not be applied until flush(2) with a time_ps value equal or greater than this time_ps value is called
Definition at line 71 of file InterruptHandler.cpp.
References empty_, interrupt_handler_cmp(), mu_, pending_, sync_, and vector_.
|
protected |
Definition at line 111 of file InterruptHandler.h.
|
protected |
Definition at line 112 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 113 of file InterruptHandler.h.
Referenced by execute(), InterruptHandler(), and setLine().
|
protected |
Definition at line 108 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 104 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 105 of file InterruptHandler.h.
|
protected |
list: (time , (line ,state) )
Definition at line 110 of file InterruptHandler.h.
|
protected |
Definition at line 106 of file InterruptHandler.h.
|
protected |
Definition at line 107 of file InterruptHandler.h.