Gabe Black has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/50351 )
Change subject: ruby: Replace the sys param with a page_shift param.
......................................................................
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
---
M src/mem/ruby/structures/RubyPrefetcher.cc
M src/mem/ruby/structures/RubyPrefetcher.hh
M src/mem/ruby/structures/RubyPrefetcher.py
3 files changed, 5 insertions(+), 5 deletions(-)
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..6f78d73 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 Addr 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: 1
Gerrit-Owner: Gabe Black <[email protected]>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s