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:
parent
b2374c73b8
commit
ae0e6aed25
|
@ -572,7 +572,7 @@ void Cell::setAbutmentBox(const Box& abutmentBox)
|
|||
|
||||
for ( Instance* instance : getInstances() ) {
|
||||
Cell* masterCell = instance->getMasterCell();
|
||||
if (masterCell->getFlags().isset(Flags::MergedQuadTree))
|
||||
if (masterCell->getFlags().isset(Flags::SlavedAb))
|
||||
masterCell->setAbutmentBox( abutmentBox );
|
||||
}
|
||||
}
|
||||
|
@ -840,12 +840,13 @@ void Cell::unmaterialize()
|
|||
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."
|
||||
, getString(this).c_str() ) << endl;
|
||||
return;
|
||||
}
|
||||
|
||||
_flags.set( Flags::SlavedAb );
|
||||
if (not isUnique()) {
|
||||
cerr << Error( "Cell::slaveAbutmentBox(): %s is *not* unique, action cancelled."
|
||||
, getString(this).c_str() ) << endl;
|
||||
|
@ -885,11 +886,11 @@ void Cell::_slaveAbutmentBox ( Cell* topCell )
|
|||
|
||||
setAbutmentBox( topCell->getAbutmentBox() );
|
||||
|
||||
_changeQuadTree( topCell );
|
||||
//_changeQuadTree( topCell );
|
||||
|
||||
for ( Instance* instance : getInstances() ) {
|
||||
Cell* masterCell = instance->getMasterCell();
|
||||
if (masterCell->getFlags().isset(Flags::MergedQuadTree))
|
||||
if (masterCell->getFlags().isset(Flags::SlavedAb))
|
||||
masterCell->_slaveAbutmentBox( topCell );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
||||
if (_placementStatus == PlacementStatus::UNPLACED) {
|
||||
if (placementStatus & (PlacementStatus::PLACED|PlacementStatus::FIXED)) {
|
||||
materialize ();
|
||||
} else if (placementstatus == PlacementStatus::UNPLACED)
|
||||
} else if (placementStatus == PlacementStatus::UNPLACED)
|
||||
unmaterialize ();
|
||||
|
||||
_placementStatus = placementstatus;
|
||||
_placementStatus = placementStatus;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -512,10 +512,10 @@ void Instance::slaveAbutmentBox()
|
|||
// ******************************
|
||||
{
|
||||
if (not _masterCell->isUniquified()) uniquify();
|
||||
_masterCell->slaveAbutmentBox( getCell() );
|
||||
//_masterCell->_setShuntedPath( Path(getCell()->getShuntedPath(),this) );
|
||||
setTransformation( Transformation() );
|
||||
setPlacementStatus( Instance::PlacementStatus::PLACED );
|
||||
_masterCell->slaveAbutmentBox( getCell() );
|
||||
_masterCell->_setShuntedPath( Path(getCell()->getShuntedPath(),this) );
|
||||
}
|
||||
|
||||
Instance* Instance::getClone(Cell* cloneCell) const
|
||||
|
|
|
@ -122,9 +122,13 @@ SharedPath::SharedPath(Instance* headInstance, SharedPath* tailSharedPath)
|
|||
|
||||
if (_tailSharedPath && (_tailSharedPath->getOwnerCell() != _headInstance->getMasterCell()))
|
||||
throw Error( "Can't create %s, incompatible tail path between:\n"
|
||||
" - head instance %s\n"
|
||||
" - tail path %s\n"
|
||||
" - head owner %s\n"
|
||||
" - tail owner %s\n"
|
||||
, _TName("SharedPath").c_str()
|
||||
, getString(_headInstance ).c_str()
|
||||
, getString(_tailSharedPath).c_str()
|
||||
, getString(_headInstance ->getMasterCell()).c_str()
|
||||
, getString(_tailSharedPath->getOwnerCell ()).c_str()
|
||||
);
|
||||
|
|
|
@ -94,7 +94,8 @@ class Cell : public Entity {
|
|||
, Placed = 0x00020000
|
||||
, Routed = 0x00040000
|
||||
, MergedQuadTree = 0x00080000
|
||||
, Materialized = 0x00100000
|
||||
, SlavedAb = 0x00100000
|
||||
, Materialized = 0x00200000
|
||||
};
|
||||
|
||||
public:
|
||||
|
|
|
@ -210,7 +210,8 @@ namespace Hurricane {
|
|||
instance->getTransformation().getInvert().applyOn ( child->_area );
|
||||
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 );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -2499,8 +2499,8 @@ namespace Hurricane {
|
|||
throw Error ( "Can't select occurrence : invalid occurrence" );
|
||||
|
||||
if ( occurrence.getOwnerCell() != getCell() ) {
|
||||
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
||||
string s2 = Graphics::toHtml ( getString(getCell()) );
|
||||
string s1 = Graphics::toHtml ( getString(getCell()) );
|
||||
string s2 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
||||
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
|
||||
, s1.c_str(), s2.c_str() );
|
||||
}
|
||||
|
@ -2544,6 +2544,10 @@ namespace Hurricane {
|
|||
if ( criterion and (not criterion->isEnabled()) ) {
|
||||
criterion->enable();
|
||||
|
||||
//for ( Occurrence occurrence : getOccurrencesUnder(selectArea) ) {
|
||||
// cerr << "Selecting: " << occurrence << endl;
|
||||
//}
|
||||
|
||||
forEach ( Occurrence, ioccurrence, getOccurrencesUnder(selectArea) )
|
||||
select ( *ioccurrence );
|
||||
} else
|
||||
|
@ -2565,8 +2569,8 @@ namespace Hurricane {
|
|||
throw Error ( "Can't select occurrence : invalid occurrence" );
|
||||
|
||||
if ( occurrence.getOwnerCell() != getCell() ) {
|
||||
string s1 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
||||
string s2 = Graphics::toHtml ( getString(getCell()) );
|
||||
string s1 = Graphics::toHtml ( getString(getCell()) );
|
||||
string s2 = Graphics::toHtml ( getString(occurrence.getOwnerCell()) );
|
||||
throw Error ( "Can't select occurrence : incompatible occurrence %s vs. %s"
|
||||
, s1.c_str(), s2.c_str() );
|
||||
}
|
||||
|
|
|
@ -1,26 +1,17 @@
|
|||
|
||||
// -*- C++ -*-
|
||||
//
|
||||
// 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 |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./SelectCommand.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
#include <QString>
|
||||
|
|
Loading…
Reference in New Issue