}
// Insert new block at victimized entry
- tags->insertBlock(pkt, victim);
+ tags->insertBlock(addr, is_secure, pkt->req->masterId(),
+ pkt->req->taskId(), victim);
return victim;
}
#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"
}
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();
#include "base/statistics.hh"
#include "base/types.hh"
#include "mem/cache/blk.hh"
-#include "mem/packet.hh"
#include "params/BaseTags.hh"
#include "sim/clocked_object.hh"
/**
* Insert the new block into the cache and update stats.
*
- * @param pkt Packet holding the address to update
+ * @param addr Address of the block.
+ * @param is_secure Whether the block is in secure space or not.
+ * @param src_master_ID The source requestor ID.
+ * @param task_ID The new task ID.
* @param blk The block to update.
*/
- virtual void insertBlock(const PacketPtr pkt, CacheBlk *blk);
+ virtual void insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk);
/**
* Regenerate the block address.
#include "mem/cache/replacement_policies/base.hh"
#include "mem/cache/tags/base.hh"
#include "mem/cache/tags/cacheset.hh"
-#include "mem/packet.hh"
#include "params/BaseSetAssoc.hh"
/**
/**
* Insert the new block into the cache and update replacement data.
*
- * @param pkt Packet holding the address to update
+ * @param addr Address of the block.
+ * @param is_secure Whether the block is in secure space or not.
+ * @param src_master_ID The source requestor ID.
+ * @param task_ID The new task ID.
* @param blk The block to update.
*/
- void insertBlock(const PacketPtr pkt, CacheBlk *blk) override
+ void insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk) override
{
// Insert block
- BaseTags::insertBlock(pkt, blk);
+ BaseTags::insertBlock(addr, is_secure, src_master_ID, task_ID, blk);
// Increment tag counter
tagsInUse++;
}
void
-FALRU::insertBlock(const PacketPtr pkt, CacheBlk *blk)
+FALRU::insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk)
{
FALRUBlk* falruBlk = static_cast<FALRUBlk*>(blk);
assert(falruBlk->inCachesMask == 0);
// Do common block insertion functionality
- BaseTags::insertBlock(pkt, blk);
+ BaseTags::insertBlock(addr, is_secure, src_master_ID, task_ID, blk);
// Increment tag counter
tagsInUse++;
#include "base/types.hh"
#include "mem/cache/blk.hh"
#include "mem/cache/tags/base.hh"
-#include "mem/packet.hh"
#include "params/FALRU.hh"
// Uncomment to enable sanity checks for the FALRU cache and the
/**
* Insert the new block into the cache and update replacement data.
*
- * @param pkt Packet holding the address to update
+ * @param addr Address of the block.
+ * @param is_secure Whether the block is in secure space or not.
+ * @param src_master_ID The source requestor ID.
+ * @param task_ID The new task ID.
* @param blk The block to update.
*/
- void insertBlock(const PacketPtr pkt, CacheBlk *blk) override;
+ void insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk) override;
/**
* Generate the tag from the addres. For fully associative this is just the
}
void
-SectorTags::insertBlock(const PacketPtr pkt, CacheBlk *blk)
+SectorTags::insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk)
{
- // Insert block
- BaseTags::insertBlock(pkt, blk);
+ // Do common block insertion functionality
+ BaseTags::insertBlock(addr, is_secure, src_master_ID, task_ID, blk);
// Get block's sector
SectorSubBlk* sub_blk = static_cast<SectorSubBlk*>(blk);
#include "mem/cache/sector_blk.hh"
#include "mem/cache/tags/base.hh"
-#include "mem/packet.hh"
#include "params/SectorTags.hh"
class BaseReplacementPolicy;
/**
* Insert the new block into the cache and update replacement data.
*
- * @param pkt Packet holding the address to update
+ * @param addr Address of the block.
+ * @param is_secure Whether the block is in secure space or not.
+ * @param src_master_ID The source requestor ID.
+ * @param task_ID The new task ID.
* @param blk The block to update.
*/
- void insertBlock(const PacketPtr pkt, CacheBlk *blk) override;
+ void insertBlock(const Addr addr, const bool is_secure,
+ const int src_master_ID, const uint32_t task_ID,
+ CacheBlk *blk) override;
/**
* Finds the given address in the cache, do not update replacement data.