range based lookup table
More...
#include <range_lut.h>
|
enum | entry_type { BEGIN_RANGE = 1
, END_RANGE = 2
, SINGLE_BYTE_RANGE = 3
} |
| the type of lut entry
|
|
using | const_iterator = typename std::map< uint64_t, lut_entry >::const_iterator |
|
|
std::map< uint64_t, lut_entry > | m_lut {} |
|
size_t | m_size {0} |
|
template<typename T>
class util::range_lut< T >
range based lookup table
Definition at line 37 of file range_lut.h.
◆ range_lut()
constructor or the lookup table
- Parameters
-
null_entry | the entry to be used for empty slots |
Definition at line 52 of file range_lut.h.
◆ addEntry()
template<typename T >
void util::range_lut< T >::addEntry |
( |
T |
i, |
|
|
uint64_t |
base_addr, |
|
|
uint64_t |
size |
|
) |
| |
|
inline |
add an T to the lut covering the range starting at base_addr until base_addr+size-1
- Parameters
-
i | the entry |
base_addr | the base address |
size | the size of the occupied range |
Definition at line 131 of file range_lut.h.
◆ clear()
remove all entries from the lut
Definition at line 79 of file range_lut.h.
◆ getEntry()
get the entry T associated with a given address
- Parameters
-
- Returns
- the entry belonging to the address
Definition at line 89 of file range_lut.h.
◆ removeEntry()
remove an entry with value i of type T
- Parameters
-
- Returns
- true if the entry is found and removed, false otherwise
Definition at line 146 of file range_lut.h.
◆ size()
get number of entries in the lookup table
- Returns
- the size of the underlying container
Definition at line 75 of file range_lut.h.
◆ toString()
create a textual representation of the address map (address range->entry association)
- Returns
Definition at line 192 of file range_lut.h.
◆ validate()
validate the lookup table wrt. overlaps
Definition at line 165 of file range_lut.h.
The documentation for this class was generated from the following file:
- /home/eyck/git/SystemC-Components/src/common/util/range_lut.h