mkXBar: Fix bias towards earlier sources
In the case where the prioritised round-robin source does not have a request, this was always picking the earliest source that had one, which means if some sources are making more requests than others (e.g. there is lots of D$ churn but the I$ has a high hit rate) then, whilst the cycles where srcRR[dst] prioritises a source that is making requests are fair, the cycles where it prioritises a source that is not making requests is not fair, since then the earlier sources will be prioritised. Instead, make the fallback priority similarly dynamic so we cycle through the order we look at the sources in.
This commit is contained in:
@@ -108,7 +108,7 @@ module mkXBar#(
|
||||
end
|
||||
else begin
|
||||
// otherwise just get one valid src
|
||||
Vector#(srcNum, srcIdxT) srcIdxVec = genWith(fromInteger);
|
||||
Vector#(srcNum, srcIdxT) srcIdxVec = rotateBy(genWith(fromInteger), unpack(srcRR[dst]));
|
||||
whichSrc = searchIndex(isFromSrc, srcIdxVec);
|
||||
end
|
||||
if(whichSrc matches tagged Valid .src) begin
|
||||
|
||||
Reference in New Issue
Block a user