Skip to content

Gpl: add support for non-rectangular regions#10837

Open
LucasYuki wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl-non-rectangular-regions
Open

Gpl: add support for non-rectangular regions#10837
LucasYuki wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:gpl-non-rectangular-regions

Conversation

@LucasYuki

Copy link
Copy Markdown
Contributor

Summary

Closes #4875

Changes:

  • Adds support for non-rectangular regions
    • The placement region is the bounding box of the region
    • If the region is non-rectangular, the areas that do not belong to the region are filled with dummies
  • Check the overlap with all fixed cells, even if it isn't part of the group
    • new method: dbRegion::getOverlapArea
  • Change PlacerBase::initInstsForUnusableSites to look only at the placement region
  • region_bbox_ is now bounded by the core area
  • PlacerBase log info was changed
    • Core BBox changed to Region BBox
    • The core area log was moved to the PlacerBaseCommon report

Type of Change

  • Bug fix
  • New feature

Impact

Now PlacerBase uses the region boundaries to initialize the placement regions.

region_bbox_ is now bounded by the core area (This changes the upf_aes test results).

The PlacerBase log info was changed (those infos are already printed in the PlaceBaseCommon log):

  • Message "[INFO GPL-0013]" changed from showing the "Core BBox" to the "Placement BBox".
  • Message "[INFO GPL-0016] Core area" moved to the PlacerBaseCommon

Verification

  • [ X ] I have verified that the local build succeeds (./etc/Build.sh).
  • [ X ] I have run the relevant tests and they pass.
  • [ X ] My code follows the repository's formatting guidelines.
  • [ X ] I have signed my commits (DCO).

Related Issues

Issue #4875

Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
Signed-off-by: LucasYuki <lucasyuki@yahoo.com.br>
@LucasYuki LucasYuki self-assigned this Jul 7, 2026
@github-actions github-actions Bot added the size/M label Jul 7, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

Gemini encountered an error creating the review. You can try again by commenting /gemini review.

@LucasYuki LucasYuki marked this pull request as ready for review July 7, 2026 13:10
@LucasYuki LucasYuki requested review from a team as code owners July 7, 2026 13:10
@LucasYuki LucasYuki requested review from gudeh and osamahammad21 July 7, 2026 13:10
@LucasYuki LucasYuki changed the title Gpl: add suport for non-rectangular regions Gpl: add support for non-rectangular regions Jul 7, 2026
@stefanottili

Copy link
Copy Markdown

If the region is non-rectangular, the areas that do not belong to the region are filled with dummies

Does this scale when e.g. there are disjoint regions in all 4 corners of a chip ?

We a family of chips with power domain islands near analog blocks, so the low power region was very disjoint, with some islands in the middle for repeaters, challenging placement based optimization too.

Comment on lines +187 to +209
int64_t dbRegion::getOverlapArea(const Rect& r)
{
auto boundaries = getBoundaries();
std::vector<Rect> intersections;
int64_t area = 0;
if (!boundaries.empty()) {
for (auto bound : boundaries) {
Rect intersection;
bound->getBox().intersection(r, intersection);
intersections.push_back(intersection);
area += intersection.area();
}
}
// Remove overlapping area between boundaries
for (auto i = 0; i < intersections.size(); i++) {
for (auto j = i + 1; j < intersections.size(); j++) {
Rect intersection;
intersections[i].intersection(r, intersections[j]);
area -= intersection.area();
}
}
return area;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why does this need to live in the DB? I'd prefer ODB stay a data model with as little logic as possible. Unless this needs access to private data members (which I don't see here), it belongs in the caller.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It could be a utility function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ispd15 mgc_superblue16_a [ERROR GPL-0305] RePlAce diverged at newStepLength.

4 participants