Re: [Gems-users] Necessity of NP state


Date: Fri, 22 Jun 2007 13:33:21 -0400
From: "Juyoung Jung" <juyoung.jung@xxxxxxxxx>
Subject: Re: [Gems-users] Necessity of NP state
Thanks for your quick reply.


>Well the protocol needs to know if the cache has no tag for hte block and needs to allocate one.
>
>--Mike


Mike, does "no tag for the block" means simply cache miss? Then, cache controller has to replace the missed line with the demanded data from lower level, right?
Can I think of allocating one newly as the process of cache replacement?
The below is CacheMemory::allocate( ) method, and I am still wondering when cache's access permission is set to NotPresent instead of Invalid. In addition, why cache permission should be compared with Not present before allocating new cache entry? Could you give me more advice? Thanks for your time.

   Index cacheSet = addressToCacheSet(address);
   for (int i=0; i < m_cache_assoc; i++) {
     if (m_cache[cacheSet][i].m_Permission == AccessPermission_NotPresent) {      <=== When permission is set to Not present?
       m_cache[cacheSet][i] = ENTRY();  // Init entry
       m_cache[cacheSet][i].m_Address = address;
       m_cache[cacheSet][i].m_Permission = AccessPermission_Invalid ;                   <=== Why
       m_cache[cacheSet][i].m_LastRef = g_eventQueue_ptr->getTime();
       return;
     }
   }


Thank you.


- Young
[← Prev in Thread] Current Thread [Next in Thread→]