From 992fa9958da913aa1a40c78dd566d6498ee7d610 Mon Sep 17 00:00:00 2001 From: Nikos Nikoleris Date: Thu, 22 Sep 2016 10:07:11 +0100 Subject: mem: Support for specifying the destination of a WriteClean Previously, WriteClean packets would always write to the first memory below unless the memory was unable to allocate in which case it would be forwarded further below. This change adds support for specifying the destination of a WriteClean packet. The cache annotates the request with the specified destination and marks the packet as write-through upon its creation. The coherent xbar checks packets for their destination and resets the write-through flag when necessary e.g., the coherent xbar that is set as the PoC will reset the write-through flag for packets to the PoC. Change-Id: I84b653f5cb6e46e97e09508649a3725d72d94606 Reviewed-by: Curtis Dunham Reviewed-by: Anouk Van Laer Reviewed-on: https://gem5-review.googlesource.com/5046 Maintainer: Nikos Nikoleris Reviewed-by: Jason Lowe-Power --- src/mem/coherent_xbar.hh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/mem/coherent_xbar.hh') diff --git a/src/mem/coherent_xbar.hh b/src/mem/coherent_xbar.hh index 214a29071..0c2907fa0 100644 --- a/src/mem/coherent_xbar.hh +++ b/src/mem/coherent_xbar.hh @@ -398,6 +398,29 @@ class CoherentXBar : public BaseXBar */ bool sinkPacket(const PacketPtr pkt) const; + /** + * Determine if the crossbar should forward the packet, as opposed to + * responding to it. + */ + bool forwardPacket(const PacketPtr pkt); + + /** + * Determine if the packet's destination is the memory below + * + * The memory below is the destination for a cache mainteance + * operation to the Point of Coherence/Unification if this is the + * Point of Coherence/Unification. + * + * @param pkt The processed packet + * + * @return Whether the memory below is the destination for the packet + */ + bool isDestination(const PacketPtr pkt) const + { + return (pkt->req->isToPOC() && pointOfCoherency) || + (pkt->req->isToPOU() && pointOfUnification); + } + Stats::Scalar snoops; Stats::Scalar snoopTraffic; Stats::Distribution snoopFanout; -- cgit v1.2.3