[AIEX] Hazard Recognizer drops Load Store MemoryBank conflicts#981
Merged
Conversation
Collaborator
|
Could we verify if two stores may collide if they are one cycle apart? For example, we have stores accessing memory on cycle 5, 6 or even 7. If a 5-cycle store is scheduled just before a 6-cycle store, they will stall the memory interface. Could we still handle store banks separately? |
Collaborator
Author
|
I think we already handle this because already use the same resources. |
| }; | ||
| }, | ||
| FUDepthLimit); | ||
| return Found; |
Collaborator
There was a problem hiding this comment.
why not return anyStage(...) ?
Collaborator
Author
There was a problem hiding this comment.
I deleted the NFC refactor commit, it was just adding noise
57b2f0d to
5d7ac78
Compare
|
|
||
| // Same cycle without slot, resources don't overlap -> no hazard. | ||
| EXPECT_FALSE(HR.hazard(14, 0, /*SlotSet=*/0b0, /*MemoryBanks=*/0, | ||
| /*ObjectsBits=*/0, /*MemoryAccessCycle=*/{6})); |
Collaborator
There was a problem hiding this comment.
As discussed also expect no hazard at -2.
martien-de-jong
approved these changes
May 11, 2026
5d7ac78 to
abb0223
Compare
Stop tracking memory-bank usage for store instructions in the AIE scoreboard. Two facts justify this: 1. Loads and stores use separate HW ports, so a load and a store on the same bank in the same cycle never conflict. 2. AIE2/AIE2P/AIE2PS each have a single store slot
Two unit tests document the post-load-only-bank-tracking behaviour for
stores, in response to a review question: now that stores no longer
populate the memory-bank scoreboard, what keeps two stores from
issuing in the same cycle?
* storeStoreSameMemoryCycleSerializesViaSlot -- two stores with the
same MemoryAccessCycles and an overlapping st_slot collide at the
emission cycle via the slot scoreboard, while one-cycle-apart deltas
are clear (no spurious bank conflict).
* storeStoreDifferentMemoryCycleSerializesViaSlot -- two stores with
*different* MemoryAccessCycles (e.g. {5} vs {6}/{7}) at the same
emission cycle still collide via the slot scoreboard, regardless of
memory-cycle disagreement. Also verifies that a staggered emission
whose memory accesses would have aligned under the previous
all-stores bank-tracking policy reports no hazard, since stores now
carry zero bank bits.
Both tests pass MemoryBanks=0 to model the new policy and rely on the
overlapping SlotSet to drive the hazard, mirroring the
bankConflictHazard tests' use of MockStages classes 1 and 3 (no
resource overlap).
abb0223 to
73091fa
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
I have a conflict() refactor in here. We previously had multiple different conflict locations and i unified them in this PR.