I was looking at the file cacheset.hh (path is mem/cache/tags/cacheset.hh) .
i found the code for tag comparison is written for a serial comparison . 
Ideally the tags should be compared in parallel . But according to the code
, they seem to be compared in series one after another .
following is the code in which i have the query :
template <class Blktype>
 
Blktype*
CacheSet<Blktype>::findBlk(Addr tag, bool is_secure, int& way_id) const
 {
     way_id = assoc;
     for (int i = 0; i < assoc; ++i) {
        if (blks[i]->tag == tag && blks[i]->isValid() &&
             blks[i]->isSecure() == is_secure) {
             way_id = i;
             return blks[i];
         }
     }
     return NULL;
 }

Shouldn't we use something like fork and join for parallel comparisons ?
Kindly tell me is my analysis of the code correct or incorrect ?
I need this piece of code to be correct for my project .
 

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to