From 6db4ae542bc60e2f2c62a8a8cd90104e1da7d45c Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 22 Sep 2016 16:59:24 +0200 Subject: [PATCH] Correct bug in AutoHorizontal::getGCells() line probing. * Bug: In Anabatic::AutoHorizontal::getGCells(), the y coordinate used to perform the line probing for neighboring GCells, cannot use the segment constraints because they are not correctly set this early. Instead we have to rely on the global router having put them in the correct position (i.e. at the center of the GCell side). The y position must also be epsilon-decreased if it is on the border of the nothernmost GCell. This apply to AutoVertical as well. * Change: In Anabatic::GCellTopology CTOR, when counting the RoutingPads of a GCell, compare gauge layers using their masks instead of the Layer itself. This allow for Analogic layers to be recognizeds. --- anabatic/src/AutoHorizontal.cpp | 3 ++- anabatic/src/AutoVertical.cpp | 5 +++-- anabatic/src/LoadGlobalRouting.cpp | 10 +++++----- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/anabatic/src/AutoHorizontal.cpp b/anabatic/src/AutoHorizontal.cpp index 8ddcfc98..4af7266b 100644 --- a/anabatic/src/AutoHorizontal.cpp +++ b/anabatic/src/AutoHorizontal.cpp @@ -181,11 +181,12 @@ namespace Anabatic { { vector().swap( gcells ); - DbU::Unit yprobe = getNativeMin(); + DbU::Unit yprobe = getY(); GCell* gcell = getAutoSource()->getGCell(); GCell* end = getAutoTarget()->getGCell(); if (gcell->getXMin() > end->getXMin()) std::swap( gcell, end ); + if (yprobe == gcell->getConstraintYMax()) yprobe--; gcells.push_back( gcell ); diff --git a/anabatic/src/AutoVertical.cpp b/anabatic/src/AutoVertical.cpp index 4eaa50b6..4cac5593 100644 --- a/anabatic/src/AutoVertical.cpp +++ b/anabatic/src/AutoVertical.cpp @@ -175,11 +175,12 @@ namespace Anabatic { { vector().swap( gcells ); - DbU::Unit xprobe = getNativeMin(); + DbU::Unit xprobe = getX(); GCell* gcell = getAutoSource()->getGCell(); GCell* end = getAutoTarget()->getGCell(); if (gcell->getYMin() > end->getYMin()) std::swap( gcell, end ); + if (xprobe == gcell->getConstraintXMax()) xprobe--; gcells.push_back( gcell ); @@ -187,7 +188,7 @@ namespace Anabatic { gcell = gcell->getNorth( xprobe ); if (not gcell) { - cerr << Error( "AutoHorizontal::getGCells() : NULL GCell under %s\n" + cerr << Error( "AutoVertical::getGCells() : NULL GCell under %s\n" " begin:%s\n" " end: %s" , getString(this).c_str() diff --git a/anabatic/src/LoadGlobalRouting.cpp b/anabatic/src/LoadGlobalRouting.cpp index 6f457673..7c4430a5 100644 --- a/anabatic/src/LoadGlobalRouting.cpp +++ b/anabatic/src/LoadGlobalRouting.cpp @@ -888,11 +888,11 @@ namespace { } else { const Layer* layer = anchor->getLayer(); - if (layer == Session::getRoutingLayer(0)) _connexity.fields.M1++; // M1 V - else if (layer == Session::getRoutingLayer(1)) _connexity.fields.M2++; // M2 H - else if (layer == Session::getRoutingLayer(2)) _connexity.fields.M3++; // M3 V - else if (layer == Session::getRoutingLayer(3)) _connexity.fields.M2++; // M4 H - else if (layer == Session::getRoutingLayer(4)) _connexity.fields.M3++; // M5 V + if (layer->getMask() == Session::getRoutingLayer(0)->getMask()) _connexity.fields.M1++; // M1 V + else if (layer->getMask() == Session::getRoutingLayer(1)->getMask()) _connexity.fields.M2++; // M2 H + else if (layer->getMask() == Session::getRoutingLayer(2)->getMask()) _connexity.fields.M3++; // M3 V + else if (layer->getMask() == Session::getRoutingLayer(3)->getMask()) _connexity.fields.M2++; // M4 H + else if (layer->getMask() == Session::getRoutingLayer(4)->getMask()) _connexity.fields.M3++; // M5 V else { cerr << Warning( "Terminal layer \"%s\" of %s is not managed yet (ignored)." , getString(layer->getName()).c_str()