Disable the merged quad-tree feature, no so bright an idea.

* Bug: In Hurricane, In Cell, the quad-tree cannot be mergeds because
    when a geometrical search is performed, components, and even more
    importantly, instances from lower hierarchical levels will be
    reported. And there is no simple way to discriminate them.
* Change: In Hurricane, Cell & Instance, change the flag of
    MergedQuadTree into SlavedAb.
* Bug: In Hurricane, In Instance::slaveAbutmentBox(), the AB of the
    master model must be set before calling setPlacementStatus()
    otherwise the Instance do not get inserted into the quad-tree
    (empty AB).
This commit is contained in:
Jean-Paul Chaput 2016-03-11 14:04:31 +01:00
parent b2374c73b8
commit ae0e6aed25
7 changed files with 32 additions and 30 deletions

View File

@ -572,7 +572,7 @@ void Cell::setAbutmentBox(const Box& abutmentBox)
for ( Instance* instance : getInstances() ) { for ( Instance* instance : getInstances() ) {
Cell* masterCell = instance->getMasterCell(); Cell* masterCell = instance->getMasterCell();
if (masterCell->getFlags().isset(Flags::MergedQuadTree)) if (masterCell->getFlags().isset(Flags::SlavedAb))
masterCell->setAbutmentBox( abutmentBox ); masterCell->setAbutmentBox( abutmentBox );
} }
} }
@ -840,12 +840,13 @@ void Cell::unmaterialize()
void Cell::slaveAbutmentBox ( Cell* topCell ) void Cell::slaveAbutmentBox ( Cell* topCell )
// ****************************************** // ******************************************
{ {
if (_flags.isset(Flags::MergedQuadTree)) { if (_flags.isset(Flags::SlavedAb)) {
cerr << Error( "Cell::slaveAbutmentBox(): %s is already slaved, action cancelled." cerr << Error( "Cell::slaveAbutmentBox(): %s is already slaved, action cancelled."
, getString(this).c_str() ) << endl; , getString(this).c_str() ) << endl;
return; return;
} }
_flags.set( Flags::SlavedAb );
if (not isUnique()) { if (not isUnique()) {
cerr << Error( "Cell::slaveAbutmentBox(): %s is *not* unique, action cancelled." cerr << Error( "Cell::slaveAbutmentBox(): %s is *not* unique, action cancelled."
, getString(this).c_str() ) << endl; , getString(this).c_str() ) << endl;
@ -885,11 +886,11 @@ void Cell::_slaveAbutmentBox ( Cell* topCell )
setAbutmentBox( topCell->getAbutmentBox() ); setAbutmentBox( topCell->getAbutmentBox() );
_changeQuadTree( topCell ); //_changeQuadTree( topCell );
for ( Instance* instance : getInstances() ) { for ( Instance* instance : getInstances() ) {
Cell* masterCell = instance->getMasterCell(); Cell* masterCell = instance->getMasterCell();
if (masterCell->getFlags().isset(Flags::MergedQuadTree)) if (masterCell->getFlags().isset(Flags::SlavedAb))
masterCell->_slaveAbutmentBox( topCell ); masterCell->_slaveAbutmentBox( topCell );
} }
} }

View File

@ -410,18 +410,18 @@ void Instance::setTransformation(const Transformation& transformation)
} }
} }
void Instance::setPlacementStatus(const PlacementStatus& placementstatus) void Instance::setPlacementStatus(const PlacementStatus& placementStatus)
// ********************************************************************** // **********************************************************************
{ {
if (placementstatus != _placementStatus) { if (placementStatus != _placementStatus) {
invalidate(true); invalidate(true);
if (_placementStatus == PlacementStatus::UNPLACED) { if (placementStatus & (PlacementStatus::PLACED|PlacementStatus::FIXED)) {
materialize (); materialize ();
} else if (placementstatus == PlacementStatus::UNPLACED) } else if (placementStatus == PlacementStatus::UNPLACED)
unmaterialize (); unmaterialize ();
_placementStatus = placementstatus; _placementStatus = placementStatus;
} }
} }
@ -512,10 +512,10 @@ void Instance::slaveAbutmentBox()
// ****************************** // ******************************
{ {
if (not _masterCell->isUniquified()) uniquify(); if (not _masterCell->isUniquified()) uniquify();
_masterCell->slaveAbutmentBox( getCell() );
//_masterCell->_setShuntedPath( Path(getCell()->getShuntedPath(),this) );
setTransformation( Transformation() ); setTransformation( Transformation() );
setPlacementStatus( Instance::PlacementStatus::PLACED ); setPlacementStatus( Instance::PlacementStatus::PLACED );
_masterCell->slaveAbutmentBox( getCell() );
_masterCell->_setShuntedPath( Path(getCell()->getShuntedPath(),this) );
} }
Instance* Instance::getClone(Cell* cloneCell) const Instance* Instance::getClone(Cell* cloneCell) const

View File

