diff options
author | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-01-22 17:40:17 +0000 |
---|---|---|
committer | Nikos Nikoleris <nikos.nikoleris@arm.com> | 2019-02-26 11:17:58 +0000 |
commit | 8e723650586e9d902d4b462ddf5bb067e5eb0757 (patch) | |
tree | 0b8d6d3ff2cd160cc16ba470599eb7211d36daf5 /src/mem/packet.hh | |
parent | 32bbddf2362421021b016d995f5e27b2bceea3a2 (diff) | |
download | gem5-8e723650586e9d902d4b462ddf5bb067e5eb0757.tar.xz |
mem-cache: Copy over flags to forwarded response
A cache that forwards a request to the memory below does not fill and
forwards the response with the data to cache above. This change
ensures that the flags of the original response are also preserved.
Change-Id: I244b20b073c31b976358816c5b14bba413b8271f
Signed-off-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16182
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Diffstat (limited to 'src/mem/packet.hh')
-rw-r--r-- | src/mem/packet.hh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mem/packet.hh b/src/mem/packet.hh index c59db362e..2bcbf4dab 100644 --- a/src/mem/packet.hh +++ b/src/mem/packet.hh @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2018 ARM Limited + * Copyright (c) 2012-2019 ARM Limited * All rights reserved * * The license below extends only to copyright in the software and shall @@ -265,6 +265,9 @@ class Packet : public Printable // Flags to transfer across when copying a packet COPY_FLAGS = 0x0000003F, + // Flags that are used to create reponse packets + RESPONDER_FLAGS = 0x00000009, + // Does this packet have sharers (which means it should not be // considered writable) or not. See setHasSharers below. HAS_SHARERS = 0x00000001, @@ -650,6 +653,15 @@ class Packet : public Printable { return flags.isSet(RESPONDER_HAD_WRITABLE); } /** + * Copy the reponse flags from an input packet to this packet. The + * reponse flags determine whether a responder has been found and + * the state at which the block will be at the destination. + * + * @pkt The packet that we will copy flags from + */ + void copyResponderFlags(const PacketPtr pkt); + + /** * A writeback/writeclean cmd gets propagated further downstream * by the receiver when the flag is set. */ |