summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2012-07-09 12:35:32 -0400
committerAndreas Hansson <andreas.hansson@arm.com>2012-07-09 12:35:32 -0400
commit49407d76aaba6f347c4d7e6be45eccc43b4c05fc (patch)
tree7193af1ae5b4688e4638e2d0aadaf9331ce97b8e /src/mem/ruby/system
parent17f9270dada824ab7a1b52ed4470abef5aa56d6c (diff)
downloadgem5-49407d76aaba6f347c4d7e6be45eccc43b4c05fc.tar.xz
Port: Add isSnooping to slave port (asking master port)
This patch adds isSnooping to the slave port, and thus avoids going through getMasterPort to be able to ask the master. Over the course of the next few patches, all getMasterPort/getSlavePort in Port and MemObject are to be protocol agnostic, and the snooping is part of the protocol layer. The function is already present on the master port, where it is implemented by the module itself, e.g. a cache. On the slave side, it is merely asking the connected master port. The same name is used by both functions despite their difference in behaviour. The initial design used isMasterSnooping on the slave port side, but the more verbose function name was later changed.
Diffstat (limited to 'src/mem/ruby/system')
-rw-r--r--src/mem/ruby/system/RubyPort.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mem/ruby/system/RubyPort.cc b/src/mem/ruby/system/RubyPort.cc
index 3621cc9e3..285017a06 100644
--- a/src/mem/ruby/system/RubyPort.cc
+++ b/src/mem/ruby/system/RubyPort.cc
@@ -695,7 +695,8 @@ RubyPort::ruby_eviction_callback(const Address& address)
// should this really be using funcMasterId?
Request req(address.getAddress(), 0, 0, Request::funcMasterId);
for (CpuPortIter p = slave_ports.begin(); p != slave_ports.end(); ++p) {
- if ((*p)->getMasterPort().isSnooping()) {
+ // check if the connected master port is snooping
+ if ((*p)->isSnooping()) {
Packet *pkt = new Packet(&req, MemCmd::InvalidationReq);
// send as a snoop request
(*p)->sendTimingSnoopReq(pkt);