gem5  v19.0.0.0
irregular_stream_buffer.hh
Go to the documentation of this file.
1 
40 #ifndef __MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
41 #define __MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
42 
43 #include "base/callback.hh"
44 #include "base/sat_counter.hh"
47 
48 struct IrregularStreamBufferPrefetcherParams;
49 
51 {
53  const size_t chunkSize;
57  const unsigned degree;
58 
63  struct TrainingUnitEntry : public TaggedEntry {
66  };
69 
71  struct AddressMapping {
74  AddressMapping(unsigned bits) : address(0), counter(bits)
75  {}
76  };
77 
83  {
85  AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
86  : TaggedEntry(), mappings(num_mappings, counter_bits)
87  {
88  }
89 
90  void
91  invalidate() override
92  {
94  for (auto &entry : mappings) {
95  entry.address = 0;
96  entry.counter.reset();
97  }
98  }
99  };
100 
110 
117  void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure,
118  Addr physical_address);
119 
128  AddressMapping& getPSMapping(Addr paddr, bool is_secure);
129  public:
131  const IrregularStreamBufferPrefetcherParams *p);
133  void calculatePrefetch(const PrefetchInfo &pfi,
134  std::vector<AddrPriority> &addresses) override;
135 };
136 #endif//__MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
const unsigned degree
Number of maximum prefetches requests created when predicting.
const size_t chunkSize
Size in bytes of a temporal stream.
Training Unit Entry datatype, it holds the last accessed address and its secure flag.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses) override
Address Mapping entry, holds an address and a confidence counter.
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.
STL vector class.
Definition: stl.hh:40
Class containing the information needed by the prefetch to train and generate new prefetch requests...
Definition: base.hh:92
AssociativeSet< AddressMappingEntry > psAddressMappingCache
Physical-to-Structured mappings table.
Implements an n bit saturating counter and provides methods to increment, decrement, and read it.
Definition: sat_counter.hh:57
AssociativeSet< TrainingUnitEntry > trainingUnit
Map of PCs to Training unit entries.
IrregularStreamBufferPrefetcher(const IrregularStreamBufferPrefetcherParams *p)
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition: types.hh:142
Associative container based on the previosuly defined Entry type Each element is indexed by a key of ...
AddressMapping & getPSMapping(Addr paddr, bool is_secure)
Obtain the Physical-to-Structured mapping entry of the given physical address.
const unsigned prefetchCandidatesPerEntry
Number of prefetch candidates per Physical-to-Structural entry.
Maps a set of contiguous addresses to another set of (not necessarily contiguos) addresses, with their corresponding confidence counters.
AddressMappingEntry(size_t num_mappings, unsigned counter_bits)
Copyright (c) 2018 Metempsy Technology Consulting All rights reserved.
uint64_t structuralAddressCounter
Counter of allocated structural addresses, increased by "chunkSize", each time a new structured addre...
T bits(T val, int first, int last)
Extract the bitfield from position &#39;first&#39; to &#39;last&#39; (inclusive) from &#39;val&#39; and right justify it...
Definition: bitfield.hh:72
virtual void invalidate()
Invalidates the entry.
Bitfield< 0 > p

Generated on Fri Feb 28 2020 16:27:01 for gem5 by doxygen 1.8.13