mem-cache: Encapsulate CacheBlk's tickInserted

Encapsulate this variable to facilitate polymorphism.

- tickInserted was renamed to _tickInserted and was privatized.
- The insertion tick should always be set to the current tick,
  and only on insertion; thus, its setter is not public and
  does not take arguments.
- An additional function was created to get the age since of
  the block relative to its insertion tick.
- There is no current need for a getter.

Change-Id: I81d4009abec5e9633e10f1e851e3a524553c98a4
Signed-off-by: Daniel R. Carvalho <odanrc@yahoo.com.br>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/34958
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
3 files changed