|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
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. | |
| virtual etiss::int32 | execute () |
| apply interrupt changes to the InterruptVector | |
| 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 | |
| virtual bool | isActive () |
| indicates if the plugin will do something in execution loop. | |
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) ) | |
| 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 | |
| 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. | |
Additional Inherited Members | |
Static Public Attributes inherited from etiss::Plugin | |
| 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 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). | |
| 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. | |
class that handles interrupt signaling and checking.
functions are declared virtual to allow customization
Definition at line 44 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 21 of file InterruptHandler.cpp.
References empty_.
|
virtual |
Definition at line 28 of file InterruptHandler.cpp.
|
virtual |
Implements etiss::Plugin.
Definition at line 137 of file InterruptHandler.cpp.
|
virtual |
apply interrupt changes to the InterruptVector
Implements etiss::CoroutinePlugin.
Definition at line 50 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_, 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 36 of file InterruptHandler.cpp.
References empty_, interrupt_handler_cmp(), mu_, pending_, sync_, and vector_.

|
protected |
Definition at line 70 of file InterruptHandler.h.
|
protected |
Definition at line 71 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 72 of file InterruptHandler.h.
Referenced by execute(), InterruptHandler(), and setLine().
|
protected |
Definition at line 67 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 63 of file InterruptHandler.h.
Referenced by execute().
|
protected |
Definition at line 64 of file InterruptHandler.h.
|
protected |
list: (time , (line ,state) )
Definition at line 69 of file InterruptHandler.h.
|
protected |
Definition at line 65 of file InterruptHandler.h.
|
protected |
Definition at line 66 of file InterruptHandler.h.