From cda8f99a5664a79f94b9ce84a4c6f456cf0ea976 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Wed, 30 Mar 2005 04:46:04 -0500 Subject: First pass at a prefetcher SConscript: Add prefetcher to the compilation base/traceflags.py: Add a trace flag for hardware prefetches --HG-- extra : convert_revision : bc210192a2b75b1470b2cd9d5d470fc61cb11315 --- SConscript | 1 + base/traceflags.py | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/SConscript b/SConscript index 19f84f913..6fe99b314 100644 --- a/SConscript +++ b/SConscript @@ -164,6 +164,7 @@ base_sources = Split(''' mem/cache/miss/miss_queue.cc mem/cache/miss/mshr.cc mem/cache/miss/mshr_queue.cc + mem/cache/miss/prefetcher.cc mem/cache/tags/base_tags.cc mem/cache/tags/cache_tags.cc mem/cache/tags/fa_lru.cc diff --git a/base/traceflags.py b/base/traceflags.py index 800c47bd3..74b87e1b9 100644 --- a/base/traceflags.py +++ b/base/traceflags.py @@ -123,7 +123,8 @@ baseFlags = [ 'Uart', 'Split', 'SQL', - 'Thread' + 'Thread', + 'HWPrefetch' ] # -- cgit v1.2.3 From 13608a9b85a60982a9fa0ebee38a1d15c0ea5fc5 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Wed, 30 Mar 2005 15:05:58 -0500 Subject: Rework the way the prefetcher is used. Now we copy the request from the prefetch queue and into the mq when issued objects/BaseCache.mpy: Add some parameters for prefetcher --HG-- extra : convert_revision : 1a2e6d2ce5359fab0a4d5d4639a701131101d68c --- objects/BaseCache.mpy | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/objects/BaseCache.mpy b/objects/BaseCache.mpy index 98a422e30..314a4efda 100644 --- a/objects/BaseCache.mpy +++ b/objects/BaseCache.mpy @@ -36,3 +36,7 @@ simobj BaseCache(BaseMem): two_queue = Param.Bool(False, "whether the lifo should have two queue replacement") write_buffers = Param.Int(8, "number of write buffers") + use_prefetcher = Param.Bool(False, + "wheter you are using the hardware prefetcher") + prefetcher_size = Param.Int(100, + "Number of entries in the harware prefetch queue") -- cgit v1.2.3 From c21bf8e7aebe9157488f300edbf378d9a2d3cf71 Mon Sep 17 00:00:00 2001 From: Ron Dreslinski Date: Fri, 1 Apr 2005 19:26:44 -0500 Subject: Another pass at the prefetcher. Now it works with both miss and access reference streams. Reworked how it is instattiated and how it communicates with other cache objects. SConscript: Compile all the prefetcher files objects/BaseCache.mpy: Add parameters for prefetcher --HG-- extra : convert_revision : 2faa81c17673420ffae72a50a27e310d4c0f4135 --- SConscript | 5 ++++- objects/BaseCache.mpy | 9 +++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/SConscript b/SConscript index 6fe99b314..444f71afe 100644 --- a/SConscript +++ b/SConscript @@ -164,7 +164,10 @@ base_sources = Split(''' mem/cache/miss/miss_queue.cc mem/cache/miss/mshr.cc mem/cache/miss/mshr_queue.cc - mem/cache/miss/prefetcher.cc + mem/cache/prefetch/base_prefetcher.cc + mem/cache/prefetch/prefetcher.cc + mem/cache/prefetch/stride_prefetcher.cc + mem/cache/prefetch/tagged_prefetcher.cc mem/cache/tags/base_tags.cc mem/cache/tags/cache_tags.cc mem/cache/tags/fa_lru.cc diff --git a/objects/BaseCache.mpy b/objects/BaseCache.mpy index 314a4efda..cb3e56de6 100644 --- a/objects/BaseCache.mpy +++ b/objects/BaseCache.mpy @@ -36,7 +36,12 @@ simobj BaseCache(BaseMem): two_queue = Param.Bool(False, "whether the lifo should have two queue replacement") write_buffers = Param.Int(8, "number of write buffers") - use_prefetcher = Param.Bool(False, - "wheter you are using the hardware prefetcher") + prefetch_miss = Param.Bool(False, + "wheter you are using the hardware prefetcher from Miss stream") + prefetch_access = Param.Bool(False, + "wheter you are using the hardware prefetcher from Access stream") prefetcher_size = Param.Int(100, "Number of entries in the harware prefetch queue") + prefetch_past_page = Param.Bool(False, + "Allow prefetches to cross virtual page boundaries") + -- cgit v1.2.3