Giacomo Travaglini has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/41316 )
Change subject: mem: Port returning name of SimObject owner via ownerName
......................................................................
mem: Port returning name of SimObject owner via ownerName
Signed-off-by: Giacomo Travaglini <[email protected]>
Change-Id: Ie43b7b0567f9025dcdb36c7d6b86fb0e6f93f85d
---
M src/mem/port.cc
M src/mem/port.hh
2 files changed, 20 insertions(+), 2 deletions(-)
diff --git a/src/mem/port.cc b/src/mem/port.cc
index e5d8308..4a55a0b 100644
--- a/src/mem/port.cc
+++ b/src/mem/port.cc
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012,2015,2017 ARM Limited
+ * Copyright (c) 2012,2015,2017,2021 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -144,6 +144,12 @@
Port::unbind();
}
+const std::string
+RequestPort::ownerName() const
+{
+ return owner.name();
+}
+
AddrRangeList
RequestPort::getAddrRanges() const
{
@@ -176,6 +182,12 @@
{
}
+const std::string
+ResponsePort::ownerName() const
+{
+ return owner.name();
+}
+
void
ResponsePort::responderUnbind()
{
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 357a10e..e2f2f8a 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2011-2012,2015,2017 ARM Limited
+ * Copyright (c) 2011-2012,2015,2017,2021 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -120,6 +120,9 @@
*/
void printAddr(Addr a);
+ /** Return the SimObject's name owning the request port */
+ const std::string ownerName() const;
+
public:
/* The atomic protocol. */
@@ -307,6 +310,9 @@
void unbind() override {}
void bind(Port &peer) override {}
+ /** Return the SimObject's name owning the request port */
+ const std::string ownerName() const;
+
public:
/* The atomic protocol. */
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/41316
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: Ie43b7b0567f9025dcdb36c7d6b86fb0e6f93f85d
Gerrit-Change-Number: 41316
Gerrit-PatchSet: 1
Gerrit-Owner: Giacomo Travaglini <[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