"no tag for the block" does mean a cache miss, but
a cache miss can also occur due to "having a tag for the block, but insufficient
coherence permission". In the former case, the protocol must allocate a
cache block (and possibly replace data) and then obtain appropriate
permission. In the latter case, a tag is already allocated, so the
protocol only has to obtain coherence permission.
As for the CacheMemory::allocate() sets the
permission as Invalid, this is what it should do when allocating a new
block. The if check is probably an artifact for when CacheMemory.h did not
have a deallocate() method (we just set the tag to NotPresent instead).
--Mike
----- Original Message -----
Sent: Friday, June 22, 2007 12:33
PM
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
_______________________________________________ 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.
|