Re: [Gems-users] Is the Cache tag search behavior truely simulated in ruby cache?


Date: Mon, 10 May 2010 07:42:14 -0600
From: Dan Gibson <degibson@xxxxxxxx>
Subject: Re: [Gems-users] Is the Cache tag search behavior truely simulated in ruby cache?
Your cout statement follows the return statement. Hence it is never executed. Thats why the function appears to always return -1.

Regards,
Dan

2010/5/10 Dan Gibson <gibson@xxxxxxxxxxx>
Your cout statement follows the return statement. Hence it is never executed. Thats why the function appears to always return -1.

Regards,
Dan

2010/5/10 MaDafan <dafan_ma@xxxxxxxxxxx>
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,支持多账号登录! 现在就下载!

_______________________________________________
Gems-users mailing list
Gems-users@xxxxxxxxxxx
https://lists.cs.wisc.edu/mailman/listinfo/gems-users
Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/" to your search.





--
http://www.cs.wisc.edu/~gibson [esc]:wq!



--
http://www.cs.wisc.edu/~gibson [esc]:wq!
[← Prev in Thread] Current Thread [Next in Thread→]