diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2016-05-31 18:03:42 +0100 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2017-12-05 11:47:01 +0000 |
commit | 2f6d69ee08bd92d9fcfb9b78f84b2d7c0ba113d0 (patch) | |
tree | 8c4a2a779948fd5a9cac10635627e1e6075cf4b1 /src/mem/coherent_xbar.cc | |
parent | d8afb8679301392561f4255edb9789d22aec5a2e (diff) | |
download | gem5-2f6d69ee08bd92d9fcfb9b78f84b2d7c0ba113d0.tar.xz |
mem: Add support for WriteClean packets in the memory system
This change adds support for creating and handling WriteClean
packets. The WriteClean operation is almost identical to a
WritebackDirty with the exception that the cache generating a
WriteClean retains a copy of the block.
Change-Id: I63c8de62919fad0f9547d412f8266aa4292ebecd
Reviewed-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Curtis Dunham <curtis.dunham@arm.com>
Reviewed-by: Anouk Van Laer <anouk.vanlaer@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/5045
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/coherent_xbar.cc')
-rw-r--r-- | src/mem/coherent_xbar.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mem/coherent_xbar.cc b/src/mem/coherent_xbar.cc index e90f9c1c8..6aec0b335 100644 --- a/src/mem/coherent_xbar.cc +++ b/src/mem/coherent_xbar.cc @@ -183,7 +183,9 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) // determine how long to be crossbar layer is busy Tick packetFinishTime = clockEdge(Cycles(1)) + pkt->payloadDelay; - if (!system->bypassCaches()) { + const bool snoop_caches = !system->bypassCaches() && + pkt->cmd != MemCmd::WriteClean; + if (snoop_caches) { assert(pkt->snoopDelay == 0); // the packet is a memory-mapped request and should be @@ -264,7 +266,7 @@ CoherentXBar::recvTimingReq(PacketPtr pkt, PortID slave_port_id) } } - if (snoopFilter && !system->bypassCaches()) { + if (snoopFilter && snoop_caches) { // Let the snoop filter know about the success of the send operation snoopFilter->finishRequest(!success, addr, pkt->isSecure()); } @@ -644,7 +646,9 @@ CoherentXBar::recvAtomic(PacketPtr pkt, PortID slave_port_id) MemCmd snoop_response_cmd = MemCmd::InvalidCmd; Tick snoop_response_latency = 0; - if (!system->bypassCaches()) { + const bool snoop_caches = !system->bypassCaches() && + pkt->cmd != MemCmd::WriteClean; + if (snoop_caches) { // forward to all snoopers but the source std::pair<MemCmd, Tick> snoop_result; if (snoopFilter) { |