gem5  v22.1.0.0
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);
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__
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
A tagged entry is an entry containing a tag.
Definition: tagged_entry.hh:47
virtual void invalidate()
Invalidate the block.
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition: base.hh:98
const unsigned prefetchCandidatesPerEntry
Number of prefetch candidates per Physical-to-Structural entry.
const size_t chunkSize
Size in bytes of a temporal stream.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
uint64_t structuralAddressCounter
Counter of allocated structural addresses, increased by "chunkSize", each time a new structured addre...
AddressMapping & getPSMapping(Addr paddr, bool is_secure)
Obtain the Physical-to-Structured mapping entry of the given physical address.
IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p)
AssociativeSet< AddressMappingEntry > spAddressMappingCache
Structured-to-Physical mappings table.
void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure, Addr physical_address)
Add a mapping to the Structured-to-Physica mapping table.
const unsigned degree
Number of maximum prefetches requests created when predicting.
AssociativeSet< TrainingUnitEntry > trainingUnit
Map of PCs to Training unit entries.
AssociativeSet< AddressMappingEntry > psAddressMappingCache
Physical-to-Structured mappings table.
STL vector class.
Definition: stl.hh:37
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
Bitfield< 54 > p
Definition: pagetable.hh:70
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:147
GEM5_DEPRECATED_NAMESPACE(GuestABI, guest_abi)
Maps a set of contiguous addresses to another set of (not necessarily contiguos) addresses,...
AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
Address Mapping entry, holds an address and a confidence counter.
Training Unit Entry datatype, it holds the last accessed address and its secure flag.

Generated on Wed Dec 21 2022 10:22:36 for gem5 by doxygen 1.9.1