@ -122,9 +122,13 @@ SharedPath::SharedPath(Instance* headInstance, SharedPath* tailSharedPath)
if (_tailSharedPath && (_tailSharedPath->getOwnerCell() != _headInstance->getMasterCell())) if (_tailSharedPath && (_tailSharedPath->getOwnerCell() != _headInstance->getMasterCell()))
throw Error( "Can't create %s, incompatible tail path between:\n" throw Error( "Can't create %s, incompatible tail path between:\n"
" - head instance %s\n"
" - tail path %s\n"
" - head owner %s\n" " - head owner %s\n"
" - tail owner %s\n" " - tail owner %s\n"
, _TName("SharedPath").c_str() , _TName("SharedPath").c_str()
, getString(_headInstance ).c_str()
, getString(_tailSharedPath).c_str()
, getString(_headInstance ->getMasterCell()).c_str() , getString(_headInstance ->getMasterCell()).c_str()
, getString(_tailSharedPath->getOwnerCell ()).c_str() , getString(_tailSharedPath->getOwnerCell ()).c_str()
); );

View File

@ -94,7 +94,8 @@ class Cell : public Entity {
, Placed = 0x00020000 , Placed = 0x00020000
, Routed = 0x00040000 , Routed = 0x00040000
, MergedQuadTree = 0x00080000 , MergedQuadTree = 0x00080000
, Materialized = 0x00100000 , SlavedAb = 0x00100000
, Materialized = 0x00200000
}; };
public: public:

View File

@ -210,7 +210,8 @@ namespace Hurricane {
instance->getTransformation().getInvert().applyOn ( child->_area ); instance->getTransformation().getInvert().applyOn ( child->_area );
parent->_transformation.applyOn ( child->_transformation ); parent->_transformation.applyOn ( child->_transformation );
child->_path = Path ( Path(parent->_path,instance->getCell()->getShuntedPath()) , instance ); //child->_path = Path ( Path(parent->_path,instance->getCell()->getShuntedPath()) , instance );
child->_path = Path ( parent->_path, instance );
} }

View File

@ -2499,8 +2499,8 @@ namespace Hurricane {
throw Error ( "Can't select occurrence : invalid occurrence" ); throw Error ( "Can't select occurrence : invalid occurrence" );
if ( occurrence.getOwnerCell() != getCell() ) { if ( occurrence.getOwnerCell() != getCell() ) {
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) ); string s1 = Graphics::toHtml ( getString(getCell()) );
string s2 = Graphics::toHtml ( getString(getCell()) ); string s2 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s" throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
, s1.c_str(), s2.c_str() ); , s1.c_str(), s2.c_str() );
} }
@ -2544,6 +2544,10 @@ namespace Hurricane {
if ( criterion and (not criterion->isEnabled()) ) { if ( criterion and (not criterion->isEnabled()) ) {
criterion->enable(); criterion->enable();
//for ( Occurrence occurrence : getOccurrencesUnder(selectArea) ) {
// cerr << "Selecting: " << occurrence << endl;
//}
forEach ( Occurrence, ioccurrence, getOccurrencesUnder(selectArea) ) forEach ( Occurrence, ioccurrence, getOccurrencesUnder(selectArea) )
select ( *ioccurrence ); select ( *ioccurrence );
} else } else
@ -2565,8 +2569,8 @@ namespace Hurricane {
throw Error ( "Can't select occurrence : invalid occurrence" ); throw Error ( "Can't select occurrence : invalid occurrence" );
if ( occurrence.getOwnerCell() != getCell() ) { if ( occurrence.getOwnerCell() != getCell() ) {
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) ); string s1 = Graphics::toHtml ( getString(getCell()) );
string s2 = Graphics::toHtml ( getString(getCell()) ); string s2 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s" throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
, s1.c_str(), s2.c_str() ); , s1.c_str(), s2.c_str() );
} }

View File

@ -1,26 +1,17 @@
// -*- C++ -*- // -*- C++ -*-
// //
// This file is part of the Coriolis Software. // This file is part of the Coriolis Software.
// Copyright (c) UPMC/LIP6 2008-2016, All Rights Reserved // Copyright (c) UPMC 2008-2016, All Rights Reserved
// //
// =================================================================== // +-----------------------------------------------------------------+
//
// $Id$
//
// x-----------------------------------------------------------------x
// | |
// | H U R R I C A N E | // | H U R R I C A N E |
// | V L S I B a c k e n d D a t a - B a s e | // | V L S I B a c k e n d D a t a - B a s e |
// | | // | |
// | Author : Jean-Paul CHAPUT | // | Author : Jean-Paul CHAPUT |
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr | // | E-mail : Jean-Paul.Chaput@lip6.fr |
// | =============================================================== | // | =============================================================== |
// | C++ Module : "./SelectCommand.cpp" | // | C++ Module : "./SelectCommand.cpp" |
// | *************************************************************** | // +-----------------------------------------------------------------+
// | U p d a t e s |
// | |
// x-----------------------------------------------------------------x
#include <QString> #include <QString>