Implement QuadTree pruning to speedup the display of huge designs.

When displaying big designs, the drawing was very slow because all
the graphical objects were browsed *before* deciding if they were
big enough for display. So we introduce a new mode of working of
the QuadTree to that the ones with areas *below* a certain thresold
just get skipped. Of course, the previous behavior must be preserved
(when the threhsold is zero or negative) as most of the time, we
*want* *all* the objects under an area, not only the biggest ones.
For now, in CellWidget, the visibility threshold is set to 20 pixels.
With this, we can display the Libre-SOC "test_issuer" of 100Kgates
in between 20 to 30s.

* New: In Hurricane::QuadTree_GosUnder collection & locator, add a
    "threshold" argument so that QuadTree which both area sides are
    below that lenght will be ignored (no walkthrough at all).
      Zero (or negative) threshold means  that no QuadTree will be
    pruned, we get back to the previous behavior.
* New: In Hurricane::Slice::getComponentsUnder(), add the threshold
    argument (with a default to 0).
* New: In Hurricane::Cell::getInstancesUnder(), add the threshold
    argument (with a default to 0).
* New: In Hurricane::Query, added support for the threshold parameter.
    In doQuery(), instances that have *both* side under the threshold
    are pruned (slightly different from QuadTree areas).
* New: In Hurricane::CellWidget::_redraw(), set the visibility
    threshold to 20 pixels (arbitrary, must be parametrized).
* New: In Hurricane::Cell, added destroyPhysical() method.
    Remove *all* physical components and the DeepNets (so make
    a virtual *unflatten*) in the correct dependency order.
    In particular, RoutingPads, that relies on Occurrence over
    physical components must be destroyeds *before* the entity
    they are based on is destroyed.
This commit is contained in:
Jean-Paul Chaput 2020-08-27 19:14:44 +02:00
parent 083e58d953
commit 0b5ce309eb
13 changed files with 218 additions and 116 deletions

View File

