MEM: Remove the otherPort from the cache ports
This patch is a very straight-forward simplification, removing the unecessary otherPort pointer from the cache port. The pointer was only used to forward range changes, and the address range is fixed for the cache. Removing the pointer simplifies the transition to master/slave ports.
This commit is contained in:
parent
4fdecae443
commit
4590b91fb8
3 changed files with 1 additions and 16 deletions
9
src/mem/cache/base.cc
vendored
9
src/mem/cache/base.cc
vendored
|
@ -44,8 +44,7 @@ using namespace std;
|
|||
BaseCache::CachePort::CachePort(const std::string &_name, BaseCache *_cache,
|
||||
const std::string &_label)
|
||||
: SimpleTimingPort(_name, _cache), cache(_cache),
|
||||
label(_label), otherPort(NULL),
|
||||
blocked(false), mustSendRetry(false)
|
||||
label(_label), blocked(false), mustSendRetry(false)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -69,12 +68,6 @@ BaseCache::BaseCache(const Params *p)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
BaseCache::CachePort::recvRangeChange() const
|
||||
{
|
||||
otherPort->sendRangeChange();
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BaseCache::CachePort::checkFunctional(PacketPtr pkt)
|
||||
|
|
6
src/mem/cache/base.hh
vendored
6
src/mem/cache/base.hh
vendored
|
@ -105,8 +105,6 @@ class BaseCache : public MemObject
|
|||
CachePort(const std::string &_name, BaseCache *_cache,
|
||||
const std::string &_label);
|
||||
|
||||
virtual void recvRangeChange() const;
|
||||
|
||||
virtual unsigned deviceBlockSize() const;
|
||||
|
||||
bool recvRetryCommon();
|
||||
|
@ -117,16 +115,12 @@ class BaseCache : public MemObject
|
|||
const std::string label;
|
||||
|
||||
public:
|
||||
void setOtherPort(CachePort *_otherPort) { otherPort = _otherPort; }
|
||||
|
||||
void setBlocked();
|
||||
|
||||
void clearBlocked();
|
||||
|
||||
bool checkFunctional(PacketPtr pkt);
|
||||
|
||||
CachePort *otherPort;
|
||||
|
||||
bool blocked;
|
||||
|
||||
bool mustSendRetry;
|
||||
|
|
2
src/mem/cache/cache_impl.hh
vendored
2
src/mem/cache/cache_impl.hh
vendored
|
@ -77,8 +77,6 @@ Cache<TagStore>::Cache(const Params *p, TagStore *tags, BasePrefetcher *pf)
|
|||
"CpuSidePort");
|
||||
memSidePort = new MemSidePort(p->name + "-mem_side_port", this,
|
||||
"MemSidePort");
|
||||
cpuSidePort->setOtherPort(memSidePort);
|
||||
memSidePort->setOtherPort(cpuSidePort);
|
||||
|
||||
tags->setCache(this);
|
||||
if (prefetcher)
|
||||
|
|
Loading…
Reference in a new issue