diff options
author | Daniel R. Carvalho <odanrc@yahoo.com.br> | 2018-06-07 12:19:27 +0200 |
---|---|---|
committer | Daniel Carvalho <odanrc@yahoo.com.br> | 2018-10-10 18:17:42 +0000 |
commit | 86a54d91936b524c0ef0f282959f0fc29bafe7eb (patch) | |
tree | e1037f22f3a2867e64b17f3b78b0dcf7c3c62915 /src/mem/cache/tags/base.cc | |
parent | dd017903991f51e1fa8df8dbc21cbb4a1501c1c1 (diff) | |
download | gem5-86a54d91936b524c0ef0f282959f0fc29bafe7eb.tar.xz |
mem-cache: Remove Packet dependency in Tags
Decouple Tags from Packets, only extracting the necessary
functionality for block insertion. As a side effect, create
a new function to update common insertion statistics.
Change-Id: I5c58f7c17de3255beee531f72a3fd25a30d74c90
Reviewed-on: https://gem5-review.googlesource.com/c/11098
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/tags/base.cc')
-rw-r--r-- | src/mem/cache/tags/base.cc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/src/mem/cache/tags/base.cc b/src/mem/cache/tags/base.cc index 9548d491a..7f848e0d8 100644 --- a/src/mem/cache/tags/base.cc +++ b/src/mem/cache/tags/base.cc @@ -52,7 +52,6 @@ #include "base/types.hh" #include "mem/cache/base.hh" -#include "mem/packet.hh" #include "mem/request.hh" #include "sim/core.hh" #include "sim/sim_exit.hh" @@ -80,25 +79,22 @@ BaseTags::setCache(BaseCache *_cache) } void -BaseTags::insertBlock(const PacketPtr pkt, CacheBlk *blk) +BaseTags::insertBlock(const Addr addr, const bool is_secure, + const int src_master_ID, const uint32_t task_ID, + CacheBlk *blk) { assert(!blk->isValid()); - // Get address - Addr addr = pkt->getAddr(); - // Previous block, if existed, has been removed, and now we have // to insert the new one - // Deal with what we are bringing in - MasterID master_id = pkt->req->masterId(); - assert(master_id < cache->system->maxMasters()); - occupancies[master_id]++; + assert(src_master_ID < cache->system->maxMasters()); + occupancies[src_master_ID]++; // Insert block with tag, src master id and task id - blk->insert(extractTag(addr), pkt->isSecure(), master_id, - pkt->req->taskId()); + blk->insert(extractTag(addr), is_secure, src_master_ID, task_ID); + // Check if cache warm up is done if (!warmedUp && tagsInUse.value() >= warmupBound) { warmedUp = true; warmupCycle = curTick(); |