From 6ef5819310f3b0e60a2fe19fe0f849be0b46efce Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 26 May 2016 18:54:57 +0200 Subject: [PATCH] In getCapacity(), check for empty intervals. --- anabatic/src/AnabaticEngine.cpp | 3 +++ anabatic/src/Edge.cpp | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/anabatic/src/AnabaticEngine.cpp b/anabatic/src/AnabaticEngine.cpp index 81321562..fa25e8cf 100644 --- a/anabatic/src/AnabaticEngine.cpp +++ b/anabatic/src/AnabaticEngine.cpp @@ -124,6 +124,9 @@ namespace Anabatic { Box ab = getCell()->getAbutmentBox(); RoutingGauge* rg = _configuration->getRoutingGauge(); + span.inflate( 0, -1 ); + if (span.isEmpty()) return 0; + const vector& layerGauges = rg->getLayerGauges(); for ( size_t depth=0 ; depth <= _configuration->getAllowedDepth() ; ++depth ) { if (layerGauges[depth]->getType() != Constant::Default) continue; diff --git a/anabatic/src/Edge.cpp b/anabatic/src/Edge.cpp index 56590f14..421d25e4 100644 --- a/anabatic/src/Edge.cpp +++ b/anabatic/src/Edge.cpp @@ -177,7 +177,7 @@ namespace Anabatic { { Interval side = getSide(); _axis = side.getCenter(); - _capacity = getAnabatic()->getCapacity( side.inflate(0,-1), _flags ); + _capacity = getAnabatic()->getCapacity( side, _flags ); _flags.reset( Flags::Invalidated ); cdebug.log(110) << "Edge::_revalidate() " << this << endl;