summaryrefslogtreecommitdiff
path: root/src/mem/cache/blk.hh
diff options
context:
space:
mode:
authorDavid Guillen-Fandos <david.guillen@arm.com>2015-07-30 03:41:42 -0400
committerDavid Guillen-Fandos <david.guillen@arm.com>2015-07-30 03:41:42 -0400
commit0c89c15b23d4db50eb08f8ebf2a40b569f41dd29 (patch)
tree9f5e2bcf48d88e940b9fea6b2fa9f37d05ea2741 /src/mem/cache/blk.hh
parent5a18e181ffb8fbef5f4aca8fb9a63ee6a7c9e0d6 (diff)
downloadgem5-0c89c15b23d4db50eb08f8ebf2a40b569f41dd29.tar.xz
mem: Make caches way aware
This patch makes cache sets aware of the way number. This enables some nice features such as the ablity to restrict way allocation. The implemented mechanism allows to set a maximum way number to be allocated 'k' which must fulfill 0 < k <= N (where N is the number of ways). In the future more sophisticated mechasims can be implemented.
Diffstat (limited to 'src/mem/cache/blk.hh')
-rw-r--r--src/mem/cache/blk.hh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mem/cache/blk.hh b/src/mem/cache/blk.hh
index f082a9ef0..0be22f45d 100644
--- a/src/mem/cache/blk.hh
+++ b/src/mem/cache/blk.hh
@@ -107,10 +107,10 @@ class CacheBlk
Tick whenReady;
/**
- * The set this block belongs to.
+ * The set and way this block belongs to.
* @todo Move this into subclasses when we fix CacheTags to use them.
*/
- int set;
+ int set, way;
/** whether this block has been touched */
bool isTouched;
@@ -168,7 +168,7 @@ class CacheBlk
CacheBlk()
: task_id(ContextSwitchTaskId::Unknown),
asid(-1), tag(0), data(0) ,size(0), status(0), whenReady(0),
- set(-1), isTouched(false), refCount(0),
+ set(-1), way(-1), isTouched(false), refCount(0),
srcMasterId(Request::invldMasterId),
tickInserted(0)
{}