gem5 v24.1.0.1
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
gem5::prefetch::SignaturePath::PatternEntry Struct Reference

Pattern entry data type, a set of stride and counter entries. More...

#include <signature_path.hh>

Inheritance diagram for gem5::prefetch::SignaturePath::PatternEntry:
gem5::TaggedEntry gem5::ReplaceableEntry

Public Member Functions

 PatternEntry (size_t num_strides, unsigned counter_bits, TagExtractor ext)
 
void invalidate () override
 Reset the entries to their initial values.
 
PatternStrideEntryfindStride (stride_t stride)
 Returns the entry with the desired stride.
 
PatternStrideEntrygetStrideEntry (stride_t stride)
 Gets the entry with the provided stride, if there is no entry with the associated stride, it replaces one of them.
 
- Public Member Functions inherited from gem5::TaggedEntry
 TaggedEntry ()
 
 ~TaggedEntry ()=default
 
void registerTagExtractor (TagExtractor ext)
 
virtual bool isValid () const
 Checks if the entry is valid.
 
bool isSecure () const
 Check if this block holds data from the secure memory space.
 
virtual Addr getTag () const
 Get tag associated to this block.
 
bool match (const KeyType &key) const
 Checks if the given tag information corresponds to this entry's.
 
virtual void insert (const KeyType &key)
 Insert the block by assigning it a tag and marking it valid.
 
std::string print () const override
 Prints relevant information about this entry.
 
- Public Member Functions inherited from gem5::ReplaceableEntry
 ReplaceableEntry ()
 
virtual ~ReplaceableEntry ()=default
 
virtual void setPosition (const uint32_t set, const uint32_t way)
 Set both the set and way.
 
uint32_t getSet () const
 Get set number.
 
uint32_t getWay () const
 Get way number.
 

Public Attributes

std::vector< PatternStrideEntrystrideEntries
 group of stides
 
SatCounter8 counter
 use counter, used by SPPv2
 
- Public Attributes inherited from gem5::ReplaceableEntry
std::shared_ptr< replacement_policy::ReplacementDatareplacementData
 Replacement data associated to this entry.
 

Additional Inherited Members

- Public Types inherited from gem5::TaggedEntry
using KeyType = TaggedTypes::KeyType
 
using IndexingPolicy = TaggedIndexingPolicy
 
using TagExtractor = std::function< Addr(Addr)>
 
- Protected Member Functions inherited from gem5::TaggedEntry
virtual void setTag (Addr tag)
 Set tag associated to this block.
 
virtual void setSecure ()
 Set secure bit.
 
void clearSecure ()
 Clear secure bit.
 
virtual void setValid ()
 Set valid bit.
 
- Protected Attributes inherited from gem5::TaggedEntry
TagExtractor extractTag
 Callback used to extract the tag from the entry.
 
- Protected Attributes inherited from gem5::ReplaceableEntry
uint32_t _set
 Set to which this entry belongs.
 
uint32_t _way
 Way (relative position within the set) to which this entry belongs.
 

Detailed Description

Pattern entry data type, a set of stride and counter entries.

Definition at line 103 of file signature_path.hh.

Constructor & Destructor Documentation

◆ PatternEntry()

gem5::prefetch::SignaturePath::PatternEntry::PatternEntry ( size_t  num_strides,
unsigned  counter_bits,
TagExtractor  ext 
)
inline

Member Function Documentation

◆ findStride()

PatternStrideEntry * gem5::prefetch::SignaturePath::PatternEntry::findStride ( stride_t  stride)
inline

Returns the entry with the desired stride.

Parameters
stridethe stride to find
Returns
a pointer to the entry, if the stride was found, or nullptr, if the stride was not found

Definition at line 135 of file signature_path.hh.

References gem5::ArmISA::stride, and strideEntries.

Referenced by getStrideEntry().

◆ getStrideEntry()

SignaturePath::PatternStrideEntry & gem5::prefetch::SignaturePath::PatternEntry::getStrideEntry ( stride_t  stride)

Gets the entry with the provided stride, if there is no entry with the associated stride, it replaces one of them.

Parameters
stridethe stride to find
Returns
reference to the selected entry

Definition at line 75 of file signature_path.cc.

References gem5::GenericSatCounter< T >::counter, gem5::prefetch::SignaturePath::PatternStrideEntry::counter, findStride(), gem5::GenericSatCounter< T >::reset(), gem5::ArmISA::stride, gem5::prefetch::SignaturePath::PatternStrideEntry::stride, and strideEntries.

Referenced by gem5::prefetch::SignaturePath::updatePatternTable().

◆ invalidate()

void gem5::prefetch::SignaturePath::PatternEntry::invalidate ( )
inlineoverridevirtual

Reset the entries to their initial values.

Reimplemented from gem5::TaggedEntry.

Definition at line 119 of file signature_path.hh.

References counter, gem5::TaggedEntry::invalidate(), gem5::GenericSatCounter< T >::reset(), and strideEntries.

Member Data Documentation

◆ counter

SatCounter8 gem5::prefetch::SignaturePath::PatternEntry::counter

◆ strideEntries

std::vector<PatternStrideEntry> gem5::prefetch::SignaturePath::PatternEntry::strideEntries

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

Generated on Mon Jan 13 2025 04:29:10 for gem5 by doxygen 1.9.8