slot method
Converts a set/way pair into a flattened slot.
Implementation
int slot(int set, int way) {
if (set < 0 || set >= setCount || way < 0 || way >= wayCount) {
throw RangeError('Set/way pair is outside cache geometry.');
}
return set * wayCount + way;
}