gem5 v24.1.0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
sms.hh
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Samsung Electronics
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution;
12 * neither the name of the copyright holders nor the names of its
13 * contributors may be used to endorse or promote products derived from
14 * this software without specific prior written permission.
15 *
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
17 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
18 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
19 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
20 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
34#ifndef __MEM_CACHE_PREFETCH_SMS_HH__
35#define __MEM_CACHE_PREFETCH_SMS_HH__
36
37#include <set>
38
40#include "mem/packet.hh"
41
42namespace gem5
43{
44
45struct SmsPrefetcherParams;
46
47namespace prefetch
48{
49
50
51class Sms : public Queued
52{
53
54 private:
55 const int Max_Contexts; //= 64;
56 const uint64_t MAX_PHTSize; //= 512;
57 const Addr Region_Size; //= 4096;
58
59 std::map< Addr, std::set<Addr> > AGT;
60 std::map< Addr, std::pair<Addr,Addr> > AGTPC;
61 std::map< Addr, std::pair<Addr,Addr> > FT;
62 std::map< std::pair <Addr,Addr> , std::set<Addr> > PHT;
66
68 void notifyEvict(const EvictionInfo &info) override;
69
70 public:
71 Sms(const SmsPrefetcherParams &p);
72 ~Sms() = default;
73
74 void calculatePrefetch(const PrefetchInfo &pfi,
76 const CacheAccessor &cache) override;
77};
78
79} // namespace prefetch
80} // namespace gem5
81
82#endif // __MEM_CACHE_PREFETCH_SMS_HH__
Class containing the information needed by the prefetch to train and generate new prefetch requests.
Definition base.hh:111
std::map< Addr, std::pair< Addr, Addr > > AGTPC
Definition sms.hh:60
void calculatePrefetch(const PrefetchInfo &pfi, std::vector< AddrPriority > &addresses, const CacheAccessor &cache) override
Definition sms.cc:86
const int Max_Contexts
Definition sms.hh:55
std::map< Addr, std::pair< Addr, Addr > > FT
Definition sms.hh:61
std::deque< std::pair< Addr, Addr > > lruPHT
Definition sms.hh:65
const Addr Region_Size
Definition sms.hh:57
std::deque< Addr > lruAGT
Definition sms.hh:64
std::map< std::pair< Addr, Addr >, std::set< Addr > > PHT
Definition sms.hh:62
void notifyEvict(const EvictionInfo &info) override
Notify prefetcher of cache eviction.
Definition sms.cc:59
std::deque< Addr > fifoFT
Definition sms.hh:63
std::map< Addr, std::set< Addr > > AGT
Definition sms.hh:59
const uint64_t MAX_PHTSize
Definition sms.hh:56
STL deque class.
Definition stl.hh:44
STL vector class.
Definition stl.hh:37
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
Declaration of the Packet class.
Provides generic cache lookup functions.
A data contents update is composed of the updated block's address, the old contents,...

Generated on Mon Jan 13 2025 04:28:38 for gem5 by doxygen 1.9.8