|
scc 2025.09
SystemC components library
|
range based lookup table More...
#include <range_lut.h>
Classes | |
| struct | lut_entry |
| the lut entry More... | |
Public Types | |
| enum | entry_type { BEGIN_RANGE = 1 , END_RANGE = 2 , SINGLE_BYTE_RANGE = 3 } |
| the type of lut entry More... | |
| using | const_iterator = typename std::map<uint64_t, lut_entry>::const_iterator |
Public Member Functions | |
| range_lut (T const &null_entry) | |
| void | addEntry (T const &i, uint64_t base_addr, uint64_t size) |
| bool | removeEntry (T i) |
| size_t | size () const |
| void | clear () |
| T | getEntry (uint64_t addr) const |
| void | validate () const |
| std::string | toString () const |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | lower_bound (uint64_t base) const |
Public Attributes | |
| const T | null_entry |
| the null entry | |
Protected Attributes | |
| std::map< uint64_t, lut_entry > | m_lut {} |
| size_t | m_size {0} |
range based lookup table
Definition at line 37 of file range_lut.h.
| using util::range_lut< T >::const_iterator = typename std::map<uint64_t, lut_entry>::const_iterator |
Definition at line 109 of file range_lut.h.
| enum util::range_lut::entry_type |
the type of lut entry
Definition at line 40 of file range_lut.h.
|
inline |
constructor or the lookup table
| null_entry | the entry to be used for empty slots |
Definition at line 52 of file range_lut.h.
|
inline |
add an T to the lut covering the range starting at base_addr until base_addr+size-1
| i | the entry |
| base_addr | the base address |
| size | the size of the occupied range |
Definition at line 135 of file range_lut.h.
|
inline |
Definition at line 111 of file range_lut.h.
|
inline |
remove all entries from the lut
Definition at line 79 of file range_lut.h.
|
inline |
Definition at line 113 of file range_lut.h.
|
inline |
get the entry T associated with a given address
| addr | the address |
Definition at line 89 of file range_lut.h.
|
inline |
Definition at line 115 of file range_lut.h.
|
inline |
remove an entry with value i of type T
| i | the entry to be found |
Definition at line 150 of file range_lut.h.
|
inline |
get number of entries in the lookup table
Definition at line 75 of file range_lut.h.
|
inline |
create a textual representation of the address map (address range->entry association)
Definition at line 196 of file range_lut.h.
|
inline |
validate the lookup table wrt. overlaps
Definition at line 169 of file range_lut.h.
|
protected |
Definition at line 119 of file range_lut.h.
|
protected |
Definition at line 120 of file range_lut.h.
| const T util::range_lut< T >::null_entry |
the null entry
Definition at line 107 of file range_lut.h.