gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::decode_cache::AddrMap< Value, CacheChunkShift > Class Template Reference

A sparse map from an Addr to a Value, stored in page chunks. More...

#include <decode_cache.hh>

Classes

struct  CacheChunk
 

Public Member Functions

 AddrMap ()
 Constructor.
 
Valuelookup (Addr addr)
 

Protected Types

typedef std::unordered_map< Addr, CacheChunk * > ChunkMap
 
typedef ChunkMap::iterator ChunkIt
 

Protected Member Functions

void update (ChunkIt recentest)
 Update the mini cache of recent lookups.
 
CacheChunkgetChunk (Addr addr)
 Attempt to find the CacheChunk which goes with a particular address.
 

Static Protected Member Functions

static constexpr Addr chunkOffset (Addr addr)
 
static constexpr Addr chunkStart (Addr addr)
 

Protected Attributes

ChunkIt recent [2]
 
ChunkMap chunkMap
 

Static Protected Attributes

static constexpr Addr CacheChunkBytes = 1ULL << CacheChunkShift
 

Detailed Description

template<class Value, Addr CacheChunkShift = 12>
class gem5::decode_cache::AddrMap< Value, CacheChunkShift >

A sparse map from an Addr to a Value, stored in page chunks.

Definition at line 50 of file decode_cache.hh.

Member Typedef Documentation

◆ ChunkIt

template<class Value , Addr CacheChunkShift = 12>
typedef ChunkMap::iterator gem5::decode_cache::AddrMap< Value, CacheChunkShift >::ChunkIt
protected

Definition at line 74 of file decode_cache.hh.

◆ ChunkMap

template<class Value , Addr CacheChunkShift = 12>
typedef std::unordered_map<Addr, CacheChunk *> gem5::decode_cache::AddrMap< Value, CacheChunkShift >::ChunkMap
protected

Definition at line 73 of file decode_cache.hh.

Constructor & Destructor Documentation

◆ AddrMap()

template<class Value , Addr CacheChunkShift = 12>
gem5::decode_cache::AddrMap< Value, CacheChunkShift >::AddrMap ( )
inline

Member Function Documentation

◆ chunkOffset()

template<class Value , Addr CacheChunkShift = 12>
static constexpr Addr gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkOffset ( Addr addr)
inlinestaticconstexprprotected

◆ chunkStart()

template<class Value , Addr CacheChunkShift = 12>
static constexpr Addr gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkStart ( Addr addr)
inlinestaticconstexprprotected

◆ getChunk()

template<class Value , Addr CacheChunkShift = 12>
CacheChunk * gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk ( Addr addr)
inlineprotected

Attempt to find the CacheChunk which goes with a particular address.

First check the small cache of recent results, then actually look in the hash map.

Parameters
addrThe address to look up.

Definition at line 93 of file decode_cache.hh.

References gem5::X86ISA::addr, gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkMap, gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkStart(), gem5::decode_cache::AddrMap< Value, CacheChunkShift >::recent, and gem5::decode_cache::AddrMap< Value, CacheChunkShift >::update().

Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::lookup().

◆ lookup()

◆ update()

template<class Value , Addr CacheChunkShift = 12>
void gem5::decode_cache::AddrMap< Value, CacheChunkShift >::update ( ChunkIt recentest)
inlineprotected

Update the mini cache of recent lookups.

Parameters
recentestThe most recent result;

Definition at line 82 of file decode_cache.hh.

References gem5::decode_cache::AddrMap< Value, CacheChunkShift >::recent.

Referenced by gem5::decode_cache::AddrMap< Value, CacheChunkShift >::getChunk().

Member Data Documentation

◆ CacheChunkBytes

template<class Value , Addr CacheChunkShift = 12>
Addr gem5::decode_cache::AddrMap< Value, CacheChunkShift >::CacheChunkBytes = 1ULL << CacheChunkShift
staticconstexprprotected

◆ chunkMap

template<class Value , Addr CacheChunkShift = 12>
ChunkMap gem5::decode_cache::AddrMap< Value, CacheChunkShift >::chunkMap
protected

◆ recent


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

Generated on Tue Jun 18 2024 16:24:19 for gem5 by doxygen 1.11.0