Gabe Black has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/50351 )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
 )Change subject: mem-ruby: Replace the sys param with a page_shift param.
......................................................................

mem-ruby: Replace the sys param with a page_shift param.

This parameter defaults to a shift which corresponds to a 4K page.

Change-Id: I259081a75cd6e7286d65f1e7dcdc657404397426
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/50351
Tested-by: kokoro <[email protected]>
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/mem/ruby/structures/RubyPrefetcher.cc
M src/mem/ruby/structures/RubyPrefetcher.hh
M src/mem/ruby/structures/RubyPrefetcher.py
3 files changed, 20 insertions(+), 5 deletions(-)

Approvals:
  Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass




diff --git a/src/mem/ruby/structures/RubyPrefetcher.cc b/src/mem/ruby/structures/RubyPrefetcher.cc
index 3155498..e45eff2 100644
--- a/src/mem/ruby/structures/RubyPrefetcher.cc
+++ b/src/mem/ruby/structures/RubyPrefetcher.cc
@@ -62,7 +62,7 @@
     negativeFilter(p.unit_filter),
     nonUnitFilter(p.nonunit_filter),
     m_prefetch_cross_pages(p.cross_page),
-    m_page_shift(p.sys->getPageShift()),
+    pageShift(p.page_shift),
     rubyPrefetcherStats(this)
 {
     assert(m_num_streams > 0);
@@ -378,7 +378,7 @@
 Addr
 RubyPrefetcher::pageAddress(Addr addr) const
 {
-    return mbits<Addr>(addr, 63, m_page_shift);
+    return mbits<Addr>(addr, 63, pageShift);
 }

 } // namespace ruby
diff --git a/src/mem/ruby/structures/RubyPrefetcher.hh b/src/mem/ruby/structures/RubyPrefetcher.hh
index b5263e9..51e1b3c 100644
--- a/src/mem/ruby/structures/RubyPrefetcher.hh
+++ b/src/mem/ruby/structures/RubyPrefetcher.hh
@@ -55,7 +55,6 @@
 #include "mem/ruby/system/RubySystem.hh"
 #include "params/RubyPrefetcher.hh"
 #include "sim/sim_object.hh"
-#include "sim/system.hh"

 #define MAX_PF_INFLIGHT 8

@@ -238,7 +237,7 @@

         AbstractController *m_controller;

-        const Addr m_page_shift;
+        const unsigned pageShift;

         struct RubyPrefetcherStats : public statistics::Group
         {
diff --git a/src/mem/ruby/structures/RubyPrefetcher.py b/src/mem/ruby/structures/RubyPrefetcher.py
index d004e01..ade55af 100644
--- a/src/mem/ruby/structures/RubyPrefetcher.py
+++ b/src/mem/ruby/structures/RubyPrefetcher.py
@@ -57,7 +57,8 @@
     num_startup_pfs = Param.UInt32(1, "")
cross_page = Param.Bool(False, """True if prefetched address can be on a
             page different from the observed address""")
-    sys = Param.System(Parent.any, "System this prefetcher belongs to")
+    page_shift = Param.UInt32(12,
+        "Number of bits to mask to get a page number")

 class Prefetcher(RubyPrefetcher):
     """DEPRECATED"""

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/50351
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I259081a75cd6e7286d65f1e7dcdc657404397426
Gerrit-Change-Number: 50351
Gerrit-PatchSet: 9
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-Reviewer: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: kokoro <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s

Reply via email to