summaryrefslogtreecommitdiff
path: root/src/mem/port.hh
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-07-09 12:35:33 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-07-09 12:35:33 -0400
commit830391cad9764b923edd8f761e9fe5d11fd9d837 (patch)
treee73161e27f2913afd86ef7cf8a0a7513cf68dc8d /src/mem/port.hh
parent49407d76aaba6f347c4d7e6be45eccc43b4c05fc (diff)
downloadgem5-830391cad9764b923edd8f761e9fe5d11fd9d837.tar.xz
Port: Add getAddrRanges to master port (asking slave port)
This patch adds getAddrRanges to the master port, and thus avoids going through getSlavePort to be able to ask the slave. Similar to the previous patch that added isSnooping to the SlavePort, this patch aims to introduce an additional level of hierarchy in the ports (base port being protocol-agnostic) and getSlave/MasterPort will return port pointers to these base classes. The function is named getAddrRanges also on the master port, but does nothing besides asking the connected slave port. The slave port, as before, has to provide an implementation and actually produce a list of address ranges. The initial design used the name getSlaveAddrRanges for the new function, but the more verbose name was later changed.
Diffstat (limited to 'src/mem/port.hh')
-rw-r--r--src/mem/port.hh5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mem/port.hh b/src/mem/port.hh
index 49b0e1846..cfeb87571 100644
--- a/src/mem/port.hh
+++ b/src/mem/port.hh
@@ -215,6 +215,11 @@ class MasterPort : public Port
*/
unsigned peerBlockSize() const;
+ /**
+ * Get the address ranges of the connected slave port.
+ */
+ AddrRangeList getAddrRanges() const;
+
/** Inject a PrintReq for the given address to print the state of
* that address throughout the memory system. For debugging.
*/