diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2018-06-06 14:52:42 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2018-06-13 07:58:00 +0000 |
commit | f47e3289f94c2fd24e23566cd5dfcb20e293290e (patch) | |
tree | 3ba530f10075f7839a2438aea0ac0139ca5b8df3 /src/mem/cache/base.hh | |
parent | 285a919dc1067c32e5eac22aaa805f62beaac6c4 (diff) | |
download | gem5-f47e3289f94c2fd24e23566cd5dfcb20e293290e.tar.xz |
mem-cache: Insert on block allocation
When a block is being replaced in an allocation, if successfull,
the block will be inserted. Therefore we move the insertion
functionality to allocateBlock().
allocateBlock's signature has been modified to allow this
modification.
Change-Id: I60d17a83ff4f3021fdc976378868ccde6c7507bc
Reviewed-on: https://gem5-review.googlesource.com/10812
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/base.hh')
-rw-r--r-- | src/mem/cache/base.hh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mem/cache/base.hh b/src/mem/cache/base.hh index 6600aeba6..4ba256b95 100644 --- a/src/mem/cache/base.hh +++ b/src/mem/cache/base.hh @@ -659,14 +659,14 @@ class BaseCache : public MemObject * * Find a victim block and if necessary prepare writebacks for any * existing data. May return nullptr if there are no replaceable - * blocks. + * blocks. If a replaceable block is found, it inserts the new block in + * its place. The new block, however, is not set as valid yet. * - * @param addr Physical address of the new block - * @param is_secure Set if the block should be secure + * @param pkt Packet holding the address to update * @param writebacks A list of writeback packets for the evicted blocks * @return the allocated block */ - CacheBlk *allocateBlock(Addr addr, bool is_secure, PacketList &writebacks); + CacheBlk *allocateBlock(const PacketPtr pkt, PacketList &writebacks); /** * Evict a cache block. * |