dpl: ensure site exists for one site gap check - #11101
Open
gudeh wants to merge 3 commits into
Open
Conversation
…or one site gaps Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
…exists before checking for one site gap Signed-off-by: Augusto Berndt <augusto.berndt@precisioninno.com>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the placement check logic in CheckPlacement.cpp to ensure a site exists before checking for one-site gaps. The review feedback suggests simplifying the conditional logic to eliminate redundant null checks and improve readability.
Comment on lines
+411
to
+413
| const bool site_exists = (abut_pixel && abut_pixel->is_valid); | ||
| const bool abuttment_exists = (abut_pixel && abut_pixel->cell); | ||
| if (!abuttment_exists) { | ||
| if (site_exists && !abuttment_exists) { |
Contributor
There was a problem hiding this comment.
The temporary boolean variables site_exists and abuttment_exists are only used once in the immediate if condition. Additionally, they perform redundant null checks on abut_pixel. Simplifying this condition directly improves readability and maintainability.
if (abut_pixel && abut_pixel->is_valid && !abut_pixel->cell) {
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.
Summary
Only checking if
abut_pixel != nullptrdoes not guarantee a site is present, it must also be a valid site. Include this check to avoid false positive one site gap check for a macro on a private design.Type of Change
Impact
no-op, fixes a corner case.
Verification
./etc/Build.sh).Related Issues
Replaced PR #11036, which would solve the issue by disregarding macros on one site gap. The present PR is better and more complete, making sure a site actually exists.