gem5 v24.0.0.0
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
41#include "base/callback.hh"
42#include "base/sat_counter.hh"
45
46namespace gem5
47{
48
49struct IrregularStreamBufferPrefetcherParams;
50
51namespace prefetch
52{
53
55{
57 const size_t chunkSize;
61 const unsigned degree;
62
74
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);
138
139 void calculatePrefetch(const PrefetchInfo &pfi,
140 std::vector<AddrPriority> &addresses,
141 const CacheAccessor &cache) 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.
void invalidate() override
Invalidate the block.
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.
const size_t chunkSize
Size in bytes of a temporal stream.
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
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:79
Bitfield< 0 > p
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria 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)
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 Tue Jun 18 2024 16:24:05 for gem5 by doxygen 1.11.0