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.
This commit is contained in:
parent
ac1368df50
commit
8e55d51aaa
2 changed files with 7 additions and 4 deletions
9
src/mem/cache/base.hh
vendored
9
src/mem/cache/base.hh
vendored
|
@ -508,9 +508,12 @@ class BaseCache : public MemObject
|
||||||
|
|
||||||
MSHR *allocateWriteBuffer(PacketPtr pkt, Tick time)
|
MSHR *allocateWriteBuffer(PacketPtr pkt, Tick time)
|
||||||
{
|
{
|
||||||
// should only see clean evictions in a read-only cache
|
// should only see writes or clean evicts here
|
||||||
assert(!isReadOnly || pkt->cmd == MemCmd::CleanEvict);
|
assert(pkt->isWrite() || pkt->cmd == MemCmd::CleanEvict);
|
||||||
assert(pkt->isWrite() && !pkt->isRead());
|
|
||||||
|
// if this is a read-only cache we should never see any writes
|
||||||
|
assert(!(isReadOnly && pkt->isWrite()));
|
||||||
|
|
||||||
return allocateBufferInternal(&writeBuffer,
|
return allocateBufferInternal(&writeBuffer,
|
||||||
blockAlign(pkt->getAddr()), blkSize,
|
blockAlign(pkt->getAddr()), blkSize,
|
||||||
pkt, time, true);
|
pkt, time, true);
|
||||||
|
|
|
@ -88,7 +88,7 @@ MemCmd::commandInfo[] =
|
||||||
{ SET4(IsWrite, NeedsExclusive, IsRequest, HasData),
|
{ SET4(IsWrite, NeedsExclusive, IsRequest, HasData),
|
||||||
InvalidCmd, "Writeback" },
|
InvalidCmd, "Writeback" },
|
||||||
/* CleanEvict */
|
/* CleanEvict */
|
||||||
{ SET2(IsWrite, IsRequest), InvalidCmd, "CleanEvict" },
|
{ SET1(IsRequest), InvalidCmd, "CleanEvict" },
|
||||||
/* SoftPFReq */
|
/* SoftPFReq */
|
||||||
{ SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
|
{ SET4(IsRead, IsRequest, IsSWPrefetch, NeedsResponse),
|
||||||
SoftPFResp, "SoftPFReq" },
|
SoftPFResp, "SoftPFReq" },
|
||||||
|
|
Loading…
Reference in a new issue