diff options
author | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-12-02 06:08:19 -0500 |
---|---|---|
committer | Curtis Dunham <Curtis.Dunham@arm.com> | 2014-12-02 06:08:19 -0500 |
commit | 5d22250845f6160bb0529ab510918f56a5c30f94 (patch) | |
tree | 4c060e56a983211a3490e4010d56e2d41c322fa1 /src/mem/abstract_mem.cc | |
parent | 7ca27dd3ccc2bcd3b77480179030d07f50c3d2d9 (diff) | |
download | gem5-5d22250845f6160bb0529ab510918f56a5c30f94.tar.xz |
mem: Support WriteInvalidate (again)
This patch takes a clean-slate approach to providing WriteInvalidate
(write streaming, full cache line writes without first reading)
support.
Unlike the prior attempt, which took an aggressive approach of directly
writing into the cache before handling the coherence actions, this
approach follows the existing cache flows as closely as possible.
Diffstat (limited to 'src/mem/abstract_mem.cc')
-rw-r--r-- | src/mem/abstract_mem.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/mem/abstract_mem.cc b/src/mem/abstract_mem.cc index dca0403fb..ec1be04e1 100644 --- a/src/mem/abstract_mem.cc +++ b/src/mem/abstract_mem.cc @@ -379,6 +379,13 @@ AbstractMemory::access(PacketPtr pkt) bytesRead[pkt->req->masterId()] += pkt->getSize(); if (pkt->req->isInstFetch()) bytesInstRead[pkt->req->masterId()] += pkt->getSize(); + } else if (pkt->isInvalidate()) { + // no need to do anything + // this clause is intentionally before the write clause: the only + // transaction that is both a write and an invalidate is + // WriteInvalidate, and for the sake of consistency, it does not + // write to memory. in a cacheless system, there are no WriteInv's + // because the Write -> WriteInvalidate rewrite happens in the cache. } else if (pkt->isWrite()) { if (writeOK(pkt)) { if (pmemAddr) { @@ -391,8 +398,6 @@ AbstractMemory::access(PacketPtr pkt) numWrites[pkt->req->masterId()]++; bytesWritten[pkt->req->masterId()] += pkt->getSize(); } - } else if (pkt->isInvalidate()) { - // no need to do anything } else { panic("unimplemented"); } |