summaryrefslogtreecommitdiff
path: root/src/mem/cache/prefetch
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem/cache/prefetch')
-rw-r--r--src/mem/cache/prefetch/base_prefetcher.cc9
-rw-r--r--src/mem/cache/prefetch/base_prefetcher.hh4
-rw-r--r--src/mem/cache/prefetch/ghb_prefetcher.hh9
-rw-r--r--src/mem/cache/prefetch/stride_prefetcher.hh9
-rw-r--r--src/mem/cache/prefetch/tagged_prefetcher.cc10
-rw-r--r--src/mem/cache/prefetch/tagged_prefetcher.hh4
6 files changed, 17 insertions, 28 deletions
diff --git a/src/mem/cache/prefetch/base_prefetcher.cc b/src/mem/cache/prefetch/base_prefetcher.cc
index 378363665..1af900849 100644
--- a/src/mem/cache/prefetch/base_prefetcher.cc
+++ b/src/mem/cache/prefetch/base_prefetcher.cc
@@ -39,10 +39,11 @@
#include "mem/request.hh"
#include <list>
-BasePrefetcher::BasePrefetcher(int size, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData)
- :size(size), pageStop(pageStop), serialSquash(serialSquash),
- cacheCheckPush(cacheCheckPush), only_data(onlyData)
+BasePrefetcher::BasePrefetcher(const BaseCacheParams *p)
+ : size(p->prefetcher_size), pageStop(!p->prefetch_past_page),
+ serialSquash(p->prefetch_serial_squash),
+ cacheCheckPush(p->prefetch_cache_check_push),
+ only_data(p->prefetch_data_accesses_only)
{
}
diff --git a/src/mem/cache/prefetch/base_prefetcher.hh b/src/mem/cache/prefetch/base_prefetcher.hh
index 2780f5e5a..1515d8a93 100644
--- a/src/mem/cache/prefetch/base_prefetcher.hh
+++ b/src/mem/cache/prefetch/base_prefetcher.hh
@@ -40,6 +40,7 @@
#include "base/statistics.hh"
#include "mem/packet.hh"
+#include "params/BaseCache.hh"
class BaseCache;
@@ -89,8 +90,7 @@ class BasePrefetcher
void regStats(const std::string &name);
public:
- BasePrefetcher(int numMSHRS, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData);
+ BasePrefetcher(const BaseCacheParams *p);
virtual ~BasePrefetcher() {}
diff --git a/src/mem/cache/prefetch/ghb_prefetcher.hh b/src/mem/cache/prefetch/ghb_prefetcher.hh
index f31b56dcf..c44e9c456 100644
--- a/src/mem/cache/prefetch/ghb_prefetcher.hh
+++ b/src/mem/cache/prefetch/ghb_prefetcher.hh
@@ -51,12 +51,9 @@ class GHBPrefetcher : public BasePrefetcher
public:
- GHBPrefetcher(int size, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData,
- Tick latency, int degree, bool useCPUId)
- : BasePrefetcher(size, pageStop, serialSquash,
- cacheCheckPush, onlyData),
- latency(latency), degree(degree), useCPUId(useCPUId)
+ GHBPrefetcher(const BaseCacheParams *p)
+ : BasePrefetcher(p), latency(p->prefetch_latency),
+ degree(p->prefetch_degree), useCPUId(p->prefetch_use_cpu_id)
{
}
diff --git a/src/mem/cache/prefetch/stride_prefetcher.hh b/src/mem/cache/prefetch/stride_prefetcher.hh
index 831e60fb4..4d5ac2f0d 100644
--- a/src/mem/cache/prefetch/stride_prefetcher.hh
+++ b/src/mem/cache/prefetch/stride_prefetcher.hh
@@ -68,12 +68,9 @@ class StridePrefetcher : public BasePrefetcher
public:
- StridePrefetcher(int size, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData,
- Tick latency, int degree, bool useCPUId)
- : BasePrefetcher(size, pageStop, serialSquash,
- cacheCheckPush, onlyData),
- latency(latency), degree(degree), useCPUId(useCPUId)
+ StridePrefetcher(const BaseCacheParams *p)
+ : BasePrefetcher(p), latency(p->prefetch_latency),
+ degree(p->prefetch_degree), useCPUId(p->prefetch_use_cpu_id)
{
}
diff --git a/src/mem/cache/prefetch/tagged_prefetcher.cc b/src/mem/cache/prefetch/tagged_prefetcher.cc
index bc1fa46b9..b25cb5054 100644
--- a/src/mem/cache/prefetch/tagged_prefetcher.cc
+++ b/src/mem/cache/prefetch/tagged_prefetcher.cc
@@ -36,13 +36,9 @@
#include "arch/isa_traits.hh"
#include "mem/cache/prefetch/tagged_prefetcher.hh"
-TaggedPrefetcher::
-TaggedPrefetcher(int size, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData,
- Tick latency, int degree)
- : BasePrefetcher(size, pageStop, serialSquash,
- cacheCheckPush, onlyData),
- latency(latency), degree(degree)
+TaggedPrefetcher::TaggedPrefetcher(const BaseCacheParams *p)
+ : BasePrefetcher(p),
+ latency(p->prefetch_latency), degree(p->prefetch_degree)
{
}
diff --git a/src/mem/cache/prefetch/tagged_prefetcher.hh b/src/mem/cache/prefetch/tagged_prefetcher.hh
index b9d228aba..f3094445f 100644
--- a/src/mem/cache/prefetch/tagged_prefetcher.hh
+++ b/src/mem/cache/prefetch/tagged_prefetcher.hh
@@ -47,9 +47,7 @@ class TaggedPrefetcher : public BasePrefetcher
public:
- TaggedPrefetcher(int size, bool pageStop, bool serialSquash,
- bool cacheCheckPush, bool onlyData,
- Tick latency, int degree);
+ TaggedPrefetcher(const BaseCacheParams *p);
~TaggedPrefetcher() {}