summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mem/cache/base.hh9
-rw-r--r--src/mem/packet.cc2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh
index 3baec36d9..a992583fe 100644
--- a/src/mem/cache/base.hh
+++ b/src/mem/cache/base.hh
@@ -508,9 +508,12 @@ class BaseCache : public MemObject
MSHR *allocateWriteBuffer(PacketPtr pkt, Tick time)
{
- // should only see clean evictions in a read-only cache
- assert(!isReadOnly || pkt->cmd == MemCmd::CleanEvict);
- assert(pkt->isWrite() && !pkt->isRead());
+ // should only see writes or clean evicts here
+ assert(pkt->isWrite() || pkt->cmd == MemCmd::CleanEvict);
+
+ // if this is a read-only cache we should never see any writes
+ assert(!(isReadOnly && pkt->isWrite()));
+
return allocateBufferInternal(&writeBuffer,
blockAlign(pkt->getAddr()), blkSize,
pkt, time, true);
diff --git a/src/mem/packet.cc b/src/mem/packet.cc
index b1e6dcd63..80b079138 100644
--- a/src/mem/packet.cc
+++ b/src/mem/packet.cc
@@ -88,7 +88,7 @@ MemCmd::commandInfo[] =
{ SET4(IsWrite, NeedsExclusive, IsRequest, HasData),
InvalidCmd, "Writeback" },
/* CleanEvict */
- { SET2(IsWrite, IsRequest), InvalidCmd, "CleanEvict" },
+ { SET1(IsRequest), InvalidCmd, "CleanEvict" },
/* SoftPFReq */
{ SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
SoftPFResp, "SoftPFReq" },