gem5
v20.1.0.0
|
The AddrRangeMap uses an STL map to implement an interval tree for address decoding. More...
#include <addr_range_map.hh>
Public Types | |
typedef RangeMap::iterator | iterator |
typedef RangeMap::const_iterator | const_iterator |
Public Member Functions | |
iterator | insert (const AddrRange &r, const V &d) |
void | erase (iterator p) |
void | erase (iterator p, iterator q) |
void | clear () |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
std::size_t | size () const |
bool | empty () const |
const_iterator | contains (const AddrRange &r) const |
Find entry that contains the given address range. More... | |
iterator | contains (const AddrRange &r) |
const_iterator | contains (Addr r) const |
Find entry that contains the given address. More... | |
iterator | contains (Addr r) |
const_iterator | intersects (const AddrRange &r) const |
Find entry that intersects with the given address range. More... | |
iterator | intersects (const AddrRange &r) |
Private Types | |
typedef std::map< AddrRange, V > | RangeMap |
Private Member Functions | |
void | addNewEntryToCache (iterator it) const |
Add an address range map entry to the cache. More... | |
iterator | find (const AddrRange &r, std::function< bool(const AddrRange)> cond) |
Find entry that satisfies a condition on an address range. More... | |
const_iterator | find (const AddrRange &r, std::function< bool(const AddrRange)> cond) const |
Private Attributes | |
RangeMap | tree |
std::list< iterator > | cache |
A list of iterator that correspond to the max_cache_size most recently used entries in the address range map. More... | |
The AddrRangeMap uses an STL map to implement an interval tree for address decoding.
The value stored is a template type and can be e.g. a port identifier, or a pointer.
Definition at line 59 of file addr_range_map.hh.
|
private |
Definition at line 62 of file addr_range_map.hh.
|
inlineprivate |
Add an address range map entry to the cache.
it | Iterator to the entry in the address range map |
Definition at line 253 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::find().
|
inlineprivate |
Find entry that satisfies a condition on an address range.
Searches through the ranges in the address map and returns an iterator to the entry that satisfies the input conidition on the input address range. Returns end() if none found.
r | An input address range |
f | A condition on an address range |
Definition at line 284 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::contains(), AddrRangeMap< AbstractMemory *, 1 >::find(), and AddrRangeMap< AbstractMemory *, 1 >::intersects().
|
inlineprivate |
Definition at line 321 of file addr_range_map.hh.
|
mutableprivate |
A list of iterator that correspond to the max_cache_size most recently used entries in the address range map.
This mainly used to optimize lookups. The elements in the list should always be valid iterators of the tree.
Definition at line 334 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::addNewEntryToCache(), AddrRangeMap< AbstractMemory *, 1 >::clear(), AddrRangeMap< AbstractMemory *, 1 >::erase(), and AddrRangeMap< AbstractMemory *, 1 >::find().
|
private |
Definition at line 326 of file addr_range_map.hh.
Referenced by AddrRangeMap< AbstractMemory *, 1 >::begin(), AddrRangeMap< AbstractMemory *, 1 >::clear(), AddrRangeMap< AbstractMemory *, 1 >::empty(), AddrRangeMap< AbstractMemory *, 1 >::end(), AddrRangeMap< AbstractMemory *, 1 >::erase(), AddrRangeMap< AbstractMemory *, 1 >::find(), AddrRangeMap< AbstractMemory *, 1 >::insert(), and AddrRangeMap< AbstractMemory *, 1 >::size().