gem5  v20.1.0.0
Classes | Public Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
WalkCache Class Reference

#include <smmu_v3_caches.hh>

Inheritance diagram for WalkCache:
SMMUv3BaseCache

Classes

struct  Entry
 

Public Member Functions

 WalkCache (const std::array< unsigned, 2 *WALK_CACHE_LEVELS > &_sizes, unsigned _associativity, const std::string &policy)
 
virtual ~WalkCache ()
 
const Entrylookup (Addr va, Addr vaMask, uint16_t asid, uint16_t vmid, unsigned stage, unsigned level, bool updStats=true)
 
void store (const Entry &incoming)
 
void invalidateVA (Addr va, uint16_t asid, uint16_t vmid, const bool leaf_only)
 
void invalidateVAA (Addr va, uint16_t vmid, const bool leaf_only)
 
void invalidateASID (uint16_t asid, uint16_t vmid)
 
void invalidateVMID (uint16_t vmid)
 
void invalidateAll ()
 
void regStats (const std::string &name) override
 
- Public Member Functions inherited from SMMUv3BaseCache
 SMMUv3BaseCache (const std::string &policy_name, uint32_t seed)
 
virtual ~SMMUv3BaseCache ()
 

Protected Attributes

unsigned int lookupsByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Formula averageLookupsByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Scalar totalLookupsByStageLevel [2][WALK_CACHE_LEVELS]
 
unsigned int missesByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Formula averageMissesByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Scalar totalMissesByStageLevel [2][WALK_CACHE_LEVELS]
 
unsigned int updatesByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Formula averageUpdatesByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Scalar totalUpdatesByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Formula averageHitRateByStageLevel [2][WALK_CACHE_LEVELS]
 
Stats::Scalar insertionsByStageLevel [2][WALK_CACHE_LEVELS]
 
- Protected Attributes inherited from SMMUv3BaseCache
int replacementPolicy
 
size_t nextToReplace
 
Random random
 
uint32_t useStamp
 
Stats::Formula averageLookups
 
Stats::Scalar totalLookups
 
Stats::Formula averageMisses
 
Stats::Scalar totalMisses
 
Stats::Formula averageUpdates
 
Stats::Scalar totalUpdates
 
Stats::Formula averageHitRate
 
Stats::Scalar insertions
 

Private Types

typedef std::vector< EntrySet
 

Private Member Functions

size_t pickSetIdx (Addr va, Addr vaMask, unsigned stage, unsigned level) const
 
size_t pickEntryIdxToReplace (const Set &set, unsigned stage, unsigned level)
 

Private Attributes

std::vector< Setsets
 
size_t associativity
 
std::array< unsigned, 2 *WALK_CACHE_LEVELSsizes
 
std::array< unsigned, 2 *WALK_CACHE_LEVELSoffsets
 

Additional Inherited Members

- Static Protected Member Functions inherited from SMMUv3BaseCache
static int decodePolicyName (const std::string &policy_name)
 

Detailed Description

Definition at line 281 of file smmu_v3_caches.hh.

Member Typedef Documentation

◆ Set

typedef std::vector<Entry> WalkCache::Set
private

Definition at line 338 of file smmu_v3_caches.hh.

Constructor & Destructor Documentation

◆ WalkCache()

WalkCache::WalkCache ( const std::array< unsigned, 2 *WALK_CACHE_LEVELS > &  _sizes,
unsigned  _associativity,
const std::string &  policy 
)

Definition at line 969 of file smmu_v3_caches.cc.

References associativity, ArmISA::e, fatal, ArmISA::i, offsets, sets, sizes, and WALK_CACHE_LEVELS.

◆ ~WalkCache()

virtual WalkCache::~WalkCache ( )
inlinevirtual

Definition at line 305 of file smmu_v3_caches.hh.

Member Function Documentation

◆ invalidateAll()

void WalkCache::invalidateAll ( )

Definition at line 1150 of file smmu_v3_caches.cc.

References ArmISA::i, ArmISA::s, and sets.

Referenced by SMMUv3::processCommand().

◆ invalidateASID()

void WalkCache::invalidateASID ( uint16_t  asid,
uint16_t  vmid 
)

Definition at line 1120 of file smmu_v3_caches.cc.

References ArmISA::asid, ArmISA::e, ArmISA::i, ArmISA::s, and sets.

Referenced by SMMUv3::processCommand().

◆ invalidateVA()

void WalkCache::invalidateVA ( Addr  va,
uint16_t  asid,
uint16_t  vmid,
const bool  leaf_only 
)

