Dijkstra can handle mixedsignal wires.
This commit is contained in:
parent
e1724ca785
commit
06d818695f
|
@ -49,6 +49,31 @@ namespace Anabatic {
|
||||||
using Hurricane::NetRoutingExtension;
|
using Hurricane::NetRoutingExtension;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit calcDistance( Point p1, Point p2 )
|
||||||
|
{
|
||||||
|
return abs(p1.getX()-p2.getX()) + abs(p1.getY()-p2.getY());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit calcMidIntersection( DbU::Unit imin1, DbU::Unit imax1, DbU::Unit imin2, DbU::Unit imax2 )
|
||||||
|
{
|
||||||
|
if ( (imin1 > imax1)
|
||||||
|
|| (imin2 > imax2)
|
||||||
|
){
|
||||||
|
cerr << "DbU::Unit calcMidIntersection(...): Wrong parameters." << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if ( (imin1 > imax2)
|
||||||
|
|| (imax1 < imin2)
|
||||||
|
) {
|
||||||
|
cerr << "DbU::Unit calcMidIntersection(...): No intersection." << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ( max(imin1, imin2) + min(imax1, imax2) )/2;
|
||||||
|
}
|
||||||
|
|
||||||
// -------------------------------------------------------------------
|
// -------------------------------------------------------------------
|
||||||
// Class : "Anabatic::IntervalC".
|
// Class : "Anabatic::IntervalC".
|
||||||
|
|
||||||
|
@ -80,6 +105,15 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
IntervalC::IntervalC( DbU::Unit min, DbU::Unit max, DbU::Unit axis )
|
||||||
|
{
|
||||||
|
_min = min;
|
||||||
|
_max = max;
|
||||||
|
_axis = axis;
|
||||||
|
setiSet();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
IntervalC::~IntervalC() {}
|
IntervalC::~IntervalC() {}
|
||||||
|
|
||||||
|
|
||||||
|
@ -292,10 +326,10 @@ namespace Anabatic {
|
||||||
return Point(0,0);
|
return Point(0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vnext->getGCell()->isMatrix()) {
|
/*if (vnext->getGCell()->isMatrix()) {
|
||||||
cdebug_tabw(112,-1);
|
cdebug_tabw(112,-1);
|
||||||
return Point(vnext->getGCell()->getXCenter(), vnext->getGCell()->getYCenter());
|
return Point(vnext->getGCell()->getXCenter(), vnext->getGCell()->getYCenter());
|
||||||
}
|
}*/
|
||||||
|
|
||||||
GCell* gnext = vnext->getGCell();
|
GCell* gnext = vnext->getGCell();
|
||||||
GCell* gcurr = getGCell();
|
GCell* gcurr = getGCell();
|
||||||
|
@ -381,7 +415,8 @@ namespace Anabatic {
|
||||||
} else cdebug_log(112,0) << "[ERROR](Point Vertex::getNextPathPoint2(...) const: Something is wrong.4" << endl;
|
} else cdebug_log(112,0) << "[ERROR](Point Vertex::getNextPathPoint2(...) const: Something is wrong.4" << endl;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "[ERROR](Point Vertex::getNextPathPoint2(...) const: Something is wrong.5" << endl;
|
cdebug_log(112,0) << "[ERROR](Point Vertex::getNextPathPoint2(...) const: Something is wrong.5: " << vnext << endl;
|
||||||
|
|
||||||
}
|
}
|
||||||
cdebug_tabw(112,-1);
|
cdebug_tabw(112,-1);
|
||||||
return Point(x,y);
|
return Point(x,y);
|
||||||
|
@ -399,12 +434,22 @@ namespace Anabatic {
|
||||||
IntervalC intervfrom = IntervalC();
|
IntervalC intervfrom = IntervalC();
|
||||||
|
|
||||||
if (_adata == NULL){
|
if (_adata == NULL){
|
||||||
cdebug_log(112,0) << "Point Vertex::getStartPathPoint( const Vertex* next ) const: GRAData unset." << endl;
|
cdebug_log(112,0) << "Point Vertex::getStartPathPoint( const Vertex* next ) const: Digital vertex." << endl;
|
||||||
cdebug_tabw(112,-1);
|
//cdebug_tabw(112,-1);
|
||||||
return Point(0,0);
|
//return Point(0,0);
|
||||||
}
|
}
|
||||||
|
if (gcurr->isMatrix()){
|
||||||
if (gcurr->isDevice ()){
|
GCell* gprev = getGPrev();
|
||||||
|
cdebug_log(112,-1) << endl;
|
||||||
|
if (gprev) {
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
if (isNorth(vprev)) return Point (gcurr->getXCenter(), gcurr->getYMax() );
|
||||||
|
else if (isSouth(vprev)) return Point (gcurr->getXCenter(), gcurr->getYMin() );
|
||||||
|
else if (isWest (vprev)) return Point (gcurr->getXMin() , gcurr->getYCenter() );
|
||||||
|
else if (isEast (vprev)) return Point (gcurr->getXMax() , gcurr->getYCenter() );
|
||||||
|
else return Point (gcurr->getXCenter(), gcurr->getYCenter() );
|
||||||
|
} else return Point (gcurr->getXCenter(), gcurr->getYCenter() );
|
||||||
|
} else if (gcurr->isDevice ()){
|
||||||
cdebug_log(112,0) << "Case device" << endl;
|
cdebug_log(112,0) << "Case device" << endl;
|
||||||
if (isH()){
|
if (isH()){
|
||||||
cdebug_log(112,0) << "hinterval: " << DbU::getValueString(getIAxis()) << endl;
|
cdebug_log(112,0) << "hinterval: " << DbU::getValueString(getIAxis()) << endl;
|
||||||
|
@ -596,7 +641,7 @@ namespace Anabatic {
|
||||||
GCell* gcell = getGCell();
|
GCell* gcell = getGCell();
|
||||||
if (gcell->isDevice()) return isiHorizontal();
|
if (gcell->isDevice()) return isiHorizontal();
|
||||||
else if (gcell->isHChannel()) return true;
|
else if (gcell->isHChannel()) return true;
|
||||||
else if (gcell->isStrut()) return ((gcell->getWidth() > gcell->getHeight())||(gcell->getWidth() == gcell->getHeight()));
|
else if (gcell->isStrut()| gcell->isMatrix() ) return ((gcell->getWidth() > gcell->getHeight())||(gcell->getWidth() == gcell->getHeight()));
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -606,7 +651,7 @@ namespace Anabatic {
|
||||||
GCell* gcell = getGCell();
|
GCell* gcell = getGCell();
|
||||||
if (gcell->isDevice()) return isiVertical();
|
if (gcell->isDevice()) return isiVertical();
|
||||||
else if (gcell->isVChannel()) return true;
|
else if (gcell->isVChannel()) return true;
|
||||||
else if (gcell->isStrut()) return gcell->getWidth() < gcell->getHeight();
|
else if (gcell->isStrut()|| gcell->isMatrix()) return gcell->getWidth() < gcell->getHeight();
|
||||||
else return false;
|
else return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -790,29 +835,42 @@ namespace Anabatic {
|
||||||
|
|
||||||
void Vertex::createAData()
|
void Vertex::createAData()
|
||||||
{
|
{
|
||||||
|
if (!getGCell()->isMatrix()){
|
||||||
if (_adata == NULL) _adata = GRAData::create();
|
if (_adata == NULL) _adata = GRAData::create();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Vertex::isiSet() const
|
bool Vertex::isiSet() const
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata) return _adata->isiSet();
|
||||||
return _adata->isiSet();
|
else return false;
|
||||||
} else {
|
|
||||||
cdebug_log(112,0) << "bool Vertex::isiSet() const: Inappropriate usage of GRAData. " << endl;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit Vertex::getIAxis() const
|
DbU::Unit Vertex::getIAxis() const
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata) return _adata->getIAxis();
|
||||||
return _adata->getIAxis();
|
else {
|
||||||
} else {
|
if (_from){
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getIAxis() const: Inappropriate usage of GRAData. " << endl;
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getIAxis() const: Digital vertex. " << endl;
|
||||||
|
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
if (isNorth(vprev)||isSouth(vprev))
|
||||||
|
return calcMidIntersection(gcurr->getXMin(), gcurr->getXMax(), gprev->getXMin(), gprev->getXMax());
|
||||||
|
else if (isWest (vprev)||isEast (vprev))
|
||||||
|
return calcMidIntersection(gcurr->getYMin(), gcurr->getYMax(), gprev->getYMin(), gprev->getYMax());
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getIAxis() const: Not a neighbour GCell. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isH()) return getGCell()->getXCenter();
|
||||||
|
else return getGCell()->getYCenter();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -821,10 +879,33 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getIMax();
|
return _adata->getIMax();
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getIMax() const: Inappropriate usage of GRAData. " << endl;
|
if (_from){
|
||||||
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getIMax() const: Digital vertex. " << endl;
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
if (isH()){
|
||||||
|
if (isNorth(vprev)||isSouth(vprev)||isWest (vprev)) return getGCell()->getXCenter();
|
||||||
|
else if (isEast (vprev)) return getGCell()->getXMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getIMax() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isWest(vprev)||isEast(vprev)||isSouth (vprev)) return getGCell()->getYCenter();
|
||||||
|
else if (isNorth (vprev)) return getGCell()->getYMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getIMax() const: Not a neighbour GCell. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isH()) return getGCell()->getXCenter();
|
||||||
|
else return getGCell()->getYCenter();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit Vertex::getIMin() const
|
DbU::Unit Vertex::getIMin() const
|
||||||
|
@ -832,9 +913,31 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getIMin();
|
return _adata->getIMin();
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getIMin() const: Inappropriate usage of GRAData. " << endl;
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getIMin() const: Digital vertex. " << endl;
|
||||||
|
if (_from){
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
if (isH()){
|
||||||
|
if (isNorth(vprev)||isSouth(vprev)||isEast (vprev)) return getGCell()->getXCenter();
|
||||||
|
else if (isWest (vprev)) return getGCell()->getXMin();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getIMin() const: Not a neighbour GCell. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
if (isWest(vprev)||isEast(vprev)||isNorth (vprev)) return getGCell()->getYCenter();
|
||||||
|
else if (isSouth (vprev)) return getGCell()->getYMin();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getIMin() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (isH()) return getGCell()->getXCenter();
|
||||||
|
else return getGCell()->getYCenter();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -842,33 +945,104 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getPIAxis();
|
return _adata->getPIAxis();
|
||||||
|
} else {
|
||||||
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getPIAxis() const: Digital vertex. " << endl;
|
||||||
|
if (_from){
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
|
||||||
|
if (vprev->isH()){
|
||||||
|
if (vprev->isWest(this)||vprev->isEast (this)) return gprev->getYCenter();
|
||||||
|
else if (vprev->isSouth (this)) return gprev->getYMin();
|
||||||
|
else if (vprev->isNorth (this)) return gprev->getYMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIAxis() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (vprev->isNorth(this)||vprev->isSouth (this)) return gprev->getXCenter();
|
||||||
|
else if (vprev->isWest (this)) return gprev->getXMin();
|
||||||
|
else if (vprev->isEast (this)) return gprev->getXMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIAxis() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getPIAxis() const: Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIAxis() const: Inappropriate usage of GRAData. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit Vertex::getPIMax() const
|
DbU::Unit Vertex::getPIMax() const
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getPIMax();
|
return _adata->getPIMax();
|
||||||
|
} else {
|
||||||
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getPIMax() const: Digital vertex. " << endl;
|
||||||
|
if (_from){
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
|
||||||
|
if (vprev->isH()){
|
||||||
|
if (vprev->isSouth(this)||vprev->isWest(this)||vprev->isNorth(this)) return gprev->getXCenter();
|
||||||
|
else if (vprev->isEast (this)) return gprev->getXMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMax() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (vprev->isSouth(this)||vprev->isWest(this)||vprev->isEast(this)) return gprev->getYCenter();
|
||||||
|
else if (vprev->isNorth (this)) return gprev->getYMax();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMax() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMax() const: Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMax() const: Inappropriate usage of GRAData. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit Vertex::getPIMin() const
|
DbU::Unit Vertex::getPIMin() const
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getPIMin();
|
return _adata->getPIMin();
|
||||||
|
} else {
|
||||||
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getPIMin() const: Digital vertex. " << endl;
|
||||||
|
if (_from){
|
||||||
|
GCell* gcurr = getGCell();
|
||||||
|
GCell* gprev = _from->getOpposite(gcurr);
|
||||||
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
|
||||||
|
if (vprev->isH()){
|
||||||
|
if (vprev->isSouth(this)||vprev->isWest(this)||vprev->isNorth(this)) return gprev->getXCenter();
|
||||||
|
else if (vprev->isWest (this)) return gprev->getXMin();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMin() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (vprev->isNorth(this)||vprev->isWest(this)||vprev->isEast(this)) return gprev->getYCenter();
|
||||||
|
else if (vprev->isSouth (this)) return gprev->getYMin();
|
||||||
|
else {
|
||||||
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMin() const: Not a neighbour GCell. " << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMin() const: Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "DbU::Unit Vertex::getPIMin() const: Inappropriate usage of GRAData. " << endl;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Vertex::setInterv( DbU::Unit min, DbU::Unit max, DbU::Unit axis )
|
void Vertex::setInterv( DbU::Unit min, DbU::Unit max, DbU::Unit axis )
|
||||||
|
@ -905,9 +1079,9 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata){
|
||||||
_adata->resetIntervals();
|
_adata->resetIntervals();
|
||||||
} else {
|
} /*else {
|
||||||
cdebug_log(112,0) << "void Vertex::resetIntervals(): Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "void Vertex::resetIntervals(): Inappropriate usage of GRAData. " << endl;
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -915,8 +1089,6 @@ namespace Anabatic {
|
||||||
{
|
{
|
||||||
if (_adata){
|
if (_adata){
|
||||||
_adata->clearFrom2();
|
_adata->clearFrom2();
|
||||||
} else {
|
|
||||||
cdebug_log(112,0) << "void Vertex::clearfrom2(): Inappropriate usage of GRAData. " << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -926,7 +1098,7 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
return _adata->getFrom2();
|
return _adata->getFrom2();
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "Edge* Vertex::getFrom2() const: Inappropriate usage of GRAData. " << endl;
|
//cdebug_log(112,0) << "Edge* Vertex::getFrom2() const: Inappropriate usage of GRAData. " << endl;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -937,17 +1109,7 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
_adata->setFrom2(from);
|
_adata->setFrom2(from);
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "void Vertex::setFrom2( Edge* from ): Inappropriate usage of GRAData. " << endl;
|
if (from) cdebug_log(112,0) << "void Vertex::setFrom2( Edge* from ): Inappropriate usage of GRAData. " << endl;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void Vertex::createIntervFrom2()
|
|
||||||
{
|
|
||||||
if (_adata){
|
|
||||||
//_adata->createIntervFrom2();
|
|
||||||
} else {
|
|
||||||
cdebug_log(112,0) << "void Vertex::createIntervFrom2(): Inappropriate usage of GRAData. " << endl;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1024,8 +1186,8 @@ namespace Anabatic {
|
||||||
return _adata->getIntervFrom();
|
return _adata->getIntervFrom();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "DbU::Unit Vertex::getIntervFrom(Flags criteria) const: Inappropriate usage of GRAData. " << endl;
|
//cdebug_log(112,0) << "DbU::Unit Vertex::getIntervFrom(Flags criteria) const: Inappropriate usage of GRAData. " << endl;
|
||||||
return IntervalC();
|
return IntervalC(getPIMin(), getPIMax(), getPIAxis());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1084,7 +1246,7 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
_adata->printInterv();
|
_adata->printInterv();
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "void Vertex::printInterv() const: Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "Interv => this is a digital vertex." << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1094,7 +1256,7 @@ namespace Anabatic {
|
||||||
if (_adata){
|
if (_adata){
|
||||||
_adata->printIntervfrom();
|
_adata->printIntervfrom();
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(112,0) << "void Vertex::printIntervfrom() const: Inappropriate usage of GRAData. " << endl;
|
cdebug_log(112,0) << "IntervFrom => this is a digital vertex." << endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1170,12 +1332,30 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DbU::Unit calcDistance( Point p1, Point p2 )
|
/*U::Unit calcDistance( Point p1, Point p2 )
|
||||||
{
|
{
|
||||||
return abs(p1.getX()-p2.getX()) + abs(p1.getY()-p2.getY());
|
return abs(p1.getX()-p2.getX()) + abs(p1.getY()-p2.getY());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DbU::Unit calcMidIntersection( DbU::Unit imin1, DbU::Unit imax1, DbU::Unit imin2, DbU::Unit imax2 )
|
||||||
|
{
|
||||||
|
if ( (imin1 > imax1)
|
||||||
|
|| (imin2 > imax2)
|
||||||
|
){
|
||||||
|
cerr << "DbU::Unit calcMidIntersection(...): Wrong parameters." << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if ( (imin1 > imax2)
|
||||||
|
|| (imax1 < imin2)
|
||||||
|
) {
|
||||||
|
cerr << "DbU::Unit calcMidIntersection(...): No intersection." << endl;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return ( max(imin1, imin2) + min(imax1, imax2) )/2;
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
Dijkstra::Dijkstra ( AnabaticEngine* anabatic )
|
Dijkstra::Dijkstra ( AnabaticEngine* anabatic )
|
||||||
: _anabatic (anabatic)
|
: _anabatic (anabatic)
|
||||||
, _vertexes ()
|
, _vertexes ()
|
||||||
|
@ -1244,6 +1424,8 @@ namespace Anabatic {
|
||||||
if (state->isSelfSym()){
|
if (state->isSelfSym()){
|
||||||
cdebug_log(112,0) << "Dijkstra::SELF SYMMETRY CASE " << _net << endl;
|
cdebug_log(112,0) << "Dijkstra::SELF SYMMETRY CASE " << _net << endl;
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
cerr << "Error: No RoutingExtension for net: " << _net << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( Component* component : _net->getComponents() ) {
|
for ( Component* component : _net->getComponents() ) {
|
||||||
|
@ -1276,14 +1458,18 @@ namespace Anabatic {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
cdebug_log(112,0) << "Merge search area: " << _searchArea << ", gcell: " << gcell << endl;
|
cdebug_log(112,0) << "Merge search area: " << _searchArea << ", gcell: " << gcell << endl;
|
||||||
_searchArea.merge( gcell->getBoundingBox() );
|
//_searchArea.merge( gcell->getBoundingBox() ); // TO CHANGE
|
||||||
|
if (_net->getCell()->getName() == "gmchamla") _searchArea.merge( _net->getCell()->getAbutmentBox() ); // TO CHANGE
|
||||||
cdebug_log(112,0) << "Search area: " << _searchArea << endl;
|
cdebug_log(112,0) << "Search area: " << _searchArea << endl;
|
||||||
|
|
||||||
Vertex* seed = gcell->getObserver<Vertex>(GCell::Observable::Vertex);
|
Vertex* seed = gcell->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
GCell* gseed = seed->getGCell();
|
//GCell* gseed = seed->getGCell();
|
||||||
|
|
||||||
if (!gseed->isMatrix()) _setSourcesGRAData( seed, rp ); // ANALOG
|
_setSourcesGRAData( seed, rp ); // ANALOG
|
||||||
|
|
||||||
if (seed->getConnexId() < 0) {
|
if (seed->getConnexId() < 0) {
|
||||||
VertexSet connecteds;
|
VertexSet connecteds;
|
||||||
|
@ -1432,9 +1618,7 @@ namespace Anabatic {
|
||||||
) _queue.push( vnext );
|
) _queue.push( vnext );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1536,7 +1720,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
if ( current->isAxisTarget() and needAxisTarget()) unsetFlags(Mode::AxisTarget);
|
if ( current->isAxisTarget() and needAxisTarget()) unsetFlags(Mode::AxisTarget);
|
||||||
else if ((current->getConnexId() == _connectedsId) or (current->getConnexId() < 0)) {
|
else if ((current->getConnexId() == _connectedsId) or (current->getConnexId() < 0)) {
|
||||||
cdebug_log(111,1) << "Looking for neighbors:" << endl;
|
cdebug_log(111,0) << "Looking for neighbors:" << endl;
|
||||||
|
|
||||||
for ( Edge* edge : current->getGCell()->getEdges() ) {
|
for ( Edge* edge : current->getGCell()->getEdges() ) {
|
||||||
cdebug_log(111,0) << "[Current]: " << current << endl;
|
cdebug_log(111,0) << "[Current]: " << current << endl;
|
||||||
|
@ -1568,7 +1752,6 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////// DEBUG //////////////////////////////////////
|
////////////////////////////////////// DEBUG //////////////////////////////////////
|
||||||
cdebug_tabw(111,1);
|
|
||||||
if (current->getFrom()) {
|
if (current->getFrom()) {
|
||||||
cdebug_log(111,0) << "| From: " << current->getFrom()->getOpposite(gcurrent) << endl;
|
cdebug_log(111,0) << "| From: " << current->getFrom()->getOpposite(gcurrent) << endl;
|
||||||
//current->getIntervFrom().print();
|
//current->getIntervFrom().print();
|
||||||
|
@ -1588,7 +1771,7 @@ namespace Anabatic {
|
||||||
bool isDistance2shorter = _isDistance2Shorter ( distance, current, vneighbor, edge ); // ANALOG
|
bool isDistance2shorter = _isDistance2Shorter ( distance, current, vneighbor, edge ); // ANALOG
|
||||||
|
|
||||||
if ( (distance == vneighbor->getDistance())
|
if ( (distance == vneighbor->getDistance())
|
||||||
and (not gcurrent->isMatrix() )
|
//and (not gcurrent->isMatrix() )
|
||||||
and (not gneighbor->isMatrix())
|
and (not gneighbor->isMatrix())
|
||||||
and (vneighbor->getFrom2() == NULL)
|
and (vneighbor->getFrom2() == NULL)
|
||||||
) {
|
) {
|
||||||
|
@ -1607,7 +1790,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cdebug_log(111,0) << "Vertex reached through a shorter path"<< endl;
|
cdebug_log(111,0) << "Vertex reached through a shorter path"<< endl;
|
||||||
_updateGRAData( vneighbor, isDistance2shorter, current ); // ANALOG
|
if (vneighbor->hasAData()) _updateGRAData( vneighbor, isDistance2shorter, current ); // ANALOG
|
||||||
|
|
||||||
vneighbor->setBranchId( current->getBranchId() );
|
vneighbor->setBranchId( current->getBranchId() );
|
||||||
vneighbor->setDistance( distance );
|
vneighbor->setDistance( distance );
|
||||||
|
@ -1619,16 +1802,10 @@ namespace Anabatic {
|
||||||
} else {
|
} else {
|
||||||
cdebug_log(111,0) << "Reject: Vertex reached through a *longer* path" << endl;
|
cdebug_log(111,0) << "Reject: Vertex reached through a *longer* path" << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
cdebug_tabw(111,-1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cdebug_tabw(111,-2);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
cdebug_tabw(111,-1);
|
|
||||||
|
|
||||||
// We did reach another target (different <connexId>).
|
// We did reach another target (different <connexId>).
|
||||||
// Tag back the path, with a higher <branchId>.
|
// Tag back the path, with a higher <branchId>.
|
||||||
_traceback( current );
|
_traceback( current );
|
||||||
|
@ -1659,13 +1836,12 @@ namespace Anabatic {
|
||||||
|
|
||||||
bool isfirst = true;
|
bool isfirst = true;
|
||||||
bool useFrom2 = false;
|
bool useFrom2 = false;
|
||||||
if (!current->getGCell()->isMatrix()){
|
//if (!current->getGCell()->isMatrix()){
|
||||||
_initiateUpdateIntervals ( current ); // ANALOG
|
_initiateUpdateIntervals ( current ); // ANALOG
|
||||||
} else {
|
/*} else {
|
||||||
current = current->getPredecessor();
|
current = current->getPredecessor();
|
||||||
isfirst = false;
|
isfirst = false;
|
||||||
|
}*/
|
||||||
}
|
|
||||||
cdebug_log(112,0) << "[Start WHILE]" << endl;
|
cdebug_log(112,0) << "[Start WHILE]" << endl;
|
||||||
|
|
||||||
Edge* from = NULL;
|
Edge* from = NULL;
|
||||||
|
@ -1675,7 +1851,7 @@ namespace Anabatic {
|
||||||
if (current->getFrom()) cdebug_log(112,0) << " | From :" << current->getFrom()->getOpposite(current->getGCell()) << " | " << endl;
|
if (current->getFrom()) cdebug_log(112,0) << " | From :" << current->getFrom()->getOpposite(current->getGCell()) << " | " << endl;
|
||||||
if (current->getFrom2()) cdebug_log(112,0) << " | From2:" << current->getFrom2()->getOpposite(current->getGCell()) << " | " << endl;
|
if (current->getFrom2()) cdebug_log(112,0) << " | From2:" << current->getFrom2()->getOpposite(current->getGCell()) << " | " << endl;
|
||||||
|
|
||||||
if (!current->getGCell()->isMatrix()){
|
//if (!current->getGCell()->isMatrix()){
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////// ANALOG
|
//////////////////////////////////////////////////////////////////////////////////////////// ANALOG
|
||||||
if (_updateIntervals ( isfirst, current, useFrom2, branchId, from )) break;
|
if (_updateIntervals ( isfirst, current, useFrom2, branchId, from )) break;
|
||||||
Vertex* next = NULL;
|
Vertex* next = NULL;
|
||||||
|
@ -1692,7 +1868,7 @@ namespace Anabatic {
|
||||||
cdebug_log(112,0) << "next: " << next << endl;
|
cdebug_log(112,0) << "next: " << next << endl;
|
||||||
current = next;
|
current = next;
|
||||||
////////////////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
} else {
|
/*} else {
|
||||||
current->incDegree();
|
current->incDegree();
|
||||||
if (current->getConnexId() == _connectedsId) break;
|
if (current->getConnexId() == _connectedsId) break;
|
||||||
|
|
||||||
|
@ -1705,7 +1881,7 @@ namespace Anabatic {
|
||||||
_sources.insert( current );
|
_sources.insert( current );
|
||||||
_queue.push( current );
|
_queue.push( current );
|
||||||
current = current->getPredecessor();
|
current = current->getPredecessor();
|
||||||
}
|
}*/
|
||||||
}
|
}
|
||||||
cdebug_tabw(112,-1);
|
cdebug_tabw(112,-1);
|
||||||
}
|
}
|
||||||
|
@ -1718,6 +1894,7 @@ namespace Anabatic {
|
||||||
if (_sources.size() < 2) { cdebug_tabw(112,-1); return; }
|
if (_sources.size() < 2) { cdebug_tabw(112,-1); return; }
|
||||||
|
|
||||||
NetRoutingState* state = NetRoutingExtension::get( _net );
|
NetRoutingState* state = NetRoutingExtension::get( _net );
|
||||||
|
cerr << "state: " << state << endl;
|
||||||
|
|
||||||
for ( Vertex* startVertex : _sources ) {
|
for ( Vertex* startVertex : _sources ) {
|
||||||
|
|
||||||
|
@ -1782,11 +1959,13 @@ namespace Anabatic {
|
||||||
if (sourceContact->getX() > targetContact->getX())
|
if (sourceContact->getX() > targetContact->getX())
|
||||||
std::swap( sourceContact, targetContact );
|
std::swap( sourceContact, targetContact );
|
||||||
|
|
||||||
|
DbU::Unit width = Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL2"));
|
||||||
|
if (state) width *= state->getWPitch();
|
||||||
segment = Horizontal::create( sourceContact
|
segment = Horizontal::create( sourceContact
|
||||||
, targetContact
|
, targetContact
|
||||||
, _anabatic->getConfiguration()->getGHorizontalLayer()
|
, _anabatic->getConfiguration()->getGHorizontalLayer()
|
||||||
, constraint.getCenter()
|
, constraint.getCenter()
|
||||||
, state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL2"))//DbU::fromLambda(2.0)
|
, width//DbU::fromLambda(2.0)
|
||||||
);
|
);
|
||||||
for ( Edge* through : aligneds ) through->add( segment );
|
for ( Edge* through : aligneds ) through->add( segment );
|
||||||
if (state){
|
if (state){
|
||||||
|
@ -1796,11 +1975,13 @@ namespace Anabatic {
|
||||||
if (sourceContact->getY() > targetContact->getY())
|
if (sourceContact->getY() > targetContact->getY())
|
||||||
std::swap( sourceContact, targetContact );
|
std::swap( sourceContact, targetContact );
|
||||||
|
|
||||||
|
DbU::Unit width = Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL3"));
|
||||||
|
if (state) width *= state->getWPitch();
|
||||||
segment = Vertical::create( sourceContact
|
segment = Vertical::create( sourceContact
|
||||||
, targetContact
|
, targetContact
|
||||||
, _anabatic->getConfiguration()->getGVerticalLayer()
|
, _anabatic->getConfiguration()->getGVerticalLayer()
|
||||||
, constraint.getCenter()
|
, constraint.getCenter()
|
||||||
, state->getWPitch()*Session::getPitch(Hurricane::DataBase::getDB()->getTechnology()->getLayer("METAL3"))//DbU::fromLambda(2.0)
|
, width//DbU::fromLambda(2.0)
|
||||||
);
|
);
|
||||||
for ( Edge* through : aligneds ) through->add( segment );
|
for ( Edge* through : aligneds ) through->add( segment );
|
||||||
if (state){
|
if (state){
|
||||||
|
@ -2139,7 +2320,6 @@ namespace Anabatic {
|
||||||
cdebug_log(111,0) << "setFrom2: " << vneighbor << endl;
|
cdebug_log(111,0) << "setFrom2: " << vneighbor << endl;
|
||||||
vneighbor->setFrom2 ( edge );
|
vneighbor->setFrom2 ( edge );
|
||||||
vneighbor->setFlags(Vertex::From2Mode);
|
vneighbor->setFlags(Vertex::From2Mode);
|
||||||
//vneighbor->createIntervFrom2();
|
|
||||||
vneighbor->setIntervals( current );
|
vneighbor->setIntervals( current );
|
||||||
vneighbor->unsetFlags(Vertex::From2Mode);
|
vneighbor->unsetFlags(Vertex::From2Mode);
|
||||||
if (isDistance2shorter) {
|
if (isDistance2shorter) {
|
||||||
|
@ -2169,8 +2349,10 @@ namespace Anabatic {
|
||||||
vneighbor->getIntervFrom().print();
|
vneighbor->getIntervFrom().print();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void Dijkstra::_initiateUpdateIntervals ( Vertex* current )
|
void Dijkstra::_initiateUpdateIntervals ( Vertex* current )
|
||||||
{
|
{
|
||||||
|
if (!current->getGCell()->isMatrix()){
|
||||||
GCell* gcurr = current->getGCell();
|
GCell* gcurr = current->getGCell();
|
||||||
GCell* gprev = current->getFrom()->getOpposite(gcurr);
|
GCell* gprev = current->getFrom()->getOpposite(gcurr);
|
||||||
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
Vertex* vprev = gprev->getObserver<Vertex>(GCell::Observable::Vertex);
|
||||||
|
@ -2209,6 +2391,7 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
cdebug_log(112,0) << "isiSet: " << current->isiSet() << endl;
|
cdebug_log(112,0) << "isiSet: " << current->isiSet() << endl;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool Dijkstra::_updateIntervals( bool& isfirst, Vertex* current, bool& useFrom2, int& branchId, Edge* from )
|
bool Dijkstra::_updateIntervals( bool& isfirst, Vertex* current, bool& useFrom2, int& branchId, Edge* from )
|
||||||
|
@ -2234,7 +2417,7 @@ namespace Anabatic {
|
||||||
_queue.push( current );
|
_queue.push( current );
|
||||||
} else isfirst = false;
|
} else isfirst = false;
|
||||||
|
|
||||||
if (current->getPredecessor() != NULL){
|
if ((current->getPredecessor() != NULL)&&(!current->getGCell()->isMatrix())){
|
||||||
cdebug_log(112,0) << "Predecessor() : " << current->getPredecessor() << endl;
|
cdebug_log(112,0) << "Predecessor() : " << current->getPredecessor() << endl;
|
||||||
cdebug_log(112,0) << "[Interval update]: min : " << DbU::getValueString(current->getPIMin());
|
cdebug_log(112,0) << "[Interval update]: min : " << DbU::getValueString(current->getPIMin());
|
||||||
cdebug_log(112,0) << ", max : " << DbU::getValueString(current->getPIMax());
|
cdebug_log(112,0) << ", max : " << DbU::getValueString(current->getPIMax());
|
||||||
|
@ -2300,18 +2483,24 @@ namespace Anabatic {
|
||||||
|
|
||||||
void Dijkstra::_setSourcesGRAData( Vertex* seed, RoutingPad* rp )
|
void Dijkstra::_setSourcesGRAData( Vertex* seed, RoutingPad* rp )
|
||||||
{
|
{
|
||||||
|
GCell* gseed = seed->getGCell();
|
||||||
Horizontal* h = dynamic_cast<Horizontal*>(rp->_getEntityAsSegment());
|
Horizontal* h = dynamic_cast<Horizontal*>(rp->_getEntityAsSegment());
|
||||||
Vertical* v = dynamic_cast<Vertical*> (rp->_getEntityAsSegment());
|
Vertical* v = dynamic_cast<Vertical*> (rp->_getEntityAsSegment());
|
||||||
seed->createAData();
|
|
||||||
if (h) {
|
if (h) {
|
||||||
seed->setFlags(Vertex::iHorizontal);
|
seed->setFlags(Vertex::iHorizontal);
|
||||||
|
if (!gseed->isMatrix()){
|
||||||
|
seed->createAData();
|
||||||
seed->setInterv(rp->getBoundingBox().getXMin(), rp->getBoundingBox().getXMax(), rp->getBoundingBox().getYCenter());
|
seed->setInterv(rp->getBoundingBox().getXMin(), rp->getBoundingBox().getXMax(), rp->getBoundingBox().getYCenter());
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (v) {
|
if (v) {
|
||||||
seed->setFlags(Vertex::iVertical);
|
seed->setFlags(Vertex::iVertical);
|
||||||
|
if (!gseed->isMatrix()) {
|
||||||
|
seed->createAData();
|
||||||
seed->setInterv(rp->getBoundingBox().getYMin(), rp->getBoundingBox().getYMax(), rp->getBoundingBox().getXCenter());
|
seed->setInterv(rp->getBoundingBox().getYMin(), rp->getBoundingBox().getYMax(), rp->getBoundingBox().getXCenter());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Dijkstra::_updateRealOccupancy ( Vertex* current )
|
void Dijkstra::_updateRealOccupancy ( Vertex* current )
|
||||||
|
|
|
@ -318,8 +318,8 @@ namespace Anabatic {
|
||||||
Hurricane::NetRoutingState* state = Hurricane::NetRoutingExtension::get( net );
|
Hurricane::NetRoutingState* state = Hurricane::NetRoutingExtension::get( net );
|
||||||
//cerr << "bool Edge::isMaxCapacity ( Net* net ) const: " << net << endl;
|
//cerr << "bool Edge::isMaxCapacity ( Net* net ) const: " << net << endl;
|
||||||
//cerr << "WPitch: " << state->getWPitch() << endl;
|
//cerr << "WPitch: " << state->getWPitch() << endl;
|
||||||
|
if (state) return ( (_realOccupancy +state->getWPitch()) > _capacity ) ? true : false;
|
||||||
return ( (_realOccupancy +state->getWPitch()) > _capacity ) ? true : false;
|
else return ( (_realOccupancy +1) > _capacity ) ? true : false;
|
||||||
} else {
|
} else {
|
||||||
return ( _realOccupancy >= _capacity ) ? true : false;
|
return ( _realOccupancy >= _capacity ) ? true : false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -505,6 +505,34 @@ namespace Anabatic {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GCell* GCell::getEastNMatrix() const
|
||||||
|
{
|
||||||
|
if (!this->getEast()->isMatrix()) return this->getEast();
|
||||||
|
else {
|
||||||
|
GCell* gcell = this->getEast();
|
||||||
|
while(gcell->getEast()){
|
||||||
|
if (!gcell->getEast()->isMatrix()) break;
|
||||||
|
else gcell = gcell->getEast();
|
||||||
|
}
|
||||||
|
return gcell->getEast();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
GCell* GCell::getNorthNMatrix() const
|
||||||
|
{
|
||||||
|
if (!this->getNorth()->isMatrix()) return this->getNorth();
|
||||||
|
else {
|
||||||
|
GCell* gcell = this->getNorth();
|
||||||
|
while(gcell->getNorth()){
|
||||||
|
if (!gcell->getNorth()->isMatrix()) break;
|
||||||
|
else gcell = gcell->getNorth();
|
||||||
|
}
|
||||||
|
return gcell->getNorth();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
GCell* GCell::getWest ( DbU::Unit y ) const
|
GCell* GCell::getWest ( DbU::Unit y ) const
|
||||||
{
|
{
|
||||||
for ( Edge* edge : _westEdges ) {
|
for ( Edge* edge : _westEdges ) {
|
||||||
|
@ -724,7 +752,7 @@ namespace Anabatic {
|
||||||
|
|
||||||
bool GCell::doGrid ()
|
bool GCell::doGrid ()
|
||||||
{
|
{
|
||||||
getAnabatic()->openSession();
|
//getAnabatic()->openSession();
|
||||||
|
|
||||||
DbU::Unit side = Session::getSliceHeight();
|
DbU::Unit side = Session::getSliceHeight();
|
||||||
Interval hspan = getSide( Flags::Horizontal );
|
Interval hspan = getSide( Flags::Horizontal );
|
||||||
|
@ -782,7 +810,7 @@ namespace Anabatic {
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
Session::close();
|
//Session::close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1685,9 +1713,15 @@ namespace Anabatic {
|
||||||
|
|
||||||
string GCell::_getString () const
|
string GCell::_getString () const
|
||||||
{
|
{
|
||||||
string s = Super::_getString();
|
//string s = Super::_getString();
|
||||||
s.insert( s.size()-1, " "+getString(getBoundingBox()) );
|
//s.insert( s.size()-1, " "+getString(getBoundingBox()) );
|
||||||
s.insert( s.size()-1, " "+getString(_flags) );
|
//s.insert( s.size()-1, " "+getString(_flags) );
|
||||||
|
string s = "<GCell at(" + DbU::getValueString(getXMin())
|
||||||
|
+ "-" + DbU::getValueString(getYMin())
|
||||||
|
+ "-" + DbU::getValueString(getXMax())
|
||||||
|
+ "-" + DbU::getValueString(getYMax())
|
||||||
|
+ "-" + DbU::getValueString(getHeight())
|
||||||
|
+ "-" + DbU::getValueString(getWidth()) + ")";
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,6 +54,7 @@ namespace Anabatic {
|
||||||
IntervalC();
|
IntervalC();
|
||||||
IntervalC(const IntervalC&);
|
IntervalC(const IntervalC&);
|
||||||
IntervalC(IntervalC&);
|
IntervalC(IntervalC&);
|
||||||
|
IntervalC( DbU::Unit, DbU::Unit, DbU::Unit );
|
||||||
~IntervalC();
|
~IntervalC();
|
||||||
void set ( DbU::Unit, DbU::Unit, DbU::Unit );
|
void set ( DbU::Unit, DbU::Unit, DbU::Unit );
|
||||||
void setRange ( DbU::Unit, DbU::Unit );
|
void setRange ( DbU::Unit, DbU::Unit );
|
||||||
|
@ -262,7 +263,7 @@ namespace Anabatic {
|
||||||
Point getNextPathPoint ( Point, const Vertex* ) const;
|
Point getNextPathPoint ( Point, const Vertex* ) const;
|
||||||
//////////////////////////////////////// GRDATA
|
//////////////////////////////////////// GRDATA
|
||||||
void setIntervals ( Vertex* );
|
void setIntervals ( Vertex* );
|
||||||
|
inline bool hasAData () const;
|
||||||
bool isiSet () const;
|
bool isiSet () const;
|
||||||
DbU::Unit getIAxis () const;
|
DbU::Unit getIAxis () const;
|
||||||
DbU::Unit getIMax () const;
|
DbU::Unit getIMax () const;
|
||||||
|
@ -277,7 +278,6 @@ namespace Anabatic {
|
||||||
void clearFrom2 ();
|
void clearFrom2 ();
|
||||||
Edge* getFrom2 () const;
|
Edge* getFrom2 () const;
|
||||||
void setFrom2 ( Edge* );
|
void setFrom2 ( Edge* );
|
||||||
void createIntervFrom2 ();
|
|
||||||
DbU::Unit getPIMax2 () const;
|
DbU::Unit getPIMax2 () const;
|
||||||
DbU::Unit getPIMin2 () const;
|
DbU::Unit getPIMin2 () const;
|
||||||
DbU::Unit getPIAxis2 () const;
|
DbU::Unit getPIAxis2 () const;
|
||||||
|
@ -372,6 +372,7 @@ namespace Anabatic {
|
||||||
inline bool Vertex::isWRestricted () const { return (_flags & WRestricted); }
|
inline bool Vertex::isWRestricted () const { return (_flags & WRestricted); }
|
||||||
inline bool Vertex::hasRestrictions () const { return ( isNRestricted()||isSRestricted()||isERestricted()||isWRestricted()) ; }
|
inline bool Vertex::hasRestrictions () const { return ( isNRestricted()||isSRestricted()||isERestricted()||isWRestricted()) ; }
|
||||||
|
|
||||||
|
inline bool Vertex::hasAData () const { return (_adata !=NULL)? true : false; }
|
||||||
inline void Vertex::setRestricted () { _flags |= 0xF; }
|
inline void Vertex::setRestricted () { _flags |= 0xF; }
|
||||||
inline void Vertex::clearRestriction () { _flags &= ~(0xF); }
|
inline void Vertex::clearRestriction () { _flags &= ~(0xF); }
|
||||||
inline void Vertex::setNRestricted () { _flags |= NRestricted; }
|
inline void Vertex::setNRestricted () { _flags |= NRestricted; }
|
||||||
|
|
|
@ -172,6 +172,9 @@ namespace Anabatic {
|
||||||
inline GCell* getSouth () const;
|
inline GCell* getSouth () const;
|
||||||
inline GCell* getNorth () const;
|
inline GCell* getNorth () const;
|
||||||
|
|
||||||
|
GCell* getEastNMatrix () const;
|
||||||
|
GCell* getNorthNMatrix () const;
|
||||||
|
|
||||||
inline Edge* getWestEdge () const;
|
inline Edge* getWestEdge () const;
|
||||||
inline Edge* getEastEdge () const;
|
inline Edge* getEastEdge () const;
|
||||||
inline Edge* getSouthEdge () const;
|
inline Edge* getSouthEdge () const;
|
||||||
|
|
|
@ -85,7 +85,7 @@ stylesTable = \
|
||||||
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
, (Drawing, 'gmetalv' , { 'color':'200,200,255', 'pattern':'light_antihash1.8', 'border':1 })
|
||||||
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
, (Drawing, 'gcut' , { 'color':'255,255,190', 'border':1 })
|
||||||
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 })
|
, (Drawing, 'Anabatic::Edge' , { 'color':'255,255,190', 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 })
|
||||||
, (Drawing, 'Anabatic::GCell', { 'color':'255,0,0' , 'pattern':'0000000000000000', 'threshold':0.10*scale, 'border':4 })
|
, (Drawing, 'Anabatic::GCell', { 'color':'255,0,0' , 'pattern':'0000000000000000', 'threshold':0.02*scale, 'border':4 })
|
||||||
)
|
)
|
||||||
|
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue