Skip to content

Commit

Permalink
Fix the bad constraints restrictions in relaxOverConstraineds().
Browse files Browse the repository at this point in the history
* Bug: In AnabaticEngine::relaxOverConstraineds(), when two terminals
    are vertically aligned, apply the constraints restrictions
    *only* if they are connected with V-NP + H topology, and not
    H-V. This was hapening for horizonal METAL1 terminals.
  • Loading branch information
jpc-lip6 committed Jan 27, 2025
1 parent 56ff885 commit e7f1cf6
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions anabatic/src/AnabaticEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1266,22 +1266,26 @@ namespace Anabatic {
and north->canDrag()
and (south->getNet() != north->getNet())
and (south->getX () == north->getX ()) ) {
Interval constraints ( gcell->getYMin(), north->getCBYMin() /*- pitch3*/ );
AutoSegment* terminal = south->getSegment();
AutoContact* opposite = terminal->getOppositeAnchor( south );

for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
segment->mergeUserConstraints( constraints );
constraineds.insert( segment );
if (south->getSegment()->isVertical()) {
Interval constraints ( gcell->getYMin(), north->getCBYMin() /*- pitch3*/ );
AutoSegment* terminal = south->getSegment();
AutoContact* opposite = terminal->getOppositeAnchor( south );

for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
segment->mergeUserConstraints( constraints );
constraineds.insert( segment );
}
}

constraints = Interval( south->getCBYMax() /*+ pitch3*/, gcell->getYMax() );
terminal = north->getSegment();
opposite = terminal->getOppositeAnchor( north );
if (north->getSegment()->isVertical()) {
Interval constraints = Interval( south->getCBYMax() /*+ pitch3*/, gcell->getYMax() );
AutoSegment* terminal = north->getSegment();
AutoContact* opposite = terminal->getOppositeAnchor( north );

for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
segment->mergeUserConstraints( constraints );
constraineds.insert( segment );
for ( AutoSegment* segment : AutoSegments_OnContact(terminal,opposite->base()) ) {
segment->mergeUserConstraints( constraints );
constraineds.insert( segment );
}
}
}
}
Expand Down

0 comments on commit e7f1cf6

Please sign in to comment.