data_latency = Param.Cycles("Data access latency")
response_latency = Param.Cycles("Latency for the return path on a miss");
+ warmup_percentage = Param.Percent(0,
+ "Percentage of tags to be touched to warm up the cache")
+
max_miss_count = Param.Counter(0,
"Number of misses to handle before calling exit")
data_latency = Param.Cycles(Parent.data_latency,
"The data access latency for this cache")
+ # Get the warmup percentage from the parent (cache)
+ warmup_percentage = Param.Percent(Parent.warmup_percentage,
+ "Percentage of tags to be touched to warm up the cache")
+
sequential_access = Param.Bool(Parent.sequential_access,
"Whether to access tags and data sequentially")
accessLatency(p->sequential_access ?
p->tag_latency + p->data_latency :
std::max(p->tag_latency, p->data_latency)),
- cache(nullptr), warmupBound(0),
+ cache(nullptr),
+ warmupBound((p->warmup_percentage/100.0) * (p->size / p->block_size)),
warmedUp(false), numBlocks(0)
{
}
* The number of tags that need to be touched to meet the warmup
* percentage.
*/
- int warmupBound;
+ const unsigned warmupBound;
/** Marked true when the cache is warmed up. */
bool warmedUp;
// Statistics
/**
+ * TODO: It would be good if these stats were acquired after warmup.
* @addtogroup CacheStatistics
* @{
*/
*/
Stats::Formula avgRefs;
- /** The cycle that the warmup percentage was hit. */
+ /** The cycle that the warmup percentage was hit. 0 on failure. */
Stats::Scalar warmupCycle;
/** Average occupancy of each requestor using the cache */
setShift = floorLog2(blkSize);
setMask = numSets - 1;
tagShift = setShift + floorLog2(numSets);
- /** @todo Make warmup percentage a parameter. */
- warmupBound = numSets * assoc;
sets = new SetType[numSets];
blks = new BlkType[numSets * assoc];
cacheMask = 0;
}
- warmupBound = size/blkSize;
numBlocks = size/blkSize;
blks = new FALRUBlk[numBlocks];