ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Public Types | Public Member Functions | Private Attributes | List of all members
etiss::MappedInterruptVector< INT > Class Template Reference

template implementation of an InterruptVector that uses integer variables to store interrupt bit values and to read interrupt masks. More...

#include <InterruptVector.h>

Inheritance diagram for etiss::MappedInterruptVector< INT >:
Inheritance graph
[legend]
Collaboration diagram for etiss::MappedInterruptVector< INT >:
Collaboration graph
[legend]

Public Types

typedef std::vector< INT * > Vector
 

Public Member Functions

 MappedInterruptVector (Vector vec, Vector mask)
 pass two equally long integer pointer vectors that will be used for interrupt bit vectors and masks More...
 
virtual ~MappedInterruptVector ()
 
virtual void setBit (unsigned bit, bool state)
 set the bit of an interrupt line to state (true = raised) More...
 
virtual bool getBit (unsigned bit) const
 get the bit of an interrupt line More...
 
virtual unsigned width () const
 number of interrupt bits More...
 
virtual bool isActive () const
 
virtual void clear ()
 sets every bit to false More...
 
- Public Member Functions inherited from etiss::InterruptVector
virtual ~InterruptVector ()
 

Private Attributes

Vector vector_
 
Vector mask_
 

Additional Inherited Members

- Public Attributes inherited from etiss::InterruptVector
bool consumed_by_interruptlistener_ { false }
 

Detailed Description

template<typename INT>
class etiss::MappedInterruptVector< INT >

template implementation of an InterruptVector that uses integer variables to store interrupt bit values and to read interrupt masks.

this implementaion should work with most cpu architecture implementations.

Definition at line 102 of file InterruptVector.h.

Member Typedef Documentation

◆ Vector

template<typename INT >
typedef std::vector<INT *> etiss::MappedInterruptVector< INT >::Vector

Definition at line 105 of file InterruptVector.h.

Constructor & Destructor Documentation

◆ MappedInterruptVector()

template<typename INT >
etiss::MappedInterruptVector< INT >::MappedInterruptVector ( Vector  vec,
Vector  mask 
)
inline

pass two equally long integer pointer vectors that will be used for interrupt bit vectors and masks

Definition at line 109 of file InterruptVector.h.

References etiss::ERROR, etiss::log(), and etiss::MappedInterruptVector< INT >::vector_.

Here is the call graph for this function:

◆ ~MappedInterruptVector()

template<typename INT >
virtual etiss::MappedInterruptVector< INT >::~MappedInterruptVector ( )
inlinevirtual

Definition at line 122 of file InterruptVector.h.

Member Function Documentation

◆ clear()

template<typename INT >
virtual void etiss::MappedInterruptVector< INT >::clear ( )
inlinevirtual

sets every bit to false

Reimplemented from etiss::InterruptVector.

Definition at line 157 of file InterruptVector.h.

References etiss::MappedInterruptVector< INT >::vector_.

◆ getBit()

template<typename INT >
virtual bool etiss::MappedInterruptVector< INT >::getBit ( unsigned  bit) const
inlinevirtual

get the bit of an interrupt line

Implements etiss::InterruptVector.

Definition at line 136 of file InterruptVector.h.

References etiss::MappedInterruptVector< INT >::mask_, and etiss::MappedInterruptVector< INT >::vector_.

◆ isActive()

template<typename INT >
virtual bool etiss::MappedInterruptVector< INT >::isActive ( ) const
inlinevirtual
Returns
true if any bit is set to true

Reimplemented from etiss::InterruptVector.

Definition at line 148 of file InterruptVector.h.

References etiss::MappedInterruptVector< INT >::mask_, and etiss::MappedInterruptVector< INT >::vector_.

◆ setBit()

template<typename INT >
virtual void etiss::MappedInterruptVector< INT >::setBit ( unsigned  bit,
bool  state 
)
inlinevirtual

set the bit of an interrupt line to state (true = raised)

Implements etiss::InterruptVector.

Definition at line 123 of file InterruptVector.h.

References etiss::MappedInterruptVector< INT >::vector_.

◆ width()

template<typename INT >
virtual unsigned etiss::MappedInterruptVector< INT >::width ( ) const
inlinevirtual

number of interrupt bits

Implements etiss::InterruptVector.

Definition at line 147 of file InterruptVector.h.

References etiss::MappedInterruptVector< INT >::vector_.

Member Data Documentation

◆ mask_

template<typename INT >
Vector etiss::MappedInterruptVector< INT >::mask_
private

◆ vector_

template<typename INT >
Vector etiss::MappedInterruptVector< INT >::vector_
private

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