Giacomo Travaglini has submitted this change. ( https://gem5-review.googlesource.com/c/public/gem5/+/48145 )

Change subject: arch: Add a nextLevel pointer to BaseTLB
......................................................................

arch: Add a nextLevel pointer to BaseTLB

This is a step towards supporting multi-level TLBs:
Every TLB will have a pointer to the next level TLB in the
hierarchy.

Example:

* L1 I-TLB
* L1 D-TLB
* L2 shared TLB (I+D)

l2 = BaseTLB()
itb = BaseTLB(next_level=l2)
dtb = BaseTLB(next_level=l2)

JIRA: https://gem5.atlassian.net/browse/GEM5-790

Change-Id: I398a17919564aad4b18efb8dace096965781ece1
Signed-off-by: Giacomo Travaglini <[email protected]>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/48145
Tested-by: kokoro <[email protected]>
Reviewed-by: Andreas Sandberg <[email protected]>
Maintainer: Andreas Sandberg <[email protected]>
---
M src/arch/generic/BaseTLB.py
M src/arch/generic/tlb.hh
2 files changed, 7 insertions(+), 1 deletion(-)

Approvals:
  Andreas Sandberg: Looks good to me, approved; Looks good to me, approved
  kokoro: Regressions pass



diff --git a/src/arch/generic/BaseTLB.py b/src/arch/generic/BaseTLB.py
index 3a4291c..8af4585 100644
--- a/src/arch/generic/BaseTLB.py
+++ b/src/arch/generic/BaseTLB.py
@@ -67,3 +67,5 @@
                     '`master` is now called `mem_side_port`')

     entry_type = Param.TypeTLB("Instruction/Data/Unified TLB entries")
+
+    next_level = Param.BaseTLB(NULL, "next level")
diff --git a/src/arch/generic/tlb.hh b/src/arch/generic/tlb.hh
index f7e11f1..8f192eb 100644
--- a/src/arch/generic/tlb.hh
+++ b/src/arch/generic/tlb.hh
@@ -57,11 +57,13 @@
 {
   protected:
     BaseTLB(const BaseTLBParams &p)
-      : SimObject(p), _type(p.entry_type)
+      : SimObject(p), _type(p.entry_type), _nextLevel(p.next_level)
     {}

     TypeTLB _type;

+    BaseTLB *_nextLevel;
+
   public:
     virtual void demapPage(Addr vaddr, uint64_t asn) = 0;

@@ -119,6 +121,8 @@
     void memInvalidate() { flushAll(); }

     TypeTLB type() const { return _type; }
+
+    BaseTLB* nextLevel() const { return _nextLevel; }
 };

 } // namespace gem5



7 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/48145
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: I398a17919564aad4b18efb8dace096965781ece1
Gerrit-Change-Number: 48145
Gerrit-PatchSet: 9
Gerrit-Owner: Giacomo Travaglini <[email protected]>
Gerrit-Reviewer: Andreas Sandberg <[email protected]>
Gerrit-Reviewer: Gabe Black <[email protected]>
Gerrit-Reviewer: Giacomo Travaglini <[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