-
Notifications
You must be signed in to change notification settings - Fork 64
Cache Interface Changes (2.1.9 Release)
These are the cache interface changes for the Graphite 2.1.9 release.
The cache APIs' have changed slightly to facilitate better collection of cache access counters and energy. The major change has been to the getCacheLineInfo()
and setCacheLineInfo()
functions.
Previously, the getCacheLineInfo()
had the following interface returned a pointer to the CacheLineInfo
object.
CacheLineInfo* getCacheLineInfo(IntPtr address);
After calling the above function, the memory subsystem model would update the CacheLineInfo object (if it needs to) but would not need to write it back into the cache since it has a pointer into the tag array. This does not allow the energy and access counters to be updated correctly since the cache model is not sure whether the tag array will be updated when read.
This was fixed by using the following two functions instead:
void getCacheLineInfo(IntPtr address, CacheLineInfo* cache_line_info); void setCacheLineInfo(IntPtr address, CacheLineInfo* cache_line_info);
These functions copy the entire CacheLineInfo from the cache into the cache controller and mimic what happens in a real SRAM tag array. The invalidateCacheLine()
function has also been taken away for the same reason and replaced using a combination of getCacheLineInfo()
and setCacheLineInfo()
.
Adjusting your memory subsystem models that have been written assuming the old APIs' should be easy and for an example, look at the memory subsystem models already present within Graphite (pr_l1_pr_l2_dram_directory_msi, pr_l1_pr_l2_dram_directory_mosi, pr_l1_sh_l2_msi
).