Gpl: add support for non-rectangular regions#10837
Conversation
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>
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
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. |
| 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; | ||
| } |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
It could be a utility function
Summary
Closes #4875
Changes:
Type of Change
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):
Verification
./etc/Build.sh).Related Issues
Issue #4875