In Knik::Vertex, the _flags member was uninitialized.

* Bug: In Knik, in Vertex the _flags attribute was unitialized.
    This flag is, in particular, telling if the vertex is blocked.
    That it was taking a random value, was leading to errors and
    unreproductible behaviors. I hope this will make the global
    router deterministic at last. This problem did show in the
    Stratus FIFO generator.

* Bug: In Knik, in Vertex, remove the unused _boundingBox attribute.
This commit is contained in:
Jean-Paul Chaput 2016-04-22 22:55:26 +02:00
parent 0699fb0a40
commit 5fba1d2548
4 changed files with 17 additions and 4 deletions

View File

@ -981,6 +981,10 @@ int Graph::initRouting ( Net* net )
//editor->Refresh();
//editor->Stop ("Going to init");
//if (_working_net->getName() == "read0") DebugSession::open( 600 );
ltrace(600) << "Graph::initRouting() " << _working_net << endl;
ltracein(600);
int currentConnexID = 0;
vector<Contact*> vContacts;
vector<RoutingPad*> vRoutingPads;
@ -1029,9 +1033,9 @@ int Graph::initRouting ( Net* net )
//bool useConnexID = false;
for ( unsigned index = 0 ; index < vRoutingPads.size() ; index ++ ) {
RoutingPad* routingPad = vRoutingPads[index];
//cerr << " RoutingPad :" << routingPad << endl;
ltrace(600) << routingPad << endl;
Vertex* rpVertex = getVertex ( routingPad->getCenter() );
//cerr << " Vertex :" << rpVertex << endl;
ltrace(600) << rpVertex << endl;
Contact* rpContact = rpVertex->getContact();
if ( rpContact && (rpContact->getNet() == routingPad->getNet()) ) {
// s'il existe deja un contact pour ce vertex pour ce net, on s'y attache
@ -1113,6 +1117,10 @@ int Graph::initRouting ( Net* net )
//cerr << "net " << net << " has " << _vertexes_to_route.size() << " vertexes to route." << endl;
//}
ltraceout(600);
//DebugSession::close();
return _vertexes_to_route.size();
}
@ -1140,7 +1148,8 @@ void Graph::Dijkstra()
//#endif
//DebugSession::open( _working_net, 600 );
//DebugSession::open( 600 );
//if (_working_net->getName() == "read0") DebugSession::open( 600 );
ltrace(600) << "Dijkstra for net: " << _working_net << endl;
ltracein(600);
ltrace(600) << "Stamp:" << _netStamp << endl;

View File

@ -382,7 +382,11 @@ Vertex* MatrixVertex::getVertex ( Point point )
{
pair<unsigned int,unsigned int> indexes = getIJ ( point );
Vertex* vertex = getVertex ( indexes );
ltrace(600) << "MatrixVertex::getVertex(): " << vertex << endl;
if (vertex and vertex->isBlocked()) {
ltrace(600) << "Vertex is blocked, looking for neighbor." << endl;
Vertex* neighbor = NULL;
for ( size_t i=0; i<4 ; ++i ) {
neighbor = vertex->getFirstEdges(i)->getOpposite( vertex );

View File

@ -106,6 +106,7 @@ Vertex::Vertex ( Graph* routingGraph, Point position, DbU::Unit halfWidth, DbU::
, _netStamp (0)
, _halfWidth (halfWidth)
, _halfHeight (halfHeight)
, _flags(0)
{
_firstEdges[0] = NULL;
_firstEdges[1] = NULL;

View File

@ -37,7 +37,6 @@ namespace Knik {
unsigned _netStamp;
DbU::Unit _halfWidth; // this corresponds to the half width of dual bin of the vertex
DbU::Unit _halfHeight; // this corresponds to the half height of dual bin of the vertex
Box _boundingBox;
unsigned int _flags;
// Constructors & Destructors