diff --git a/anabatic/src/Dijkstra.cpp b/anabatic/src/Dijkstra.cpp index 00aaf8b5..df8b3a8b 100644 --- a/anabatic/src/Dijkstra.cpp +++ b/anabatic/src/Dijkstra.cpp @@ -506,11 +506,12 @@ namespace Anabatic { cdebug_log(112,0) << "Case horizontal: " << isiSet() << endl; GCell* gprev = getGPrev(Vertex::From2Mode); intervfrom = getIntervFrom(From2Mode); - Vertex* prev = gprev->getObserver(GCell::Observable::Vertex); + Vertex* prev = NULL; + if (gprev) prev = gprev->getObserver(GCell::Observable::Vertex); cdebug_log(112,0) << "PREV: " << prev << " "; intervfrom.print(); - if (isiSet()){ + if (isiSet()||(prev == NULL)){ cdebug_log(112,0) << "isiSet: "; printInterv(); y = getIAxis(); @@ -580,11 +581,12 @@ namespace Anabatic { //GCell* gprev = NULL; GCell* gprev = getGPrev(Vertex::From2Mode); intervfrom = getIntervFrom(From2Mode); - Vertex* prev = gprev->getObserver(GCell::Observable::Vertex); + Vertex* prev = NULL; + if (gprev) prev = gprev->getObserver(GCell::Observable::Vertex); cdebug_log(112,0) << "PREV: " << prev << " "; intervfrom.print(); - if (isiSet()){ + if (isiSet()||(prev == NULL)){ cdebug_log(112,0) << "isiSet: "; printInterv(); x = getIAxis(); @@ -2387,7 +2389,7 @@ namespace Anabatic { , targetSym , _anabatic->getConfiguration()->getGHorizontalLayer() , axis - , state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("metal2")) + , state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL2")) ); cdebug_log(112,0) << "|| " << segment2 << endl; } else if (v) { @@ -2428,7 +2430,7 @@ namespace Anabatic { , targetSym , _anabatic->getConfiguration()->getGVerticalLayer() , axis - , state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("metal3")) + , state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL3")) ); cdebug_log(112,0) << "|| " << segment2 << endl; } diff --git a/anabatic/src/GCell.cpp b/anabatic/src/GCell.cpp index e166afb9..f6e47684 100644 --- a/anabatic/src/GCell.cpp +++ b/anabatic/src/GCell.cpp @@ -1707,18 +1707,17 @@ namespace Anabatic { return false; } - - + void GCell::setEdgesOccupancy ( unsigned int width, unsigned int height ) { - getEastEdge()->setCapacity(width); - getWestEdge()->setCapacity(width); - getNorthEdge()->setCapacity(height); - getSouthEdge()->setCapacity(height); - getEastEdge()->setRealOccupancy(0); - getWestEdge()->setRealOccupancy(0); - getNorthEdge()->setRealOccupancy(0); - getSouthEdge()->setRealOccupancy(0); + if (getEastEdge() ) getEastEdge()->setCapacity(width); + if (getWestEdge() ) getWestEdge()->setCapacity(width); + if (getNorthEdge()) getNorthEdge()->setCapacity(height); + if (getSouthEdge()) getSouthEdge()->setCapacity(height); + if (getEastEdge() ) getEastEdge()->setRealOccupancy(0); + if (getWestEdge() ) getWestEdge()->setRealOccupancy(0); + if (getNorthEdge()) getNorthEdge()->setRealOccupancy(0); + if (getSouthEdge()) getSouthEdge()->setRealOccupancy(0); }