summaryrefslogtreecommitdiff
path: root/src/mem/cache/base.cc
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-06-21 16:57:37 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-10-10 18:17:42 +0000
commit99a6c94e58b6375c0d524530cab2a27b6ea0f2bc (patch)
tree1324e834457a7bd6149802caa53cfbf9b98529dd /src/mem/cache/base.cc
parent86a54d91936b524c0ef0f282959f0fc29bafe7eb (diff)
downloadgem5-99a6c94e58b6375c0d524530cab2a27b6ea0f2bc.tar.xz
mem-cache: Create tags initialization function
Having the blocks initialized in the constructor makes it harder to apply inheritance in the tags classes. This patch decouples the block initialization functionality from the constructor by using an init() function. It also sets the parent cache. Change-Id: I0da7fdaae492b1177c7cc3bda8639f79921fbbeb Reviewed-on: https://gem5-review.googlesource.com/c/11509 Reviewed-by: Jason Lowe-Power <jason@lowepower.com> Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Jason Lowe-Power <jason@lowepower.com>
Diffstat (limited to 'src/mem/cache/base.cc')
-rw-r--r--src/mem/cache/base.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mem/cache/base.cc b/src/mem/cache/base.cc
index 6c79fd683..736f16761 100644
--- a/src/mem/cache/base.cc
+++ b/src/mem/cache/base.cc
@@ -115,7 +115,7 @@ BaseCache::BaseCache(const BaseCacheParams *p, unsigned blk_size)
tempBlock = new TempCacheBlk(blkSize);
- tags->setCache(this);
+ tags->init(this);
if (prefetcher)
prefetcher->setCache(this);
}