Hi,
I want to modify the define of cacheEntry, which is named as Entry in
slicc, so some information about a cache entry can be maintained. For
example, I modify structure Entry in file /MESI_CMP_directory-L1cache.sm/
/ // CacheEntry
structure(Entry, desc="...", interface="AbstractCacheEntry" ) {
State CacheState, desc="cache state";
DataBlock DataBlk, desc="data for the block";
bool Dirty, default="false", desc="data is dirty";
_// added by me_
_Time previous_access_time, default=0, desc="previous access time";_
}/
However, in a replacement operation, the cacheEntry is 'delete' by call
function /deallocate/, and cache entry pointer is set to /NULL/, so I
lost my information. Codes as follows
/delete m_cache[cacheSet][loc];
m_cache[cacheSet][loc] = NULL;/
In order to solve the problem, I want to modify the implementation of
class CacheMemory
by adding flag in cacheEntry to show whether the entry is valid/
This is a intuitive idea, isn't it. I'm curious why use a pointer to
determine whether entry is valid instead of a flag?
At last, I want to make sure that ONLY six functions (isTagPreent,
lookup, allocate, deallocate, cacheAvail, cacheProbe) is exposed to slicc.
Any Help Really Appreciated!
--
Chuanlei Zheng
Department of Computer Science and Technology
Nanjing University
_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users