From afd636a0f57e80333030ebc98a79a3e4d57ff071 Mon Sep 17 00:00:00 2001 From: Jessica Clarke Date: Fri, 28 May 2021 02:32:04 +0100 Subject: [PATCH] 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. --- src_Core/RISCY_OOO/coherence/src/CrossBar.bsv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src_Core/RISCY_OOO/coherence/src/CrossBar.bsv b/src_Core/RISCY_OOO/coherence/src/CrossBar.bsv index e43f2e5..492c87a 100644 --- a/src_Core/RISCY_OOO/coherence/src/CrossBar.bsv +++ b/src_Core/RISCY_OOO/coherence/src/CrossBar.bsv @@ -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