gem5  v21.1.0.2
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 
52 namespace prefetch
53 {
54 
56 {
58  const size_t chunkSize;
62  const unsigned degree;
63 
69  {
72  };
75 
78  {
82  {}
83  };
84 
90  {
92  AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
93  : TaggedEntry(), mappings(num_mappings, counter_bits)
94  {
95  }
96 
97  void
98  invalidate() override
99  {
101  for (auto &entry : mappings) {
102  entry.address = 0;
103  entry.counter.reset();
104  }
105  }
106  };
107 
117 
124  void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure,
125  Addr physical_address);
126 
135  AddressMapping& getPSMapping(Addr paddr, bool is_secure);
136  public:
137  IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p);
138  ~IrregularStreamBuffer() = default;
139 
140  void calculatePrefetch(const PrefetchInfo &pfi,
141  std::vector<AddrPriority> &addresses) override;
142 };
143 
144 } // namespace prefetch
145 } // namespace gem5
146 
147 #endif//__MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
gem5::prefetch::IrregularStreamBuffer::AddressMapping::AddressMapping
AddressMapping(unsigned bits)
Definition: irregular_stream_buffer.hh:81
gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry::lastAddress
Addr lastAddress
Definition: irregular_stream_buffer.hh:70
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:176
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry
Maps a set of contiguous addresses to another set of (not necessarily contiguos) addresses,...
Definition: irregular_stream_buffer.hh:89
gem5::prefetch::IrregularStreamBuffer::calculatePrefetch
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Definition: irregular_stream_buffer.cc:69
gem5::prefetch::IrregularStreamBuffer::AddressMapping::address
Addr address
Definition: irregular_stream_buffer.hh:79
gem5::prefetch::IrregularStreamBuffer
Definition: irregular_stream_buffer.hh:55
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:68
gem5::prefetch::IrregularStreamBuffer::AddressMapping::counter
SatCounter8 counter
Definition: irregular_stream_buffer.hh:80
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:92
queued.hh
gem5::prefetch::IrregularStreamBuffer::prefetchCandidatesPerEntry
const unsigned prefetchCandidatesPerEntry
Number of prefetch candidates per Physical-to-Structural entry.
Definition: irregular_stream_buffer.hh:60
gem5::GenericSatCounter< uint8_t >
gem5::prefetch::IrregularStreamBuffer::trainingUnit
AssociativeSet< TrainingUnitEntry > trainingUnit
Map of PCs to Training unit entries.
Definition: irregular_stream_buffer.hh:74
gem5::TaggedEntry
A tagged entry is an entry containing a tag.
Definition: tagged_entry.hh:46
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:195
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::MipsISA::p
Bitfield< 0 > p
Definition: pra_constants.hh:326
gem5::prefetch::IrregularStreamBuffer::IrregularStreamBuffer
IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p)
Definition: irregular_stream_buffer.cc:42
gem5::prefetch::IrregularStreamBuffer::chunkSize
const size_t chunkSize
Size in bytes of a temporal stream.
Definition: irregular_stream_buffer.hh:58
gem5::prefetch::IrregularStreamBuffer::degree
const unsigned degree
Number of maximum prefetches requests created when predicting.
Definition: irregular_stream_buffer.hh:62
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:111
gem5::prefetch::IrregularStreamBuffer::TrainingUnitEntry::lastAddressSecure
bool lastAddressSecure
Definition: irregular_stream_buffer.hh:71
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:116
gem5::Addr
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
gem5::GEM5_DEPRECATED_NAMESPACE
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
gem5::prefetch::IrregularStreamBuffer::psAddressMappingCache
AssociativeSet< AddressMappingEntry > psAddressMappingCache
Physical-to-Structured mappings table.
Definition: irregular_stream_buffer.hh:109
gem5::prefetch::Queued
Definition: queued.hh:60
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry::mappings
std::vector< AddressMapping > mappings
Definition: irregular_stream_buffer.hh:91
gem5::prefetch::IrregularStreamBuffer::AddressMapping
Address Mapping entry, holds an address and a confidence counter.
Definition: irregular_stream_buffer.hh:77
associative_set.hh
gem5::context_switch_task_id::Prefetcher
@ Prefetcher
Definition: request.hh:83
gem5
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Definition: decoder.cc:40
gem5::prefetch::IrregularStreamBuffer::AddressMappingEntry::invalidate
void invalidate() override
Invalidate the block.
Definition: irregular_stream_buffer.hh:98
gem5::prefetch::Base::PrefetchInfo
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:97
callback.hh

Generated on Tue Sep 21 2021 12:25:29 for gem5 by doxygen 1.8.17