ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Member Functions | Protected Attributes | List of all members
etiss::InterruptHandler Class Reference

class that handles interrupt signaling and checking. More...

#include <InterruptHandler.h>

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

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 ()
 
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 ()
 

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::CPUArchcpuarch_
 
std::set< unsigned > ed_raised_
 
bool empty_
 
- 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...
 

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...
 

Detailed Description

class that handles interrupt signaling and checking.

functions are declared virtual to allow customization

Definition at line 85 of file InterruptHandler.h.

Constructor & Destructor Documentation

◆ InterruptHandler()

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_.

◆ ~InterruptHandler()

InterruptHandler::~InterruptHandler ( )
virtual

Definition at line 63 of file InterruptHandler.cpp.

Member Function Documentation

◆ _getPluginName()

std::string InterruptHandler::_getPluginName ( ) const
virtual

Implements etiss::Plugin.

Definition at line 172 of file InterruptHandler.cpp.

◆ execute()

etiss::int32 InterruptHandler::execute ( )
virtual

◆ setLine()

void InterruptHandler::setLine ( unsigned  line,
bool  state,
etiss::uint64  time_ps 
)
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_.

Here is the call graph for this function:

Member Data Documentation

◆ cpuarch_

const std::shared_ptr<etiss::CPUArch> etiss::InterruptHandler::cpuarch_
protected

Definition at line 111 of file InterruptHandler.h.

◆ ed_raised_

std::set<unsigned> etiss::InterruptHandler::ed_raised_
protected

Definition at line 112 of file InterruptHandler.h.

Referenced by execute().

◆ empty_

bool etiss::InterruptHandler::empty_
protected

Definition at line 113 of file InterruptHandler.h.

Referenced by execute(), InterruptHandler(), and setLine().

◆ enable_

InterruptEnable* const etiss::InterruptHandler::enable_
protected

Definition at line 108 of file InterruptHandler.h.

Referenced by execute().

◆ itype_

const InterruptType etiss::InterruptHandler::itype_
protected

Definition at line 104 of file InterruptHandler.h.

Referenced by execute().

◆ mu_

std::mutex etiss::InterruptHandler::mu_
protected

Definition at line 105 of file InterruptHandler.h.

Referenced by execute(), and setLine().

◆ pending_

std::list<std::pair<etiss::uint64, std::pair<unsigned, bool> > > etiss::InterruptHandler::pending_
protected

list: (time , (line ,state) )

Definition at line 110 of file InterruptHandler.h.

Referenced by execute(), and setLine().

◆ sync_

const bool etiss::InterruptHandler::sync_
protected

Definition at line 106 of file InterruptHandler.h.

Referenced by execute(), and setLine().

◆ vector_

InterruptVector* const etiss::InterruptHandler::vector_
protected

Definition at line 107 of file InterruptHandler.h.

Referenced by execute(), and setLine().


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