mem-cache: ReplacementPolicy specific replacement data
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Tue, 27 Mar 2018 09:53:33 +0000 (11:53 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Thu, 3 May 2018 14:25:29 +0000 (14:25 +0000)
commitc149983d931054d8cf88d2977a1f03a0b8b3b543
tree1651101f29d8b06098394ffb078bf2716348664a
parentddb80527e37e505e74b04755da502934ce8f0645
mem-cache: ReplacementPolicy specific replacement data

Replacement data is specific for each replacement policy, and thus
should be instantiated differently by each policy.

Touch() and reset() do not need to be aware of CacheBlk, as they
only update its ReplacementData.

Invalidate() makes replacement policies independent of cache blocks,
by removing the awareness of the valid state.

An inheritable base ReplaceableEntry class was created to allow usage
of replacement policies with any table-like structure.

Change-Id: I998917d800fa48504ed95abffa2f1b7bfd68522b
Reviewed-on: https://gem5-review.googlesource.com/9421
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
22 files changed:
src/mem/cache/blk.hh
src/mem/cache/replacement_policies/ReplacementPolicies.py
src/mem/cache/replacement_policies/SConscript
src/mem/cache/replacement_policies/base.cc [deleted file]
src/mem/cache/replacement_policies/base.hh
src/mem/cache/replacement_policies/bip_rp.cc
src/mem/cache/replacement_policies/bip_rp.hh
src/mem/cache/replacement_policies/brrip_rp.cc
src/mem/cache/replacement_policies/brrip_rp.hh
src/mem/cache/replacement_policies/fifo_rp.cc
src/mem/cache/replacement_policies/fifo_rp.hh
src/mem/cache/replacement_policies/lfu_rp.cc
src/mem/cache/replacement_policies/lfu_rp.hh
src/mem/cache/replacement_policies/lru_rp.cc
src/mem/cache/replacement_policies/lru_rp.hh
src/mem/cache/replacement_policies/mru_rp.cc
src/mem/cache/replacement_policies/mru_rp.hh
src/mem/cache/replacement_policies/random_rp.cc
src/mem/cache/replacement_policies/random_rp.hh
src/mem/cache/tags/base.cc
src/mem/cache/tags/base_set_assoc.cc
src/mem/cache/tags/base_set_assoc.hh