When 'cacheLines_->insert' function is called if that line replace an existing line then 'oldTag' variable holds the tag value of that replaced line. You can use this tag value to recreate the start address of that cache line.
- Avadh On Tue, Jun 21, 2011 at 10:02 PM, Hui Kang <[email protected]> wrote: > Hi, > I have a question about how to retrieve the physical address of the evicted > cache line, which is replaced by a new inserted one. > I found the code in bool CacheController::cache_insert_cb(void *arg) > calls cacheLines_->insert(queueEntry->request, oldTag), which inserts the > new request's phyAddress. > Then the line of CacheLine *line = base_t::select(physAddress, oldTag) > calls the AssociativeArray's > V* select(T addr, T& oldaddr) { > return sets[setof(addr)].select(tagof(addr), oldaddr); > } > If there is conflict, it will call lru() to find the way to insert the > new tag. > Here, I notice that the tagof(addr) will convert the physical address to > its tag by floor() to find the way in the cache set to insert the new > phyAddress. > I am wondering is there any way to obtain the physical address of the > cacheline which is being replaced by the new one. Thanks. > > - Hui > > _______________________________________________ > http://www.marss86.org > Marss86-Devel mailing list > [email protected] > https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel > >
_______________________________________________ http://www.marss86.org Marss86-Devel mailing list [email protected] https://www.cs.binghamton.edu/mailman/listinfo/marss86-devel
