diff options
Diffstat (limited to 'src/mem/cache/base.hh')
-rw-r--r-- | src/mem/cache/base.hh | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh index a992583fe..cb1baa3f4 100644 --- a/src/mem/cache/base.hh +++ b/src/mem/cache/base.hh @@ -210,7 +210,8 @@ class BaseCache : public MemObject // overlap assert(addr == blockAlign(addr)); - MSHR *mshr = mq->allocate(addr, size, pkt, time, order++); + MSHR *mshr = mq->allocate(addr, size, pkt, time, order++, + allocOnFill(pkt->cmd)); if (mq->isFull()) { setBlocked((BlockedCause)mq->index); @@ -234,6 +235,15 @@ class BaseCache : public MemObject } /** + * Determine if we should allocate on a fill or not. + * + * @param cmd Packet command being added as an MSHR target + * + * @return Whether we should allocate on a fill or not + */ + virtual bool allocOnFill(MemCmd cmd) const = 0; + + /** * Write back dirty blocks in the cache using functional accesses. */ virtual void memWriteback() = 0; |