summaryrefslogtreecommitdiff
path: root/src/mem/cache/blk.hh
diff options
context:
space:
mode:
authorDaniel R. Carvalho <odanrc@yahoo.com.br>2018-04-13 17:12:36 +0200
committerDaniel Carvalho <odanrc@yahoo.com.br>2018-05-08 21:46:21 +0000
commit0b0629cda6cbb4fdc1c1087c762c27c426e8a1c9 (patch)
treedf68c654288b7bb55c496f84d71674d8d77b262b /src/mem/cache/blk.hh
parent376f1b2ff7034f4d084a087a68307b11042d2a9d (diff)
downloadgem5-0b0629cda6cbb4fdc1c1087c762c27c426e8a1c9.tar.xz
mem-cache: Create block insertion function
Create a block insertion function to be used when inserting blocks. This resets the number of references to 1 (the insertion is taken into account), sets the insertion tick, and set secure state. Change-Id: Ifc34cbbd1c125207ce47912d188809221c7a157e Reviewed-on: https://gem5-review.googlesource.com/9824 Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com> Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Diffstat (limited to 'src/mem/cache/blk.hh')
-rw-r--r--src/mem/cache/blk.hh14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index b57c61b63..b634d21f1 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -253,6 +253,20 @@ class CacheBlk : public ReplaceableEntry
}
/**
+ * Set member variables when a block insertion occurs. Resets reference
+ * count to 1 (the insertion counts as a reference), and touch block if
+ * it hadn't been touched previously. Sets the insertion tick to the
+ * current tick. Does not make block valid.
+ *
+ * @param tag Block address tag.
+ * @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.
+ */
+ void insert(const Addr tag, const State is_secure, const int src_master_ID,
+ const uint32_t task_ID);
+
+ /**
* Track the fact that a local locked was issued to the
* block. Invalidate any previous LL to the same address.
*/