From be2f9f8a458e9f10dd9529cc9621aa7b61fefd8c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 2 Aug 2020 18:12:52 +0200 Subject: [PATCH] Bug fix: Always select the Pin as best RoutingPad component. * Bug: In Anabatic::Configuration::selectRpComponent(), always select the Pin as the best component. It is mandatory for a block that we pick up the terminal at the periphery and not one deep inside the block. * Bug: In Hurricane::RoutingPad::setOnBestcomponent(), same rule as in Anabatic, if there is any, the Pin must always be the best RoutingPad component. --- anabatic/src/Configuration.cpp | 6 ++++++ hurricane/src/hurricane/RoutingPad.cpp | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/anabatic/src/Configuration.cpp b/anabatic/src/Configuration.cpp index bb524f92..76bfe9e5 100644 --- a/anabatic/src/Configuration.cpp +++ b/anabatic/src/Configuration.cpp @@ -465,6 +465,12 @@ namespace Anabatic { continue; } + if (dynamic_cast(component)) { + cdebug_log(112,0) << " Pins are always considered best candidates:" << component << endl; + bestComponent = component; + break; + } + Component* candidate = dynamic_cast(component); if (not candidate or (candidate->getLayer()->getMask() != metal1->getMask()) ) diff --git a/hurricane/src/hurricane/RoutingPad.cpp b/hurricane/src/hurricane/RoutingPad.cpp index b94535a1..f01ba04b 100644 --- a/hurricane/src/hurricane/RoutingPad.cpp +++ b/hurricane/src/hurricane/RoutingPad.cpp @@ -350,6 +350,11 @@ namespace Hurricane { for ( Component* component : NetExternalComponents::get(plug->getMasterNet()) ) { if (not bestComponent) { bestComponent = component; continue; } + if (dynamic_cast(component)) { + bestComponent = component; + break; + } + switch (flags & ComponentSelection) { case LowestLayer: if (component->getLayer()->below(bestComponent->getLayer()))