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" |
48 |
49struct AccessMapPatternMatchingParams; |
50 |
51class AccessMapPatternMatching : public ClockedObject |
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; |
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: |
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 &m; 193 public: 194 AMPMPrefetcher(const AMPMPrefetcherParams* p); 195 ~AMPMPrefetcher() 196 {} |
197 void calculatePrefetch(const PrefetchInfo &pfi, 198 std::vector<AddrPriority> &addresses) override; 199}; 200#endif//__MEM_CACHE_PREFETCH_ACCESS_MAP_PATTERN_MATCHING_HH__ |