From ed2cd18c48c9cb3e5261d203070853e1e3c656e4 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sat, 25 Jul 2015 11:38:00 +0200 Subject: [PATCH] Too narrow search area for straight net in Knik. * Bug: In Knik, in Graph::Dijsktra(), when all the RoutingPads of a net are aligned, the seaching area is only one vertex wide (in width or height). That is, it contains only one edge in it's main direction. So when that sub-graph contains a fully blocked edge, Dijkstra cannot find a path... Now enlarge the one edge graph to at least three by inflating the search area. Curiously a code for similar purpose seems to be present, but commented. --- knik/src/Graph.cpp | 11 +++++++++++ knik/src/knik/MatrixVertex.h | 2 ++ 2 files changed, 13 insertions(+) diff --git a/knik/src/Graph.cpp b/knik/src/Graph.cpp index 433e008e..342d2461 100644 --- a/knik/src/Graph.cpp +++ b/knik/src/Graph.cpp @@ -1023,6 +1023,7 @@ int Graph::initRouting ( Net* net ) } } } + //cerr << " traitement pour les contacts : OK" << endl; //OoOoooOoooOoO A QUOI SERT CE BOOLEEN OoOoooOoooOoO ==>> pour le //5 le connexID ne doit pas avoir été augmenté ! ou alors connexID-1 !! //bool useConnexID = false; @@ -1063,6 +1064,13 @@ int Graph::initRouting ( Net* net ) } } } + + if (_searchingArea.getHeight() <= _matrixVertex->getTileHeight()) + _searchingArea.inflate( 0, _matrixVertex->getTileHeight() ); + + if (_searchingArea.getWidth() <= _matrixVertex->getTileWidth()) + _searchingArea.inflate( _matrixVertex->getTileWidth(), 0 ); + // for ripup & reroute purpose if ( __ripupMode__ ) _searchingArea = _cell->getAbutmentBox(); // recherche sur toute la surface : trop long pour gros circuits @@ -1135,6 +1143,9 @@ void Graph::Dijkstra() ltrace(600) << "Dijkstra for net: " << _working_net << endl; ltracein(600); ltrace(600) << "Stamp:" << _netStamp << endl; + ltrace(600) << "Search area : " << _searchingArea + << " h:" << DbU::getValueString(_searchingArea.getHeight()) << endl; + ltrace(600) << "Matrix tile height : " << DbU::getValueString(_matrixVertex->getTileHeight()) << endl; ltrace(600) << "Central vertex : " << centralVertex << endl; ltrace(600) << "_vertexes_to_route.size(): " << _vertexes_to_route.size() << endl; ltracein(600); diff --git a/knik/src/knik/MatrixVertex.h b/knik/src/knik/MatrixVertex.h index 789fa468..c141fbf8 100644 --- a/knik/src/knik/MatrixVertex.h +++ b/knik/src/knik/MatrixVertex.h @@ -70,6 +70,8 @@ namespace Knik { // Accessors // ********* public: + DbU::Unit getTileWidth () const { return _tileWidth; } + DbU::Unit getTileHeight () const { return _tileHeight; } size_t getXSize () const { return _matrix[0].size(); }; size_t getYSize () const { return _matrix.size(); }; unsigned int getLineIndex ( DbU::Unit y );