access_map_pattern_matching.hh (13554:f16adb9b35cc) access_map_pattern_matching.hh (13700:56fa28e6fab4)
1/**
2 * Copyright (c) 2018 Metempsy Technology Consulting
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;

--- 30 unchanged lines hidden (view full) ---

39
40#ifndef __MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__
41#define __MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__
42
43#include "mem/cache/base.hh"
44#include "mem/cache/prefetch/associative_set.hh"
45#include "mem/cache/prefetch/queued.hh"
46#include "mem/packet.hh"
1/**
2 * Copyright (c) 2018 Metempsy Technology Consulting
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;

--- 30 unchanged lines hidden (view full) ---

39
40#ifndef __MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__
41#define __MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__
42
43#include "mem/cache/base.hh"
44#include "mem/cache/prefetch/associative_set.hh"
45#include "mem/cache/prefetch/queued.hh"
46#include "mem/packet.hh"
47#include "sim/clocked_object.hh"
47
48
48struct AccessMapPatternMatchingPrefetcherParams;
49struct AccessMapPatternMatchingParams;
49
50
50class AccessMapPatternMatchingPrefetcher : public QueuedPrefetcher
51class AccessMapPatternMatching : public ClockedObject
51{
52{
53 /** Cacheline size used by the prefetcher using this object */
54 const unsigned blkSize;
55 /** Limit the stride checking to -limitStride/+limitStride */
56 const unsigned limitStride;
52 /** Maximum number of prefetch generated */
53 const unsigned startDegree;
54 /** Amount of memory covered by a hot zone */
55 const uint64_t hotZoneSize;
56 /** A prefetch coverage factor bigger than this is considered high */
57 const double highCoverageThreshold;
58 /** A prefetch coverage factor smaller than this is considered low */
59 const double lowCoverageThreshold;

--- 108 unchanged lines hidden (view full) ---

168 * This event constitues the epoch of the statistics that keep track of
169 * the prefetcher accuracy, when this event triggers, the prefetcher degree
170 * is adjusted and the statistics counters are reset.
171 */
172 void processEpochEvent();
173 EventFunctionWrapper epochEvent;
174
175 public:
57 /** Maximum number of prefetch generated */
58 const unsigned startDegree;
59 /** Amount of memory covered by a hot zone */
60 const uint64_t hotZoneSize;
61 /** A prefetch coverage factor bigger than this is considered high */
62 const double highCoverageThreshold;
63 /** A prefetch coverage factor smaller than this is considered low */
64 const double lowCoverageThreshold;

--- 108 unchanged lines hidden (view full) ---

173 * This event constitues the epoch of the statistics that keep track of
174 * the prefetcher accuracy, when this event triggers, the prefetcher degree
175 * is adjusted and the statistics counters are reset.
176 */
177 void processEpochEvent();
178 EventFunctionWrapper epochEvent;
179
180 public:
176 AccessMapPatternMatchingPrefetcher(
177 const AccessMapPatternMatchingPrefetcherParams* p);
178 ~AccessMapPatternMatchingPrefetcher() {}
181 AccessMapPatternMatching(const AccessMapPatternMatchingParams* p);
182 ~AccessMapPatternMatching()
183 {}
184 void calculatePrefetch(const BasePrefetcher::PrefetchInfo &pfi,
185 std::vector<QueuedPrefetcher::AddrPriority> &addresses);
186};
187
188struct AMPMPrefetcherParams;
189
190class AMPMPrefetcher : public QueuedPrefetcher
191{
192 AccessMapPatternMatching &ampm;
193 public:
194 AMPMPrefetcher(const AMPMPrefetcherParams* p);
195 ~AMPMPrefetcher()
196 {}
179 void calculatePrefetch(const PrefetchInfo &pfi,
180 std::vector<AddrPriority> &addresses) override;
181};
182#endif//__MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__
197 void calculatePrefetch(const PrefetchInfo &pfi,
198 std::vector<AddrPriority> &addresses) override;
199};
200#endif//__MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__