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:
Jessica Clarke
2021-05-28 02:32:04 +01:00
parent f909d886c9
commit afd636a0f5

View File

@@ -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