Definition at line 1083 of file smmu_v3_caches.cc.

References ArmISA::asid, ArmISA::e, ArmISA::i, ArmISA::s, sets, and ArmISA::va.

Referenced by SMMUv3::processCommand().

◆ invalidateVAA()

void WalkCache::invalidateVAA ( Addr  va,
uint16_t  vmid,
const bool  leaf_only 
)

Definition at line 1102 of file smmu_v3_caches.cc.

References ArmISA::e, ArmISA::i, ArmISA::s, sets, and ArmISA::va.

Referenced by SMMUv3::processCommand().

◆ invalidateVMID()

void WalkCache::invalidateVMID ( uint16_t  vmid)

Definition at line 1135 of file smmu_v3_caches.cc.

References ArmISA::e, ArmISA::i, ArmISA::s, and sets.

Referenced by SMMUv3::processCommand().

◆ lookup()

const WalkCache::Entry * WalkCache::lookup ( Addr  va,
Addr  vaMask,
uint16_t  asid,
uint16_t  vmid,
unsigned  stage,
unsigned  level,
bool  updStats = true 
)

◆ pickEntryIdxToReplace()

size_t WalkCache::pickEntryIdxToReplace ( const Set set,
unsigned  stage,
unsigned  level 
)
private

◆ pickSetIdx()

size_t WalkCache::pickSetIdx ( Addr  va,
Addr  vaMask,
unsigned  stage,
unsigned  level 
) const
private

Definition at line 1161 of file smmu_v3_caches.cc.

References findLsbSet(), X86ISA::level, ArmISA::offset, offsets, panic, sizes, ArmISA::va, and WALK_CACHE_LEVELS.

Referenced by lookup(), and store().

◆ regStats()

void WalkCache::regStats ( const std::string &  name)
overridevirtual

◆ store()

void WalkCache::store ( const Entry incoming)

Member Data Documentation

◆ associativity

size_t WalkCache::associativity
private

Definition at line 341 of file smmu_v3_caches.hh.

Referenced by pickEntryIdxToReplace(), and WalkCache().

◆ averageHitRateByStageLevel

Stats::Formula WalkCache::averageHitRateByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 333 of file smmu_v3_caches.hh.

Referenced by regStats().

◆ averageLookupsByStageLevel

Stats::Formula WalkCache::averageLookupsByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 322 of file smmu_v3_caches.hh.

Referenced by regStats().

◆ averageMissesByStageLevel

Stats::Formula WalkCache::averageMissesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 326 of file smmu_v3_caches.hh.

Referenced by regStats().

◆ averageUpdatesByStageLevel

Stats::Formula WalkCache::averageUpdatesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 330 of file smmu_v3_caches.hh.

Referenced by regStats().

◆ insertionsByStageLevel

Stats::Scalar WalkCache::insertionsByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 335 of file smmu_v3_caches.hh.

Referenced by pickEntryIdxToReplace(), and regStats().

◆ lookupsByStageLevel

unsigned int WalkCache::lookupsByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 321 of file smmu_v3_caches.hh.

Referenced by lookup().

◆ missesByStageLevel

unsigned int WalkCache::missesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 325 of file smmu_v3_caches.hh.

Referenced by lookup().

◆ offsets

std::array<unsigned, 2*WALK_CACHE_LEVELS> WalkCache::offsets
private

Definition at line 343 of file smmu_v3_caches.hh.

Referenced by pickSetIdx(), and WalkCache().

◆ sets

std::vector<Set> WalkCache::sets
private

◆ sizes

std::array<unsigned, 2*WALK_CACHE_LEVELS> WalkCache::sizes
private

Definition at line 342 of file smmu_v3_caches.hh.

Referenced by pickSetIdx(), and WalkCache().

◆ totalLookupsByStageLevel

Stats::Scalar WalkCache::totalLookupsByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 323 of file smmu_v3_caches.hh.

Referenced by lookup(), and regStats().

◆ totalMissesByStageLevel

Stats::Scalar WalkCache::totalMissesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 327 of file smmu_v3_caches.hh.

Referenced by lookup(), and regStats().

◆ totalUpdatesByStageLevel

Stats::Scalar WalkCache::totalUpdatesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 331 of file smmu_v3_caches.hh.

Referenced by regStats(), and store().

◆ updatesByStageLevel

unsigned int WalkCache::updatesByStageLevel[2][WALK_CACHE_LEVELS]
protected

Definition at line 329 of file smmu_v3_caches.hh.

Referenced by store().


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

Generated on Wed Sep 30 2020 14:02:34 for gem5 by doxygen 1.8.17