Fix getDeviceAddressRanges() to get snooping right.

--HG--
extra : convert_revision : 2aeab25ef955ab9db7b968786faff227239fbbe4
This commit is contained in:
Steve Reinhardt 2007-05-22 07:30:55 -07:00
parent 0484867d85
commit da46364b18
4 changed files with 30 additions and 11 deletions

View file

@ -57,7 +57,6 @@ BaseCache::BaseCache(const std::string &name, Params &params)
} }
void void
BaseCache::CachePort::recvStatusChange(Port::Status status) 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 int
BaseCache::CachePort::deviceBlockSize() BaseCache::CachePort::deviceBlockSize()
{ {

View file

@ -91,9 +91,6 @@ class BaseCache : public MemObject
virtual void recvStatusChange(Status status); virtual void recvStatusChange(Status status);
virtual void getDeviceAddressRanges(AddrRangeList &resp,
bool &snoop);
virtual int deviceBlockSize(); virtual int deviceBlockSize();
bool recvRetryCommon(); bool recvRetryCommon();

View file

@ -89,6 +89,9 @@ class Cache : public BaseCache
void processRequestEvent(); void processRequestEvent();
void processResponseEvent(); void processResponseEvent();
virtual void getDeviceAddressRanges(AddrRangeList &resp,
bool &snoop);
virtual bool recvTiming(PacketPtr pkt); virtual bool recvTiming(PacketPtr pkt);
virtual void recvRetry(); virtual void recvRetry();
@ -124,6 +127,9 @@ class Cache : public BaseCache
void processRequestEvent(); void processRequestEvent();
void processResponseEvent(); void processResponseEvent();
virtual void getDeviceAddressRanges(AddrRangeList &resp,
bool &snoop);
virtual bool recvTiming(PacketPtr pkt); virtual bool recvTiming(PacketPtr pkt);
virtual void recvRetry(); virtual void recvRetry();

View file

@ -1139,6 +1139,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> template<class TagStore, class Coherence>
bool bool
Cache<TagStore,Coherence>::CpuSidePort::recvTiming(PacketPtr pkt) Cache<TagStore,Coherence>::CpuSidePort::recvTiming(PacketPtr pkt)
@ -1260,6 +1272,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> template<class TagStore, class Coherence>
bool bool
Cache<TagStore,Coherence>::MemSidePort::recvTiming(PacketPtr pkt) Cache<TagStore,Coherence>::MemSidePort::recvTiming(PacketPtr pkt)