From ab13a02eed8d6436e6b171c682239d78981054a9 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 12 May 2022 17:54:05 +0200 Subject: [PATCH] Do not make dogleg on segments in non-preferred routing direction. * Bug: In AutoContactTurn::updateTopology(), in some case we were making doglegs on segments in non-preferred routing direction (mostly M2). This must be never be done. As, by construction, at least one segment of the turn must be in the preferred routing direction, always use this one to make the dogleg. This bug is likely to explain the remaining "bad spin" in the final self-check of the routing data-structure. --- anabatic/src/AutoContactTurn.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/anabatic/src/AutoContactTurn.cpp b/anabatic/src/AutoContactTurn.cpp index 69b2c0c3..09e91a37 100644 --- a/anabatic/src/AutoContactTurn.cpp +++ b/anabatic/src/AutoContactTurn.cpp @@ -263,7 +263,9 @@ namespace Anabatic { setFlags( CntBadTopology ); } else { if (delta > 1) { - if (_horizontal1->isInvalidatedLayer()) { + bool updateH1 = (_horizontal1->isInvalidatedLayer() and not _horizontal1->isNonPref()) + or _vertical1->isNonPref(); + if (updateH1) { //_horizontal1 = static_cast( _horizontal1->makeDogleg(this) ); _horizontal1->makeDogleg(this); cdebug_log(145,0) << "Update h1: " << _horizontal1 << endl;