Bug fix, In Katana, do not remove AutoSegment conflicting with blockages.

* Bug: In Katana::NegociateWindow::createTrackSegment(), *fixed* AutoSegment
    in conflict with blockage where removeds. This was creating "holes"
    in the Anabatic articulated segment structure. Now just *don't*
    create the TrackSegment. Pass the regression tests, but not sure
    it is not generating problems elsewhere.
* New: AnabaticEngine::checkPlacement() to issue more clear errors about
    a defective placement.
This commit is contained in:
Jean-Paul Chaput 2020-04-21 15:40:59 +02:00
parent a4acb22e3c
commit e7bc4dc167
6 changed files with 55 additions and 2 deletions

View File

@ -349,6 +349,7 @@ namespace Anabatic {
UpdateSession::open();
GCell::create( this );
UpdateSession::close();
checkPlacement();
}
@ -492,6 +493,39 @@ namespace Anabatic {
}
bool AnabaticEngine::checkPlacement () const
{
bool valid = true;
Box cellAb = getCell()->getAbutmentBox();
for ( Occurrence occurrence : getCell()->getTerminalNetlistInstanceOccurrences() ) {
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
Cell* masterCell = instance->getMasterCell();
string instanceName = occurrence.getCompactString();
instanceName.erase( 0, 1 );
instanceName.erase( instanceName.size()-1 );
Box instanceAb = masterCell->getAbutmentBox();
Transformation instanceTransf = instance->getTransformation();
occurrence.getPath().getTransformation().applyOn( instanceTransf );
instanceTransf.applyOn( instanceAb );
if (not cellAb.contains(instanceAb)) {
valid = false;
cerr << Error( "AnabaticEngine::checkPlacement(): Instance %s is outside top cell abutment box, routing will be incomplete.\n"
" (cell:%s vs instance:%s)"
, instanceName.c_str()
, getString(cellAb ).c_str()
, getString(instanceAb).c_str()
) << endl;
}
}
return valid;
}
void AnabaticEngine::openSession ()
{ Session::_open(this); }

View File

@ -88,8 +88,17 @@ namespace Anabatic {
AutoSegment* AutoContactTurn::getPerpandicular ( const AutoSegment* reference ) const
{
cdebug_log(149,0) << _getTypeName() << "::getPerpandicular() " << this
<< " to:" << reference << endl;
cdebug_log(149,0) << "| _horizontal1:" << _horizontal1 << endl;
cdebug_log(149,0) << "| _vertical1 :" << _vertical1 << endl;
if (reference == _horizontal1) return _vertical1;
if (reference == _vertical1 ) return _horizontal1;
cdebug_log(149,0) << _getTypeName() << "::getPerpandicular() " << this
<< " to:" << reference << " failed." << endl;
return NULL;
}
@ -117,6 +126,9 @@ namespace Anabatic {
void AutoContactTurn::cacheDetach ( AutoSegment* segment )
{
cdebug_log(149,0) << _getTypeName() << "::cacheDetach() " << this
<< " from:" << segment << endl;
if (segment == _horizontal1) _horizontal1 = NULL;
else if (segment == _vertical1) _vertical1 = NULL;
else return;
@ -127,6 +139,9 @@ namespace Anabatic {
void AutoContactTurn::cacheAttach ( AutoSegment* segment )
{
cdebug_log(149,0) << _getTypeName() << "::cacheAttach() " << this
<< " to:" << segment << endl;
if (segment->getDirection() == Flags::Horizontal) {
if (_horizontal1) {
cerr << Bug( "%s::cacheAttach() On %s,\n"

View File

@ -314,6 +314,9 @@ namespace Anabatic {
isNonPrefSource = true;
slackenSource = true;
}
cdebug_log(149,0) << "target:" << target << endl;
cdebug_log(149,0) << "target->getPerpandicular(this):" << target->getPerpandicular(this) << endl;
if (target->isTurn() and (target->getPerpandicular(this)->getLayer() == getLayer())) {
isNonPrefTarget = true;
slackenTarget = true;

View File

@ -226,6 +226,7 @@ namespace Anabatic {
void exclude ( const Name& netName );
void exclude ( Net* );
void updateMatrix ();
bool checkPlacement () const;
// Dijkstra related functions.
inline int getStamp () const;
inline int incStamp ();

View File

@ -352,7 +352,7 @@ namespace Katana {
// Overlap between fixed & blockage.
cdebug_log(159,0) << "* Blockage overlap: " << autoSegment << endl;
Session::destroyRequest( autoSegment );
//Session::destroyRequest( autoSegment );
cerr << Warning( "Overlap between fixed %s and blockage at %s."
, getString(autoSegment).c_str()

View File

@ -331,7 +331,7 @@ namespace Katana {
if (trackSegment) trackSegment->reschedule( 0 );
}
}
// for ( TrackElement* trackSegment : _indirectInvalids ) {
// cdebug_log(159,0) << "Indirect reschedule:" << trackSegment << endl;
// trackSegment->reschedule( 0 );