fix(bank_conflict): Selecting the oldest Load causes a conflict #4036
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This modification changes
load bank conflict
from [default priority 0 1 2] to [so that the oldest Load does not have abank conflict
].In the following,
Load 0
refers toLoadUnit 0
.For example, before:
Load 0 lqidx 5
Load 1 lqidx 3
Load 2 lqidx 8
Assuming that three Loads have
bank conflict
, then we will default to making Load1 and Load2 havebank conflict
so that they can be replayed.However, this may lead to deadlocks in some cases.
For example:
Load 0 robidx 7
Store 0 robidx 6
Load 1 robidx 5
Store 0
is dependent onLoad 1
for data, whileLoad 0
is dependent onStore 0
for data, andLoad 0
andLoad 1
will have abank conflict
.In this case then,
Load 1
willReplay
because ofbank conflict
andLoad 0
willReplay
because offorward fault
(because of misalign).With the modification, we will choose to make the oldest Load not generate
bank conflict
, thus circumventing the jamming problem.Note !!! This may introduce performance fluctuations (up or down)