gem5 v24.0.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. | |
iterator | contains (const AddrRange &r) |
const_iterator | contains (Addr r) const |
Find entry that contains the given address. | |
iterator | contains (Addr r) |
const_iterator | intersects (const AddrRange &r) const |
Find entry that intersects with the given address range. | |
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. | |
iterator | find (const AddrRange &r, std::function< bool(const AddrRange)> cond) |
Find entry that satisfies a condition on an address range. | |
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. | |
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 62 of file addr_range_map.hh.
|
private |
Definition at line 65 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 256 of file addr_range_map.hh.
References gem5::AddrRangeMap< V, max_cache_size >::cache.
Referenced by gem5::AddrRangeMap< V, max_cache_size >::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 287 of file addr_range_map.hh.
References gem5::AddrRangeMap< V, max_cache_size >::addNewEntryToCache(), gem5::AddrRangeMap< V, max_cache_size >::begin(), gem5::ArmISA::c, gem5::AddrRangeMap< V, max_cache_size >::cache, gem5::ArmISA::cond, gem5::AddrRangeMap< V, max_cache_size >::end(), gem5::ArmISA::i, gem5::MipsISA::r, and gem5::AddrRangeMap< V, max_cache_size >::tree.
Referenced by gem5::AddrRangeMap< V, max_cache_size >::contains(), gem5::AddrRangeMap< V, max_cache_size >::contains(), gem5::AddrRangeMap< V, max_cache_size >::find(), gem5::AddrRangeMap< V, max_cache_size >::intersects(), and gem5::AddrRangeMap< V, max_cache_size >::intersects().
|
inlineprivate |
Definition at line 324 of file addr_range_map.hh.
References gem5::ArmISA::cond, gem5::AddrRangeMap< V, max_cache_size >::find(), and gem5::MipsISA::r.
|
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 337 of file addr_range_map.hh.
Referenced by gem5::AddrRangeMap< V, max_cache_size >::addNewEntryToCache(), gem5::AddrRangeMap< V, max_cache_size >::clear(), gem5::AddrRangeMap< V, max_cache_size >::erase(), gem5::AddrRangeMap< V, max_cache_size >::erase(), and gem5::AddrRangeMap< V, max_cache_size >::find().
|
private |
Definition at line 329 of file addr_range_map.hh.
Referenced by gem5::AddrRangeMap< V, max_cache_size >::begin(), gem5::AddrRangeMap< V, max_cache_size >::begin(), gem5::AddrRangeMap< V, max_cache_size >::clear(), gem5::AddrRangeMap< V, max_cache_size >::empty(), gem5::AddrRangeMap< V, max_cache_size >::end(), gem5::AddrRangeMap< V, max_cache_size >::end(), gem5::AddrRangeMap< V, max_cache_size >::erase(), gem5::AddrRangeMap< V, max_cache_size >::erase(), gem5::AddrRangeMap< V, max_cache_size >::find(), gem5::AddrRangeMap< V, max_cache_size >::insert(), and gem5::AddrRangeMap< V, max_cache_size >::size().