gem5  [DEVELOP-FOR-23.0]
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
irregular_stream_buffer.hh
Go to the documentation of this file.
1 
38 #ifndef __MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
39 #define __MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
40 
41 #include "base/callback.hh"
42 #include "base/sat_counter.hh"
45 
46 namespace gem5
47 {
48 
49 struct IrregularStreamBufferPrefetcherParams;
50 
51 namespace prefetch
52 {
53 
55 {
57  const size_t chunkSize;
61  const unsigned degree;
62 
68  {
71  };
74 
77  {
81  {}
82  };
83 
89  {
91  AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
92  : TaggedEntry(), mappings(num_mappings, counter_bits)
93  {
94  }
95 
96  void
97  invalidate() override
98  {
100  for (auto &entry : mappings) {
101  entry.address = 0;
102  entry.counter.reset();
103  }
104  }
105  };
106 
116 
123  void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure,
124  Addr physical_address);
125 
134  AddressMapping& getPSMapping(Addr paddr, bool is_secure);
135  public:
136  IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p);
137  ~IrregularStreamBuffer() = default;
138 
139  void calculatePrefetch(const PrefetchInfo &pfi,
140  std::vector<AddrPriority> &addresses) override;
141 };
142 
143 } // namespace prefetch
144 } // namespace gem5
145 
146 #endif//__MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
gem5::prefetch::IrregularStreamBuffer::AddressMapping::AddressMapping
AddressMapping(unsigned bits)
Definition: irregular_stream_buffer.hh:80
gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry::lastAddress
Addr lastAddress
Definition: irregular_stream_buffer.hh:69
gem5::prefetch::IrregularStreamBuffer::getPSMapping
AddressMapping & getPSMapping(Addr paddr, bool is_secure)
Obtain the Physical-to-Structured mapping entry of the given physical address.
Definition: irregular_stream_buffer.cc:175
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry
Maps a set of contiguous addresses to another set of (not necessarily contiguos) addresses,...
Definition: irregular_stream_buffer.hh:88
gem5::prefetch::IrregularStreamBuffer::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: irregular_stream_buffer.cc:68
gem5::prefetch::IrregularStreamBuffer::AddressMapping::address
Addr address
Definition: irregular_stream_buffer.hh:78
gem5::prefetch::IrregularStreamBuffer
Definition: irregular_stream_buffer.hh:54
std::vector
STL vector class.
Definition: stl.hh:37
gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry
Training Unit Entry datatype, it holds the last accessed address and its secure flag.
Definition: irregular_stream_buffer.hh:67
gem5::prefetch::IrregularStreamBuffer::AddressMapping::counter
SatCounter8 counter
Definition: irregular_stream_buffer.hh:79
gem5::prefetch::IrregularStreamBuffer::~IrregularStreamBuffer
~IrregularStreamBuffer()=default
sat_counter.hh
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry::AddressMappingEntry
AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
Definition: irregular_stream_buffer.hh:91
queued.hh
gem5::prefetch::IrregularStreamBuffer::prefetchCandidatesPerEntry
const unsigned prefetchCandidatesPerEntry
Number of prefetch candidates per Physical-to-Structural entry.
Definition: irregular_stream_buffer.hh:59
gem5::GenericSatCounter< uint8_t >
gem5::prefetch::IrregularStreamBuffer::trainingUnit
AssociativeSet< TrainingUnitEntry > trainingUnit
Map of PCs to Training unit entries.
Definition: irregular_stream_buffer.hh:73
gem5::TaggedEntry
A tagged entry is an entry containing a tag.
Definition: tagged_entry.hh:46
gem5::VegaISA::p
Bitfield< 54 > p
Definition: pagetable.hh:70
gem5::prefetch::IrregularStreamBuffer::addStructuralToPhysicalEntry
void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure, Addr physical_address)
Add a mapping to the Structured-to-Physica mapping table.
Definition: irregular_stream_buffer.cc:194
gem5::AssociativeSet
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
Definition: associative_set.hh:45
gem5::prefetch::IrregularStreamBuffer::IrregularStreamBuffer
IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p)
Definition: irregular_stream_buffer.cc:41
gem5::prefetch::IrregularStreamBuffer::chunkSize
const size_t chunkSize
Size in bytes of a temporal stream.
Definition: irregular_stream_buffer.hh:57
gem5::prefetch::IrregularStreamBuffer::degree
const unsigned degree
Number of maximum prefetches requests created when predicting.
Definition: irregular_stream_buffer.hh:61
gem5::bits
constexpr T bits(T val, unsigned first, unsigned last)
Extract the bitfield from position 'first' to 'last' (inclusive) from 'val' and right justify it.
Definition: bitfield.hh:76
gem5::TaggedEntry::invalidate
virtual void invalidate()
Invalidate the block.
Definition: tagged_entry.hh:103
gem5::prefetch::IrregularStreamBuffer::spAddressMappingCache
AssociativeSet< AddressMappingEntry > spAddressMappingCache
Structured-to-Physical mappings table.
Definition: irregular_stream_buffer.hh:110
gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry::lastAddressSecure
bool lastAddressSecure
Definition: irregular_stream_buffer.hh:70
gem5::prefetch::IrregularStreamBuffer::structuralAddressCounter
uint64_t structuralAddressCounter
Counter of allocated structural addresses, increased by "chunkSize", each time a new structured addre...
Definition: irregular_stream_buffer.hh:115
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::prefetch::IrregularStreamBuffer::psAddressMappingCache
AssociativeSet< AddressMappingEntry > psAddressMappingCache
Physical-to-Structured mappings table.
Definition: irregular_stream_buffer.hh:108
gem5::prefetch::Queued
Definition: queued.hh:59
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry::mappings
std::vector< AddressMapping > mappings
Definition: irregular_stream_buffer.hh:90
gem5::prefetch::IrregularStreamBuffer::AddressMapping
Address Mapping entry, holds an address and a confidence counter.
Definition: irregular_stream_buffer.hh:76
associative_set.hh
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: gpu_translation_state.hh:37
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry::invalidate
void invalidate() override
Invalidate the block.
Definition: irregular_stream_buffer.hh:97
gem5::prefetch::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:96
callback.hh

Generated on Sun Jul 30 2023 01:56:57 for gem5 by doxygen 1.8.17