changeset 9eabb2bf349b in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=9eabb2bf349b
description:
mem: Do not treat CleanEvict as a write operation
This patch changes the CleanEvict command type to not be considered a
write. Initially it was made a zero-sized write to match the writeback
command, but as things developed it became clear that it causes more
problems than it solves. For example, the memory modules (and bridge)
should not consider the CleanEvict as a write, but instead discard
it. With this patch it will be neither a read, nor write, and as it
does not need a response the slave will simply sink it.
diffstat:
src/mem/cache/base.hh | 9 ++++++---
src/mem/packet.cc | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 0964165d1857 -r 9eabb2bf349b src/mem/cache/base.hh
--- a/src/mem/cache/base.hh Fri Nov 06 03:26:21 2015 -0500
+++ b/src/mem/cache/base.hh Fri Nov 06 03:26:33 2015 -0500
@@ -508,9 +508,12 @@
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 -r 0964165d1857 -r 9eabb2bf349b src/mem/packet.cc
--- a/src/mem/packet.cc Fri Nov 06 03:26:21 2015 -0500
+++ b/src/mem/packet.cc Fri Nov 06 03:26:33 2015 -0500
@@ -88,7 +88,7 @@
{ 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" },
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev