Skip to content

Comments

odb: impl 3dblox checker checkConnectionRegions#9515

Merged
osamahammad21 merged 3 commits intoThe-OpenROAD-Project:masterfrom
ahmed532:feat/3dblox-checker-checkConnectionRegions
Feb 23, 2026
Merged

odb: impl 3dblox checker checkConnectionRegions#9515
osamahammad21 merged 3 commits intoThe-OpenROAD-Project:masterfrom
ahmed532:feat/3dblox-checker-checkConnectionRegions

Conversation

@ahmed532
Copy link

Check all regions in all connections are well defined.

Related to: #9291

Signed-off-by: Ahmed R. Mohamed <ahmed@precisioninno.com>
@ahmed532 ahmed532 self-assigned this Feb 21, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request implements a new checker, checkConnectionRegions, in 3dblox to validate all regions in all connections. The checker verifies that connections are well-defined, checking for missing regions in the unfolded model and validating geometric properties like intersection, orientation, and thickness for existing regions. The changes are well-tested with new unit tests covering various invalid connection scenarios and a new integration test for missing regions. The implementation is clear, and the suggestion to improve a log message for better accuracy is valid.

}
if (count > 0) {
logger_->warn(
utl::ODB, 273, "Found {} non-intersecting connections", count);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The warning message "Found {} non-intersecting connections" is not entirely accurate. The isValid function checks for more than just intersections, including incorrect facing sides of regions and thickness mismatches. A more general message like "Found {} invalid connections" would be more appropriate and less misleading for the user.

Suggested change
utl::ODB, 273, "Found {} non-intersecting connections", count);
utl::ODB, 273, "Found {} invalid connections", count);

Copy link
Member

Choose a reason for hiding this comment

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

Good suggestion

@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

Comment on lines 266 to 268
if ((!conn.top_region || !conn.bottom_region)
&& conn.connection->getTopRegion()
&& conn.connection->getBottomRegion()) {
Copy link
Member

Choose a reason for hiding this comment

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

How?

Copy link
Author

Choose a reason for hiding this comment

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

I added it because of the parser error. I think we should fix the error in a separate PR. But, should we keep the check as defensive programming? Or is it confusing?

Copy link
Member

Choose a reason for hiding this comment

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

No I think it is confusing.

Copy link
Author

Choose a reason for hiding this comment

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

OK will remove it from this PR now.

}
if (count > 0) {
logger_->warn(
utl::ODB, 273, "Found {} non-intersecting connections", count);
Copy link
Member

Choose a reason for hiding this comment

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

Good suggestion

Comment on lines 19 to 23
HierChiplet:
type: hier
regions:
hier_reg:
side: front
Copy link
Member

Choose a reason for hiding this comment

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

This is a good example of a parser error that should be marked earlier as hierarchical chiplets should be purely hierarchical and never have regions defined.

Signed-off-by: Ahmed R. Mohamed <ahmed@precisioninno.com>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

void Checker::checkConnectionRegions(dbMarkerCategory* top_cat,
const UnfoldedModel& model)
{
auto* cat = dbMarkerCategory::createOrReplace(top_cat, "Connection regions");
Copy link
Member

Choose a reason for hiding this comment

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

Create only if there is a marker

Do not create the marker unless there are violations

Signed-off-by: Ahmed R. Mohamed <ahmed@precisioninno.com>
@github-actions
Copy link
Contributor

clang-tidy review says "All clean, LGTM! 👍"

@osamahammad21 osamahammad21 merged commit 700c5c1 into The-OpenROAD-Project:master Feb 23, 2026
13 checks passed
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