@ -955,6 +955,50 @@ void Cell::createRoutingPadRings(uint64_t flags)
}
void Cell::destroyPhysical()
// *************************
{
cdebug_log(18,0) << "Cell::destroyPhysical()" << endl;
UpdateSession::open();
for ( Net* net : getNets() ) {
vector<Component*> removeds;
for ( Component* component : net->getComponents() ) {
if (dynamic_cast<RoutingPad*>(component)) removeds.push_back( component );
}
for ( Component* component : removeds ) component->destroy();
}
vector<DeepNet*> deepNets;
for ( Net* net : getNets() ) {
DeepNet* deepNet = dynamic_cast<DeepNet*>( net );
if (deepNet) deepNets.push_back( deepNet );
}
for ( DeepNet* deepNet : deepNets ) {
cerr << "Removing DeepNet:" << deepNet << endl;
deepNet->destroy();
}
for ( Net* net : getNets() ) {
vector<Component*> removeds;
for ( Component* component : net->getComponents() ) {
if (dynamic_cast<Plug *>(component)) continue;
if (dynamic_cast<Contact*>(component)) removeds.push_back( component );
}
for ( Component* component : removeds ) component->destroy();
}
for ( Net* net : getNets() ) {
vector<Component*> removeds;
for ( Component* component : net->getComponents() ) {
if (dynamic_cast<Plug*>(component)) continue;
removeds.push_back( component );
}
for ( Component* component : removeds ) component->destroy();
}
UpdateSession::close();
}
Cell* Cell::getCloneMaster() const
// *******************************
{

View File

@ -1722,11 +1722,13 @@ class Cell_SubCells : public Collection<Cell*> {
// Cell further definition
// ****************************************************************************************************
Instances Cell::getInstancesUnder(const Box& area) const
// *****************************************************
Instances Cell::getInstancesUnder(const Box& area, DbU::Unit threshold) const
// **************************************************************************
{
// return _quadTree.getGosUnder(area).getSubSet<Instance*>();
return SubTypeCollection<Go*, Instance*>(_quadTree->getGosUnder(area));
// return _quadTree.getGosUnder(area).getSubSet<Instance*>();
//cerr << "Cell::getInstancesUnder(): t:" << DbU::getValueString(threshold)
// << " " << this << endl;
return SubTypeCollection<Go*, Instance*>(_quadTree->getGosUnder(area,threshold));
}
Instances Cell::getSlaveInstances() const

View File

@ -122,12 +122,13 @@ class QuadTree_GosUnder : public Collection<Go*> {
private: const QuadTree* _quadTree;
private: Box _area;
private: DbU::Unit _threshold;
private: QuadTree* _currentQuadTree;
private: GoLocator _goLocator;
//private: static size_t _allocateds;
public: Locator();
public: Locator(const QuadTree* quadTree, const Box& area);
public: Locator(const QuadTree* quadTree, const Box& area, DbU::Unit threshold);
public: Locator(const Locator& locator);
//public: ~Locator() { _allocateds--; }
@ -150,12 +151,13 @@ class QuadTree_GosUnder : public Collection<Go*> {
private: const QuadTree* _quadTree;
private: Box _area;
private: DbU::Unit _threshold;
// Constructors
// ************
public: QuadTree_GosUnder();
public: QuadTree_GosUnder(const QuadTree* quadTree, const Box& area);
public: QuadTree_GosUnder(const QuadTree* quadTree, const Box& area, DbU::Unit threshold);
public: QuadTree_GosUnder(const QuadTree_GosUnder& gos);
// Operators
@ -251,10 +253,10 @@ Gos QuadTree::getGos() const
return QuadTree_Gos(this);
}
Gos QuadTree::getGosUnder(const Box& area) const
// *********************************************
Gos QuadTree::getGosUnder(const Box& area, DbU::Unit threshold) const
// ******************************************************************
{
return QuadTree_GosUnder(this, area);
return QuadTree_GosUnder(this, area, threshold);
}
void QuadTree::insert(Go* go)
@ -687,25 +689,28 @@ string QuadTree_Gos::Locator::_getString() const
QuadTree_GosUnder::QuadTree_GosUnder()
// ***********************************
: Inherit(),
: Inherit(),
_quadTree(NULL),
_area()
_area(),
_threshold(0)
{
}
QuadTree_GosUnder::QuadTree_GosUnder(const QuadTree* quadTree, const Box& area)
// ****************************************************************************
: Inherit(),
QuadTree_GosUnder::QuadTree_GosUnder(const QuadTree* quadTree, const Box& area, DbU::Unit threshold)
// *************************************************************************************************
: Inherit(),
_quadTree(quadTree),
_area(area)
_area(area),
_threshold(threshold)
{
}
QuadTree_GosUnder::QuadTree_GosUnder(const QuadTree_GosUnder& gos)
// ***************************************************************
: Inherit(),
: Inherit(),
_quadTree(gos._quadTree),
_area(gos._area)
_area(gos._area),
_threshold(gos._threshold)
{
}
@ -714,6 +719,7 @@ QuadTree_GosUnder& QuadTree_GosUnder::operator=(const QuadTree_GosUnder& gos)
{
_quadTree = gos._quadTree;
_area = gos._area;
_threshold = gos._threshold;
return *this;
}
@ -726,7 +732,7 @@ Collection<Go*>* QuadTree_GosUnder::getClone() const
Locator<Go*>* QuadTree_GosUnder::getLocator() const
// ************************************************
{
return new Locator(_quadTree, _area);
return new Locator(_quadTree, _area, _threshold);
}
string QuadTree_GosUnder::_getString() const
@ -736,6 +742,7 @@ string QuadTree_GosUnder::_getString() const
if (_quadTree) {
s += " " + getString(_quadTree);
s += " " + getString(_area);
s += " t:" + DbU::getValueString(_threshold);
}
s += ">";
return s;
@ -752,23 +759,38 @@ QuadTree_GosUnder::Locator::Locator()
: Inherit(),
_quadTree(NULL),
_area(),
_threshold(0),
_currentQuadTree(NULL),
_goLocator()
{
//_allocateds++;
}
QuadTree_GosUnder::Locator::Locator(const QuadTree* quadTree, const Box& area)
// ***************************************************************************
QuadTree_GosUnder::Locator::Locator(const QuadTree* quadTree, const Box& area, DbU::Unit threshold)
// ************************************************************************************************
: Inherit(),
_quadTree(quadTree),
_area(area),
_threshold(threshold),
_currentQuadTree(NULL),
_goLocator()
{
//_allocateds++;
if (_quadTree && !_area.isEmpty()) {
if (_quadTree and not _area.isEmpty()) {
_currentQuadTree = _quadTree->_getFirstQuadTree(_area);
while ( true ) {
if (not _currentQuadTree) break;
if ( (_threshold <= 0)
or ( (_currentQuadTree->getBoundingBox().getWidth () > _threshold)
and (_currentQuadTree->getBoundingBox().getHeight() > _threshold)) )
break;
// cerr << "Pruning QuadTree:" << _currentQuadTree
// << " _threshold:" << DbU::getValueString(_threshold)
// << "(" << _threshold << ")" << endl;
_currentQuadTree = _currentQuadTree->_getNextQuadTree(_area);
}
//_currentQuadTree = _quadTree->_getFirstQuadTree(_area);
if (_currentQuadTree) {
_goLocator = _currentQuadTree->_getGoSet().getElements().getLocator();
if (!getElement()->getBoundingBox().intersect(_area)) progress();
@ -781,6 +803,7 @@ QuadTree_GosUnder::Locator::Locator(const Locator& locator)
: Inherit(),
_quadTree(locator._quadTree),
_area(locator._area),
_threshold(locator._threshold),
_currentQuadTree(locator._currentQuadTree),
_goLocator(locator._goLocator)
{
@ -792,6 +815,7 @@ QuadTree_GosUnder::Locator& QuadTree_GosUnder::Locator::operator=(const Locator&
{
_quadTree = locator._quadTree;
_area = locator._area;
_threshold = locator._threshold;
_currentQuadTree = locator._currentQuadTree;
_goLocator = locator._goLocator;
return *this;
@ -818,16 +842,27 @@ bool QuadTree_GosUnder::Locator::isValid() const
void QuadTree_GosUnder::Locator::progress()
// ****************************************
{
if (isValid()) {
do {
_goLocator.progress();
if (!_goLocator.isValid()) {
_currentQuadTree = _currentQuadTree->_getNextQuadTree(_area);
if (_currentQuadTree)
_goLocator = _currentQuadTree->_getGoSet().getElements().getLocator();
}
} while (isValid() && !getElement()->getBoundingBox().intersect(_area));
}
if (isValid()) {
do {
_goLocator.progress();
if (not _goLocator.isValid()) {
while ( true ) {
_currentQuadTree = _currentQuadTree->_getNextQuadTree(_area);
if (not _currentQuadTree) break;
if ( (_threshold <= 0)
or ( (_currentQuadTree->getBoundingBox().getWidth () > _threshold)
and (_currentQuadTree->getBoundingBox().getHeight() > _threshold)) )
break;
// cerr << "Pruning QuadTree:" << _currentQuadTree
// << " _threshold:" << DbU::getValueString(_threshold)
// << "(" << _threshold << ")" << endl;
}
if (_currentQuadTree)
_goLocator = _currentQuadTree->_getGoSet().getElements().getLocator();
}
} while (isValid() and not getElement()->getBoundingBox().intersect(_area));
}
}
string QuadTree_GosUnder::Locator::_getString() const

View File

@ -47,6 +47,7 @@ namespace Hurricane {
//, _tab (" ")
, _topCell (NULL)
, _topArea ()
, _threshold (0)
, _topTransformation ()
, _startLevel (0)
, _stopLevel (std::numeric_limits<unsigned int>::max())
@ -84,6 +85,7 @@ namespace Hurricane {
, const BasicLayer* basicLayer
, ExtensionSlice::Mask mask
, Mask filter
, DbU::Unit threshold
)
{
_basicLayer = basicLayer;
@ -93,62 +95,72 @@ namespace Hurricane {
_stack.setTopCell ( cell );
_stack.setTopArea ( area );
_stack.setTopTransformation ( transformation );
_stack.setThreshold ( threshold );
}
void Query::doQuery ()
{
if ( _stack.getTopArea().isEmpty() or not _stack.getTopCell() ) return;
if (_stack.getTopArea().isEmpty() or not _stack.getTopCell()) return;
//cerr << "Query::doQuery() - " << _stack.getTopCell() << " " << _stack.getTopArea() << " " << _basicLayer << endl;
// cerr << "Query::doQuery() - " << _stack.getTopCell()
// << " " << _stack.getTopArea()
// << " " << _basicLayer
// << " threshold:" << DbU::getValueString(_stack.getThreshold())
// << endl;
_stack.init ();
_stack.init();
while ( !_stack.empty() ) {
while ( not _stack.empty() ) {
// Process the Components of the current instance.
if ( hasGoCallback() and _basicLayer and (_filter.isSet(DoComponents)) ) {
//if ( getInstance() )
// cerr << getTab() << getInstance() << " " << getTransformation() << endl;
//else
// cerr << " TopCell: " << getMasterCell() << " " << getTransformation() << endl;
if ( not getMasterCell()->isTerminal() or (_filter.isSet(DoTerminalCells)) ) {
forEach ( Slice*, islice, getMasterCell()->getSlices() ) {
if ( not (*islice)->getLayer()->contains(getBasicLayer()) ) continue;
if ( not (*islice)->getBoundingBox().intersect(getArea()) ) continue;
forEach ( Go*, igo, (*islice)->getGosUnder(_stack.getArea()) )
goCallback ( *igo );
}
}
}
if ( (not getMasterCell()->isTerminal() or (_filter.isSet(DoTerminalCells)))
and _filter.isSet(DoMarkers) ) {
forEach ( Marker*, marker, getMasterCell()->getMarkersUnder(_stack.getArea()) )
markerCallback ( *marker );
}
if ( not getMasterCell()->isTerminal() and (_filter.isSet(DoRubbers)) ) {
forEach ( Rubber*, rubber, getMasterCell()->getRubbersUnder(_stack.getArea()) )
rubberCallback ( *rubber );
}
if ( hasExtensionGoCallback() and (_filter.isSet(DoExtensionGos)) ) {
if ( (not getMasterCell()->isTerminal()) or (_filter.isSet(DoTerminalCells)) ) {
forEach ( ExtensionSlice*, islice, getMasterCell()->getExtensionSlices() ) {
if ( not ( (*islice)->getMask() & _extensionMask ) ) continue;
if ( not (*islice)->getBoundingBox().intersect(getArea()) ) continue;
for ( Go* go : (*islice)->getGosUnder(_stack.getArea()) ) {
extensionGoCallback ( go );
Box ab = getMasterCell()->getAbutmentBox();
if ( (_stack.getThreshold() <= 0)
or (ab.getWidth () > _stack.getThreshold())
or (ab.getHeight() > _stack.getThreshold()) ) {
if (hasGoCallback() and _basicLayer and (_filter.isSet(DoComponents))) {
//if ( getInstance() )
// cerr << getTab() << getInstance() << " " << getTransformation() << endl;
//else
// cerr << " TopCell: " << getMasterCell() << " " << getTransformation() << endl;
if (not getMasterCell()->isTerminal() or (_filter.isSet(DoTerminalCells))) {
for ( Slice* slice : getMasterCell()->getSlices() ) {
if (not slice->getLayer()->contains(getBasicLayer())) continue;
if (not slice->getBoundingBox().intersect(getArea())) continue;
for ( Go* go : slice->getGosUnder(_stack.getArea(),_stack.getThreshold()) )
goCallback( go );
}
}
}
if ( (not getMasterCell()->isTerminal() or (_filter.isSet(DoTerminalCells)))
and _filter.isSet(DoMarkers) ) {
for ( Marker* marker : getMasterCell()->getMarkersUnder(_stack.getArea()) )
markerCallback( marker );
}
if ( not getMasterCell()->isTerminal() and (_filter.isSet(DoRubbers)) ) {
for ( Rubber* rubber : getMasterCell()->getRubbersUnder(_stack.getArea()) )
rubberCallback( rubber );
}
if ( hasExtensionGoCallback() and (_filter.isSet(DoExtensionGos)) ) {
if ( (not getMasterCell()->isTerminal()) or (_filter.isSet(DoTerminalCells)) ) {
for ( ExtensionSlice* slice : getMasterCell()->getExtensionSlices() ) {
if ( not ( slice->getMask() & _extensionMask ) ) continue;
if ( not slice->getBoundingBox().intersect(getArea()) ) continue;
for ( Go* go : slice->getGosUnder(_stack.getArea(),_stack.getThreshold()) ) {
extensionGoCallback( go );
}
}
}
}
}
if ( (_filter.isSet(DoMasterCells)) and hasMasterCellCallback() )
masterCellCallback ();
if ( (_filter.isSet(DoMasterCells)) and hasMasterCellCallback() )
masterCellCallback ();
}
_stack.progress ();
} // End of while.

View File

@ -64,11 +64,11 @@ Components Slice::getComponents() const
return SubTypeCollection<Go*, Component*>(_quadTree.getGos());
}
Components Slice::getComponentsUnder(const Box& area) const
// ********************************************************
Components Slice::getComponentsUnder(const Box& area, DbU::Unit threshold) const
// *****************************************************************************
{
// return _quadTree.getGosUnder(area).getSubSet<Component*>();
return SubTypeCollection<Go*, Component*>(_quadTree.getGosUnder(area));
return SubTypeCollection<Go*, Component*>(_quadTree.getGosUnder(area,threshold));
}
Markers Slice::getMarkers() const

View File

@ -420,7 +420,7 @@ class Cell : public Entity {
public: Instances getFixedInstances() const;
public: Instances getUnplacedInstances() const;
public: Instances getNotUnplacedInstances() const;
public: Instances getInstancesUnder(const Box& area) const;
public: Instances getInstancesUnder(const Box& area, DbU::Unit threshold=0) const;
public: Instances getPlacedInstancesUnder(const Box& area) const;
public: Instances getFixedInstancesUnder(const Box& area) const;
public: Instances getUnplacedInstancesUnder(const Box& area) const;
@ -518,8 +518,8 @@ class Cell : public Entity {
public: void uniquify(unsigned int depth=std::numeric_limits<unsigned int>::max());
public: void addObserver(BaseObserver*);
public: void removeObserver(BaseObserver*);
public: void notify(unsigned flags);
public: void notify(unsigned flags);
public: void destroyPhysical();
};

View File

@ -30,9 +30,7 @@
// +-----------------------------------------------------------------+
#ifndef HURRICANE_EXTENSION_SLICE_H
#define HURRICANE_EXTENSION_SLICE_H
#pragma once
#include "hurricane/Mask.h"
#include "hurricane/Name.h"
#include "hurricane/ExtensionSlices.h"
@ -60,7 +58,7 @@ namespace Hurricane {
inline Mask getMask () const;
inline const Box& getBoundingBox () const;
inline Gos getGos () const;
inline Gos getGosUnder ( const Box& area ) const;
inline Gos getGosUnder ( const Box& area, DbU::Unit threshold=0 ) const;
inline QuadTree* _getQuadTree ();
// Hurricane Managment.
string _getTypeName () const;
@ -93,12 +91,10 @@ namespace Hurricane {
inline ExtensionSlice::Mask ExtensionSlice::getMask () const { return _mask; }
inline const Box& ExtensionSlice::getBoundingBox () const { return _quadTree.getBoundingBox(); }
inline Gos ExtensionSlice::getGos () const { return _quadTree.getGos(); }
inline Gos ExtensionSlice::getGosUnder ( const Box& area ) const {return _quadTree.getGosUnder(area); }
inline Gos ExtensionSlice::getGosUnder ( const Box& area, DbU::Unit threshold ) const {return _quadTree.getGosUnder(area,threshold); }
inline QuadTree* ExtensionSlice::_getQuadTree () { return &_quadTree; }
} // End of Hurricane namespace.
INSPECTOR_P_SUPPORT(Hurricane::ExtensionSlice);
# endif // HURRICANE_EXTENSION_SLICE_H

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>.
// ****************************************************************************************************
#ifndef HURRICANE_QUAD_TREE
#define HURRICANE_QUAD_TREE
#pragma once
#include "hurricane/Box.h"
#include "hurricane/Gos.h"
#include "hurricane/IntrusiveSet.h"
@ -88,7 +86,7 @@ class QuadTree {
//public: static size_t getLocatorAllocateds ();
public: const Box& getBoundingBox() const;
public: Gos getGos() const;
public: Gos getGosUnder(const Box& area) const;
public: Gos getGosUnder(const Box& area, DbU::Unit threshold=0) const;
// Predicates
// **********
@ -130,9 +128,6 @@ INSPECTOR_P_SUPPORT(Hurricane::QuadTree);
INSPECTOR_P_SUPPORT(Hurricane::QuadTree::GoSet);
#endif // HURRICANE_QUAD_TREE
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// ****************************************************************************************************

View File

@ -29,9 +29,7 @@
// +-----------------------------------------------------------------+
#ifndef HURRICANE_QUERY_H
#define HURRICANE_QUERY_H
#pragma once
#include <vector>
#include "hurricane/Commons.h"
#include "hurricane/Box.h"
@ -118,6 +116,7 @@ namespace Hurricane {
inline Cell* getMasterCell ();
inline Instance* getInstance ();
inline const Box& getArea () const;
inline DbU::Unit getThreshold () const;
inline const Transformation& getTransformation () const;
inline const Path& getPath () const;
//inline const Tabulation& getTab () const;
@ -125,6 +124,7 @@ namespace Hurricane {
inline void setTopCell ( Cell* cell );
inline void setTopArea ( const Box& area );
inline void setTopTransformation ( const Transformation& transformation );
inline void setThreshold ( DbU::Unit threshold );
inline void setStartLevel ( unsigned int level );
inline void setStopLevel ( unsigned int level );
inline void init ();
@ -140,6 +140,7 @@ namespace Hurricane {
// Tabulation _tab;
Cell* _topCell;
Box _topArea;
DbU::Unit _threshold;
Transformation _topTransformation;
unsigned int _startLevel;
unsigned int _stopLevel;
@ -157,6 +158,7 @@ namespace Hurricane {
inline Cell* QueryStack::getTopCell () { return _topCell; }
inline const Box& QueryStack::getTopArea () const { return _topArea; }
inline const Transformation& QueryStack::getTopTransformation () const { return _topTransformation; }
inline DbU::Unit QueryStack::getThreshold () const { return _threshold; }
inline unsigned int QueryStack::getStartLevel () const { return _startLevel; }
inline unsigned int QueryStack::getStopLevel () const { return _stopLevel; }
inline const Box& QueryStack::getArea () const { return back()->_area; }
@ -183,6 +185,7 @@ namespace Hurricane {
inline void QueryStack::setTopCell ( Cell* cell ) { _topCell = cell; }
inline void QueryStack::setTopArea ( const Box& area ) { _topArea = area; }
inline void QueryStack::setTopTransformation ( const Transformation& transformation ) { _topTransformation = transformation; }
inline void QueryStack::setThreshold ( DbU::Unit threshold ) { _threshold = threshold; }
inline void QueryStack::setStartLevel ( unsigned int level ) { _startLevel = level; }
inline void QueryStack::setStopLevel ( unsigned int level ) { _stopLevel = level; }
@ -204,6 +207,8 @@ namespace Hurricane {
QueryState* parent = *(rbegin()+1);
Instance* instance = child->_locator->getElement();
//cerr << "Processing " << instance << endl;
child->_area = parent->_area;
child->_transformation = instance->getTransformation ();
@ -219,7 +224,9 @@ namespace Hurricane {
{
if ( size() > _stopLevel ) return false;
Locator<Instance*>* locator = getMasterCell()->getInstancesUnder(getArea()).getLocator();
//cerr << "QueryStack::levelDown(): t:" << DbU::getValueString(getThreshold()) << endl;
Locator<Instance*>* locator =
getMasterCell()->getInstancesUnder(getArea(),getThreshold()).getLocator();
if ( locator->isValid() ) {
push_back ( new QueryState ( locator ) );
@ -231,6 +238,7 @@ namespace Hurricane {
} else
delete locator;
//cerr << " Aborting level down" << endl;
return false;
}
@ -314,6 +322,7 @@ namespace Hurricane {
inline size_t getDepth () const;
inline const Transformation& getTransformation () const;
inline const Box& getArea () const;
inline DbU::Unit getThreshold () const;
inline const BasicLayer* getBasicLayer () const;
inline Cell* getMasterCell ();
inline Instance* getInstance ();
@ -336,9 +345,11 @@ namespace Hurricane {
, const BasicLayer* basicLayer
, ExtensionSlice::Mask extensionMask
, Mask filter
, DbU::Unit threshold=0
);
inline void setCell ( Cell* cell );
inline void setArea ( const Box& area );
inline void setThreshold ( DbU::Unit threshold );
inline void setTransformation ( const Transformation& transformation );
virtual void setBasicLayer ( const BasicLayer* basicLayer );
inline void setExtensionMask ( ExtensionSlice::Mask mode );
@ -360,6 +371,7 @@ namespace Hurricane {
inline void Query::setCell ( Cell* cell ) { _stack.setTopCell(cell); }
inline void Query::setArea ( const Box& area ) { _stack.setTopArea(area); }
inline void Query::setThreshold ( DbU::Unit threshold ) { _stack.setThreshold(threshold); }
inline void Query::setTransformation ( const Transformation& transformation ) { _stack.setTopTransformation(transformation); }
inline void Query::setFilter ( Mask filter ) { _filter = filter; }
inline void Query::setExtensionMask ( ExtensionSlice::Mask mask ) { _extensionMask = mask; }
@ -379,5 +391,3 @@ namespace Hurricane {
} // Hurricane namespace.
#endif // HURRICANE_QUERY_H

View File

@ -17,9 +17,7 @@
// not, see <http://www.gnu.org/licenses/>.
// ****************************************************************************************************
#ifndef HURRICANE_SLICE
#define HURRICANE_SLICE
#pragma once
#include "hurricane/QuadTree.h"
#include "hurricane/Components.h"
#include "hurricane/Markers.h"
@ -72,9 +70,9 @@ class Slice {
public: const Layer* getLayer() const {return _layer;};
public: const Box& getBoundingBox() const {return _quadTree.getBoundingBox();};
public: Gos getGos() const {return _quadTree.getGos();};
public: Gos getGosUnder(const Box& area) const {return _quadTree.getGosUnder(area);};
public: Gos getGosUnder(const Box& area, DbU::Unit threshold=0) const {return _quadTree.getGosUnder(area,threshold);};
public: Components getComponents() const;
public: Components getComponentsUnder(const Box& area) const;
public: Components getComponentsUnder(const Box& area, DbU::Unit threshold=0) const;
public: Markers getMarkers() const;
public: Markers getMarkersUnder(const Box& area) const;
@ -107,9 +105,6 @@ class Slice {
INSPECTOR_P_SUPPORT(Hurricane::Slice);
#endif // HURRICANE_SLICE
// ****************************************************************************************************
// Copyright (c) BULL S.A. 2000-2018, All Rights Reserved
// ****************************************************************************************************

View File

@ -710,6 +710,20 @@ extern "C" {
}
// ---------------------------------------------------------------
// Attribute Method : "PyCell_destroyPhysical ()"
static PyObject* PyCell_destroyPhysical ( PyCell *self )
{
cdebug_log(20,0) << "PyCell_destroyPhysical ()" << endl;
HTRY
METHOD_HEAD( "Cell.destroyPhysical()" )
cell->destroyPhysical();
HCATCH
Py_RETURN_NONE;
}
// Standart Predicates (Attributes).
DirectGetBoolAttribute(PyCell_isTerminal , isTerminal ,PyCell,Cell)
DirectGetBoolAttribute(PyCell_isTerminalNetlist, isTerminalNetlist,PyCell,Cell)
@ -766,8 +780,8 @@ extern "C" {
, { "setRouted" , (PyCFunction)PyCell_setRouted , METH_VARARGS, "Sets the cell routed status." }
, { "uniquify" , (PyCFunction)PyCell_uniquify , METH_VARARGS, "Uniquify the Cell and it's instances up to <depth>." }
, { "getClone" , (PyCFunction)PyCell_getClone , METH_NOARGS , "Return a copy of the Cell (placement only)." }
, { "destroy" , (PyCFunction)PyCell_destroy , METH_NOARGS
, "Destroy associated hurricane object The python object remains." }
, { "destroyPhysical" , (PyCFunction)PyCell_destroyPhysical , METH_NOARGS , "Destroy all physical components, including DeepNets (vflatten)." }
, { "destroy" , (PyCFunction)PyCell_destroy , METH_NOARGS , "Destroy associated hurricane object The python object remains." }
, {NULL, NULL, 0, NULL} /* sentinel */
};

View File

@ -1348,12 +1348,16 @@ namespace Hurricane {
if (getCell()) {
Box redrawBox = screenToDbuBox( redrawArea );
//cerr << "redrawBox:" << redrawBox << endl;
//cerr << "Threshold:" << DbU::getValueString(screenToDbuLength(20)) << endl;
_drawingQuery.resetGoCount ();
_drawingQuery.resetExtensionGoCount();
_drawingQuery.resetInstanceCount ();
_drawingQuery.setExtensionMask ( 0 );
_drawingQuery.setArea ( redrawBox );
_drawingQuery.setTransformation ( Transformation() );
_drawingQuery.setThreshold ( screenToDbuLength(20) );
for ( BasicLayer* layer : _technology->getBasicLayers() ) {
_drawingPlanes.setPen ( Graphics::getPen (layer->getName(),getDarkening()) );

View File

@ -14,9 +14,7 @@
// +-----------------------------------------------------------------+
#ifndef HURRICANE_CELL_WIDGET_H
#define HURRICANE_CELL_WIDGET_H
#pragma once
#include <math.h>
#include <vector>
#include <functional>
@ -1470,6 +1468,3 @@ namespace Hurricane {
GETSTRING_POINTER_SUPPORT(Hurricane::CellWidget);
IOSTREAM_POINTER_SUPPORT(Hurricane::CellWidget);
#endif // HURRICANE_CELL_WIDGET