From 1b2c90424a84f46d45f73c2ccea451408f2fd28c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Mon, 12 Aug 2019 01:01:29 +0200 Subject: [PATCH] Do not slacken segments which source/target in a "go straight" GCell. * Change: In Anabatic::AutoHorizontal::_canSlacken(), if the source or target contact is in a GCell flagged "go straight", do not slacken, which would create a dogleg. This case is usually meet under big power rails that render a dogleg impossible to place as all tracks are used. Same modification for AutoVertical. --- anabatic/src/AutoHorizontal.cpp | 6 ++++-- anabatic/src/AutoVertical.cpp | 6 ++++-- anabatic/src/Constants.cpp | 11 ++++++----- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/anabatic/src/AutoHorizontal.cpp b/anabatic/src/AutoHorizontal.cpp index 1119b791..9e586848 100644 --- a/anabatic/src/AutoHorizontal.cpp +++ b/anabatic/src/AutoHorizontal.cpp @@ -249,6 +249,8 @@ namespace Anabatic { Interval targetSide = getAutoTarget()->getGCell()->getSide( Flags::Vertical ); Interval sourceConstraints = Interval(getAutoSource()->getCBYMin(),getAutoSource()->getCBYMax()); Interval targetConstraints = Interval(getAutoTarget()->getCBYMin(),getAutoTarget()->getCBYMax()); + bool sourceGoStraight = getAutoSource()->getGCell()->isGoStraight(); + bool targetGoStraight = getAutoTarget()->getGCell()->isGoStraight(); // Expand by a tiny amount for the "contains" to work for sure. sourceConstraints.inflate( 1 ); @@ -261,8 +263,8 @@ namespace Anabatic { cdebug_log(149,0) << "target constraints: " << targetConstraints << " " << DbU::getValueString(targetConstraints.getSize()) << endl; - if (not sourceConstraints.contains(sourceSide)) { cdebug_tabw(149,-1); return true; } - if (not targetConstraints.contains(targetSide)) { cdebug_tabw(149,-1); return true; } + if (not sourceGoStraight and not sourceConstraints.contains(sourceSide)) { cdebug_tabw(149,-1); return true; } + if (not targetGoStraight and not targetConstraints.contains(targetSide)) { cdebug_tabw(149,-1); return true; } cdebug_tabw(149,-1); return false; diff --git a/anabatic/src/AutoVertical.cpp b/anabatic/src/AutoVertical.cpp index d7ed5bfb..014eff98 100644 --- a/anabatic/src/AutoVertical.cpp +++ b/anabatic/src/AutoVertical.cpp @@ -243,13 +243,15 @@ namespace Anabatic { Interval targetSide = getAutoTarget()->getGCell()->getSide( Flags::Horizontal ); Interval sourceConstraints = Interval(getAutoSource()->getCBXMin(),getAutoSource()->getCBXMax()); Interval targetConstraints = Interval(getAutoTarget()->getCBXMin(),getAutoTarget()->getCBXMax()); + bool sourceGoStraight = getAutoSource()->getGCell()->isGoStraight(); + bool targetGoStraight = getAutoTarget()->getGCell()->isGoStraight(); // Expand by a tiny amount for the "contains" to work for sure. sourceConstraints.inflate( 1 ); targetConstraints.inflate( 1 ); - if (not sourceConstraints.contains(sourceSide)) { cdebug_tabw(149,-1); return true; } - if (not targetConstraints.contains(targetSide)) { cdebug_tabw(149,-1); return true; } + if (not sourceGoStraight and not sourceConstraints.contains(sourceSide)) { cdebug_tabw(149,-1); return true; } + if (not targetGoStraight and not targetConstraints.contains(targetSide)) { cdebug_tabw(149,-1); return true; } cdebug_tabw(149,-1); return false; diff --git a/anabatic/src/Constants.cpp b/anabatic/src/Constants.cpp index b7fa1784..1efa5865 100644 --- a/anabatic/src/Constants.cpp +++ b/anabatic/src/Constants.cpp @@ -186,12 +186,13 @@ namespace Anabatic { s += (_flags & (uint64_t)DeviceGCell ) ? 'd' : '-'; s += (_flags & (uint64_t)HChannelGCell) ? 'c' : '-'; s += (_flags & (uint64_t)VChannelGCell) ? 'c' : '-'; - s += (_flags & (uint64_t)HRailGCell ) ? 'r' : '-'; - s += (_flags & (uint64_t)VRailGCell ) ? 'r' : '-'; - s += (_flags & (uint64_t)StrutGCell ) ? 's' : '-'; - s += (_flags & (uint64_t)MatrixGCell ) ? 'm' : '-'; - s += (_flags & (uint64_t)StdCellRow ) ? 'S' : '-'; + s += (_flags & (uint64_t)HRailGCell ) ? 'H' : '-'; + s += (_flags & (uint64_t)VRailGCell ) ? 'V' : '-'; + s += (_flags & (uint64_t)StrutGCell ) ? 'S' : '-'; + s += (_flags & (uint64_t)MatrixGCell ) ? 'M' : '-'; + s += (_flags & (uint64_t)StdCellRow ) ? 'R' : '-'; s += (_flags & (uint64_t)ChannelRow ) ? 'C' : '-'; + s += (_flags & (uint64_t)GoStraight ) ? 'g' : '-'; s += ","; s += (_flags & (uint64_t)Invalidated ) ? 'i' : '-'; s += (_flags & (uint64_t)DestroyGCell ) ? 'D' : '-';