gem5 v24.1.0.1
Loading...
Searching...
No Matches
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
42#include "base/callback.hh"
43#include "base/sat_counter.hh"
46
47namespace gem5
48{
49
50struct IrregularStreamBufferPrefetcherParams;
51
52namespace prefetch
53{
54
56{
58 const size_t chunkSize;
62 const unsigned degree;
63
80
89
95 {
97 AddressMappingEntry(size_t num_mappings, unsigned counter_bits,
99 : TaggedEntry(), mappings(num_mappings, counter_bits)
100 {
102 }
103
104 void
105 invalidate() override
106 {
108 for (auto &entry : mappings) {
109 entry.address = 0;
110 entry.counter.reset();
111 }
112 }
113 };
114
124
131 void addStructuralToPhysicalEntry(Addr structuralAddress, bool is_secure,
132 Addr physical_address);
133
142 AddressMapping& getPSMapping(Addr paddr, bool is_secure);
143 public:
144 IrregularStreamBuffer(const IrregularStreamBufferPrefetcherParams &p);
146
147 void calculatePrefetch(const PrefetchInfo &pfi,
148 std::vector<AddrPriority> &addresses,
149 const CacheAccessor &cache) override;
150};
151
152} // namespace prefetch
153} // namespace gem5
154
155#endif//__MEM_CACHE_PREFETCH_IRREGULAR_STREAM_BUFFER_HH__
A tagged entry is an entry containing a tag.
void registerTagExtractor(TagExtractor ext)
virtual void invalidate()
Invalidate the block.
std::function< Addr(Addr)> TagExtractor
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition base.hh:111
const unsigned prefetchCandidatesPerEntry
Number of prefetch candidates per Physical-to-Structural entry.
AssociativeCache< TrainingUnitEntry > trainingUnit
Map of PCs to Training unit entries.
const size_t chunkSize
Size in bytes of a temporal stream.
AssociativeCache< AddressMappingEntry > psAddressMappingCache
Physical-to-Structured mappings table.
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.
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
AssociativeCache< 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.
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:79
Bitfield< 12 > ext
Bitfield< 0 > p
Copyright (c) 2024 Arm Limited All rights reserved.
Definition binary32.hh:36
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
Definition types.hh:147
Provides generic cache lookup functions.
Maps a set of contiguous addresses to another set of (not necessarily contiguos) addresses,...
AddressMappingEntry(size_t num_mappings, unsigned counter_bits, TagExtractor ext)
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 Mon Jan 13 2025 04:28:38 for gem5 by doxygen 1.9.8