diff options
Diffstat (limited to 'src/mem/cache')
-rw-r--r-- | src/mem/cache/base_cache.cc | 8 | ||||
-rw-r--r-- | src/mem/cache/base_cache.hh | 3 | ||||
-rw-r--r-- | src/mem/cache/cache.hh | 6 | ||||
-rw-r--r-- | src/mem/cache/cache_impl.hh | 24 |
4 files changed, 30 insertions, 11 deletions
diff --git a/src/mem/cache/base_cache.cc b/src/mem/cache/base_cache.cc index d75d35ebb..a47c19e60 100644 --- a/src/mem/cache/base_cache.cc +++ b/src/mem/cache/base_cache.cc @@ -57,7 +57,6 @@ BaseCache::BaseCache(const std::string &name, Params ¶ms) } - void BaseCache::CachePort::recvStatusChange(Port::Status status) { @@ -66,13 +65,6 @@ BaseCache::CachePort::recvStatusChange(Port::Status status) } } -void -BaseCache::CachePort::getDeviceAddressRanges(AddrRangeList &resp, bool &snoop) -{ - AddrRangeList dummy; - otherPort->getPeerAddressRanges(resp, dummy); -} - int BaseCache::CachePort::deviceBlockSize() { diff --git a/src/mem/cache/base_cache.hh b/src/mem/cache/base_cache.hh index f7107a86a..a27ac1788 100644 --- a/src/mem/cache/base_cache.hh +++ b/src/mem/cache/base_cache.hh @@ -91,9 +91,6 @@ class BaseCache : public MemObject virtual void recvStatusChange(Status status); - virtual void getDeviceAddressRanges(AddrRangeList &resp, - bool &snoop); - virtual int deviceBlockSize(); bool recvRetryCommon(); diff --git a/src/mem/cache/cache.hh b/src/mem/cache/cache.hh index 75fb50f4e..e14b2efe8 100644 --- a/src/mem/cache/cache.hh +++ b/src/mem/cache/cache.hh @@ -89,6 +89,9 @@ class Cache : public BaseCache void processRequestEvent(); void processResponseEvent(); + virtual void getDeviceAddressRanges(AddrRangeList &resp, + bool &snoop); + virtual bool recvTiming(PacketPtr pkt); virtual void recvRetry(); @@ -124,6 +127,9 @@ class Cache : public BaseCache void processRequestEvent(); void processResponseEvent(); + virtual void getDeviceAddressRanges(AddrRangeList &resp, + bool &snoop); + virtual bool recvTiming(PacketPtr pkt); virtual void recvRetry(); diff --git a/src/mem/cache/cache_impl.hh b/src/mem/cache/cache_impl.hh index 56352c110..a7f96603e 100644 --- a/src/mem/cache/cache_impl.hh +++ b/src/mem/cache/cache_impl.hh @@ -1140,6 +1140,18 @@ Cache<TagStore,Coherence>::deletePortRefs(Port *p) template<class TagStore, class Coherence> +void +Cache<TagStore,Coherence>::CpuSidePort:: +getDeviceAddressRanges(AddrRangeList &resp, bool &snoop) +{ + // CPU side port doesn't snoop; it's a target only. + bool dummy; + otherPort->getPeerAddressRanges(resp, dummy); + snoop = false; +} + + +template<class TagStore, class Coherence> bool Cache<TagStore,Coherence>::CpuSidePort::recvTiming(PacketPtr pkt) { @@ -1261,6 +1273,18 @@ Cache<TagStore,Coherence>::CpuSidePort::recvFunctional(PacketPtr pkt) template<class TagStore, class Coherence> +void +Cache<TagStore,Coherence>::MemSidePort:: +getDeviceAddressRanges(AddrRangeList &resp, bool &snoop) +{ + // Memory-side port always snoops. + bool dummy; + otherPort->getPeerAddressRanges(resp, dummy); + snoop = true; +} + + +template<class TagStore, class Coherence> bool Cache<TagStore,Coherence>::MemSidePort::recvTiming(PacketPtr pkt) { |