Hi there,
To do some research works on the cache replacement strategy in ruby cache, I choose several protocol for simulation, and I use the Cachememory::findTaginSet to profile the miss and hit in Cache rather than profile them in Slicc file, but I find the function “findTaginSet” always returning value "-1" which means no tag matching in sets.I'm confused so I add a line in Cachememory.h:
template<class ENTRY>
inline
int CacheMemory<ENTRY>::findTagInSet(Index cacheSet, const Address& tag) const
{
assert(tag == line_address(tag));
// search the set for the tags
for (int i=0; i < m_cache_assoc; i++) {
if ((m_cache[cacheSet][i].m_Address == tag) &&
(m_cache[cacheSet][i].m_Permission != AccessPermission_NotPresent)) {
return i;
cout<<"L2 hit!"<<i<<endl;
&nb!
sp; }
}
return -1; // Not found
}
but nothing shows on the screen, so I wonder is the function a dummy one, actually no real address tag is stored in ruby cache, and the ruby can only profile miss and hit depending on the state, is it the case?
Thx !
使用Messenger保护盾2.0,支持多账号登录!
现在就下载!