mem-cache: Use block iteration in BaseSetAssoc
authorDaniel R. Carvalho <odanrc@yahoo.com.br>
Wed, 25 Apr 2018 12:41:23 +0000 (14:41 +0200)
committerDaniel Carvalho <odanrc@yahoo.com.br>
Thu, 26 Apr 2018 12:51:58 +0000 (12:51 +0000)
commit685cf2d1f8ae2f2ca3168a650efa1d36120783fe
tree8777aa38ddbcaa9b2c70b555e962fd3723f5fa1a
parentee2ffdc0fdb489767768e5273a4ccd7b51735c7c
mem-cache: Use block iteration in BaseSetAssoc

Use block iteration instead of numSets and assoc in print(),
cleanupRefs() and computeStats().

This makes these functions rely solely on what they are used for:
printing and calculating stats of blocks. With the addition of
Sectors an extra indirection level is added, and thus these
functions would be skipping blocks.

Change-Id: I0006f82736cce02ba3e501ffafe9236f748daf32
Reviewed-on: https://gem5-review.googlesource.com/10143
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
src/mem/cache/tags/base_set_assoc.cc
src/mem/cache/tags/base_set_assoc.hh