diff --git a/hurricane/src/hurricane/Cell.cpp b/hurricane/src/hurricane/Cell.cpp index 59704c1b..ed9b4507 100644 --- a/hurricane/src/hurricane/Cell.cpp +++ b/hurricane/src/hurricane/Cell.cpp @@ -39,7 +39,6 @@ namespace Hurricane { { ExtensionSliceMap::iterator islice = _extensionSlices.find ( slice->getName() ); if ( islice != _extensionSlices.end() ) { - islice->second->_destroy (); _extensionSlices.erase ( islice ); } } diff --git a/hurricane/src/hurricane/Entity.cpp b/hurricane/src/hurricane/Entity.cpp index e06872a1..06c69803 100644 --- a/hurricane/src/hurricane/Entity.cpp +++ b/hurricane/src/hurricane/Entity.cpp @@ -24,11 +24,11 @@ Entity::Entity() { } -void Entity::_preDestroy() -// ********************** -{ -// trace << "entering Entity::_preDestroy: " << this << endl; -// trace_in(); + + void Entity::_preDestroy() + { + //ltrace(10) << "Entity::_preDestroy() - " << (void*)this << endl; + //ltracein(10); vector slaveEntities; SlaveEntityMap::iterator it; @@ -46,28 +46,28 @@ void Entity::_preDestroy() stack sharedPathStack; for_each_instance(instance, getCell()->getSlaveInstances()) { - SharedPath* sharedPath = instance->_getSharedPath(NULL); - if (sharedPath) sharedPathStack.push(sharedPath); - end_for; + SharedPath* sharedPath = instance->_getSharedPath(NULL); + if (sharedPath) sharedPathStack.push(sharedPath); + end_for; } while (!sharedPathStack.empty()) { - SharedPath* sharedPath = sharedPathStack.top(); - sharedPathStack.pop(); - Quark* quark = _getQuark(sharedPath); - if (quark) quark->destroy(); - Cell* cell = sharedPath->getOwnerCell(); - for_each_instance(instance, cell->getSlaveInstances()) { - SharedPath* sharedPath2 = instance->_getSharedPath(sharedPath); - if (sharedPath2) sharedPathStack.push(sharedPath2); - end_for; - } + SharedPath* sharedPath = sharedPathStack.top(); + sharedPathStack.pop(); + Quark* quark = _getQuark(sharedPath); + if (quark) quark->destroy(); + Cell* cell = sharedPath->getOwnerCell(); + for_each_instance(instance, cell->getSlaveInstances()) { + SharedPath* sharedPath2 = instance->_getSharedPath(sharedPath); + if (sharedPath2) sharedPathStack.push(sharedPath2); + end_for; + } } Inherit::_preDestroy(); -// trace << "exiting Entity::_preDestroy:" << endl; -// trace_out(); -} + //ltrace(10) << "Entity::_preDestroy() - exit" << endl; + //ltraceout(10); + } string Entity::_getString() const // ****************************** diff --git a/hurricane/src/hurricane/ExtensionGo.cpp b/hurricane/src/hurricane/ExtensionGo.cpp index cb3c77d0..200480d1 100644 --- a/hurricane/src/hurricane/ExtensionGo.cpp +++ b/hurricane/src/hurricane/ExtensionGo.cpp @@ -42,6 +42,13 @@ namespace Hurricane { { } + void ExtensionGo::_preDestroy () + { + ltrace(10) << "ExtensionGo::_preDestroy() - " << (void*)this << endl; + Go::_preDestroy (); + } + + void ExtensionGo::materialize () { if ( !isMaterialized() ) { @@ -60,6 +67,9 @@ namespace Hurricane { void ExtensionGo::unmaterialize () { + //ltrace(9) << "ExtensionGo::unmaterialize() - " << (void*)this << endl; + //ltracein(9); + if ( isMaterialized() ) { ExtensionSlice* slice = _cell->getExtensionSlice ( getName() ); if ( slice ) { @@ -68,6 +78,9 @@ namespace Hurricane { if ( slice->isEmpty() ) slice->_destroy (); } } + + //ltrace(9) << "ExtensionGo::unmaterialize() - exit" << endl; + //ltraceout(9); } diff --git a/hurricane/src/hurricane/ExtensionSlice.cpp b/hurricane/src/hurricane/ExtensionSlice.cpp index e21a4e9a..8ea95296 100644 --- a/hurricane/src/hurricane/ExtensionSlice.cpp +++ b/hurricane/src/hurricane/ExtensionSlice.cpp @@ -50,6 +50,7 @@ namespace Hurricane { ExtensionSlice::~ExtensionSlice () { + ltrace(10) << "ExtensionSlice::~ExtensionSlice() - " << (void*)this << endl; _cell->_removeSlice ( this ); } diff --git a/hurricane/src/hurricane/Go.cpp b/hurricane/src/hurricane/Go.cpp index 87f454ac..5d0f5c60 100644 --- a/hurricane/src/hurricane/Go.cpp +++ b/hurricane/src/hurricane/Go.cpp @@ -51,18 +51,19 @@ void Go::_postCreate() if (!autoMaterializationIsDisabled()) materialize(); // materialized after entire post creation } + void Go::_preDestroy() -// ****************** { -// trace << "entering Go::_preDestroy: " << this << endl; -// trace_in(); +//ltrace(10) << "Go::_preDestroy() - " << (void*)this << endl; +//ltracein(10); - unmaterialize(); // unmaterialized before starting pre destruction + unmaterialize(); // unmaterialized before starting pre destruction +//ltrace(10) << "Unmaterialize successful" << endl; - Inherit::_preDestroy(); + Inherit::_preDestroy(); -// trace << "exiting Go::_preDestroy:" << endl; -// trace_out(); +//ltrace(10) << "Go::_preDestroy() - exit" << endl; +//ltraceout(10); } string Go::_getString() const diff --git a/hurricane/src/hurricane/hurricane/ExtensionGo.h b/hurricane/src/hurricane/hurricane/ExtensionGo.h index 01c57cc2..95c20a03 100644 --- a/hurricane/src/hurricane/hurricane/ExtensionGo.h +++ b/hurricane/src/hurricane/hurricane/ExtensionGo.h @@ -52,8 +52,9 @@ namespace Hurricane { Cell* _cell; protected: - // Internal: Constructor. + // Internal: Constructor & destructors. ExtensionGo ( Cell* ); + virtual void _preDestroy (); }; diff --git a/hurricane/src/hurricane/hurricane/Technology.h b/hurricane/src/hurricane/hurricane/Technology.h index 04e37105..916bc74a 100644 --- a/hurricane/src/hurricane/hurricane/Technology.h +++ b/hurricane/src/hurricane/hurricane/Technology.h @@ -73,6 +73,7 @@ namespace Hurricane { // Constructor. static Technology* create ( DataBase* , const Name& ); // Accessors. + inline bool isMetal ( const Layer* ) const; inline DataBase* getDataBase () const; inline const Name& getName () const; inline Layer* getLayer ( const Name& ) const; @@ -125,6 +126,7 @@ namespace Hurricane { // Inline Functions. + inline bool Technology::isMetal ( const Layer* layer ) const { return _metalMask.contains(layer->getMask()); } inline DataBase* Technology::getDataBase () const { return _dataBase; } inline const Name& Technology::getName () const { return _name; } inline Layer* Technology::getLayer ( const Name& name ) const { return _layerMap.getElement(name); } diff --git a/hurricane/src/hviewer/CellWidget.cpp b/hurricane/src/hviewer/CellWidget.cpp index 7518c6a7..61ee6e03 100644 --- a/hurricane/src/hviewer/CellWidget.cpp +++ b/hurricane/src/hviewer/CellWidget.cpp @@ -23,30 +23,31 @@ // x-----------------------------------------------------------------x -# include -# include -# include -# include -# include -# include -# include +#include +#include +#include +#include +#include +#include +#include -# include "hurricane/DataBase.h" -# include "hurricane/Technology.h" -# include "hurricane/BasicLayer.h" -# include "hurricane/Cell.h" -# include "hurricane/Instance.h" -# include "hurricane/Slice.h" -# include "hurricane/Segment.h" -# include "hurricane/Contact.h" -# include "hurricane/Pad.h" +#include "hurricane/DataBase.h" +#include "hurricane/Technology.h" +#include "hurricane/BasicLayer.h" +#include "hurricane/Cell.h" +#include "hurricane/Instance.h" +#include "hurricane/Slice.h" +#include "hurricane/Segment.h" +#include "hurricane/Contact.h" +#include "hurricane/Pad.h" +#include "hurricane/RoutingPad.h" -# include "hurricane/viewer/Graphics.h" -# include "hurricane/viewer/HPaletteEntry.h" -# include "hurricane/viewer/HPalette.h" -// # include "MapView.h" -# include "hurricane/viewer/Command.h" -# include "hurricane/viewer/CellWidget.h" +#include "hurricane/viewer/Graphics.h" +#include "hurricane/viewer/HPaletteEntry.h" +#include "hurricane/viewer/HPalette.h" +// #include "MapView.h" +#include "hurricane/viewer/Command.h" +#include "hurricane/viewer/CellWidget.h" @@ -331,6 +332,12 @@ namespace Hurricane { _cellWidget->drawBox ( transformation.getBox(pad->getBoundingBox(basicLayer)) ); return; } + + const RoutingPad* rp = dynamic_cast(go); + if ( rp ) { + _cellWidget->drawBox ( transformation.getBox(rp->getBoundingBox(basicLayer)) ); + return; + } }