access_perm == AccessPermission_NotPresent)
num_invalid++;
}
- assert(num_rw <= 1);
// This if case is meant to capture what happens in a Broadcast/Snoop
// protocol where the block does not exist in the cache hierarchy. You
return true;
}
}
- } else if (num_ro > 0 || num_rw == 1) {
+ } else if (num_ro > 0 || num_rw >= 1) {
+ if (num_rw > 1) {
+ // We iterate over the vector of abstract controllers, and return
+ // the first copy found. If we have more than one cache with block
+ // in writable permission, the first one found would be returned.
+ warn("More than one Abstract Controller with RW permission for "
+ "addr: %#x on cacheline: %#x.", address, line_address);
+ }
// In Broadcast/Snoop protocols, this covers if you know the block
// exists somewhere in the caching hierarchy, then you want to read any
// valid RO or RW block. In directory protocols, same thing, you want