Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ModuleInst] Fix placement behavior when requesting no overlaps #1108

Merged
merged 3 commits into from
Nov 27, 2024

Conversation

clavin-xlnx
Copy link
Member

ModuleInst.place() has a flag to request that no overlapping modules should be allowed. There was a bug where this was not behaving as expected. This attempts to align the behavior with the intent of the method.

Signed-off-by: Chris Lavin <[email protected]>
@eddieh-xlnx eddieh-xlnx added this to the 2024.2.0 milestone Nov 26, 2024
@eddieh-xlnx eddieh-xlnx self-requested a review November 26, 2024 19:12
Comment on lines 356 to 362
}

if (existingSiteInst != null && !allowOverlap) {
unplace();
return false;
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
}
if (existingSiteInst != null && !allowOverlap) {
unplace();
return false;
}
if (existingSiteInst != null) {
unplace();
return false;
}
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not clear to me why this early exit is needed given the same action is performed on line 374--375 (which by observation would only trigger for existingSiteInst != null && originalSites == null && !skipIncompatible).

It no longer triggers on the latest version of the array generation code this was created for.

Copy link
Member Author

@clavin-xlnx clavin-xlnx Nov 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If skipIncompatible==true, this needs to be checked earlier otherwise there is a failure. It looks like in the array generation code this is true, but should probably be set to false. It looks like in the latest version of the code, the placement attempt stride has changed and does not trigger the issue. I double checked and it still does for me in the initial version.

Signed-off-by: Chris Lavin <[email protected]>
@clavin-xlnx clavin-xlnx marked this pull request as ready for review November 27, 2024 03:13
@clavin-xlnx clavin-xlnx merged commit 3836227 into master Nov 27, 2024
14 checks passed
@clavin-xlnx clavin-xlnx deleted the fix_no_overlap_modinsts branch November 27, 2024 04:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants