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.
This commit is contained in:
2
src/mem/cache/cache_impl.hh
vendored
2
src/mem/cache/cache_impl.hh
vendored
@@ -795,7 +795,7 @@ Cache<TagStore>::functionalAccess(PacketPtr pkt, bool fromCpuSide)
|
||||
// continues towards the memory side
|
||||
if (fromCpuSide) {
|
||||
memSidePort->sendFunctional(pkt);
|
||||
} else if (forwardSnoops && cpuSidePort->getMasterPort().isSnooping()) {
|
||||
} else if (forwardSnoops && cpuSidePort->isSnooping()) {
|
||||
// if it came from the memory side, it must be a snoop request
|
||||
// and we should only forward it if we are forwarding snoops
|
||||
cpuSidePort->sendFunctionalSnoop(pkt);
|
||||
|
||||
Reference in New Issue
Block a user