In RoutingPad, prefer Segment over Pad at constant area.

This case may arise with cells created from GDS+LEF.
This commit is contained in:
Jean-Paul Chaput 2023-07-24 14:25:01 +02:00
parent c5827877f6
commit a8d0371990
1 changed files with 16 additions and 12 deletions

View File

@ -377,6 +377,9 @@ namespace Hurricane {
double bestArea = getArea(bestComponent);
if (compArea == bestArea) {
if (dynamic_cast<Segment*>(component) and dynamic_cast<Pad*>(bestComponent)) {
bestComponent = component;
} else {
Box compBox = component->getBoundingBox();
Box bestBox = bestComponent->getBoundingBox();
@ -391,6 +394,7 @@ namespace Hurricane {
if (compBox.getXMin() < bestBox.getXMin())
bestComponent = component;
}
}
} else {
if (compArea > bestArea)
bestComponent = component;