* ./crlcore:

- Change: In ToolEngine, adds a static method "destroyAll()" that must be
        called *before* the Hurricane database destruction. This is to avoid
        a mis-oredering in destruction.
          ToolEngines are stored in a property, property are part of the DBo
        base object so are destroyed *after* the Cell derived object has been.
        Thus ToolEngine are deleted *after* the Cell components and if they
        still refers to it, we are doomed.
     - Change: In display.xml, color support for displaying references.
This commit is contained in:
Jean-Paul Chaput 2010-04-12 11:21:41 +00:00
parent bc295bda31
commit fe7acbc389
3 changed files with 90 additions and 54 deletions

View File

@ -25,21 +25,22 @@
11110111
-->
<group name="Viewer">
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="50,50,50" border="1"/>
<drawingstyle name="foreground" color="255,255,255" border="1"/>
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
<drawingstyle name="phantom" color="139,134,130" border="1"/>
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
<drawingstyle name="marker" color="80,250,80" border="1"/>
<drawingstyle name="selectionDraw" color="255,255,255" border="1"/>
<drawingstyle name="selectionFill" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="255,255,255" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="255,255,255" border="2" threshold="6.0"/>
<drawingstyle name="ghost" color="255,255,255" border="1"/>
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="50,50,50" border="1"/>
<drawingstyle name="foreground" color="255,255,255" border="1"/>
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
<drawingstyle name="phantom" color="139,134,130" border="1"/>
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
<drawingstyle name="marker" color="80,250,80" border="1"/>
<drawingstyle name="selectionDraw" color="255,255,255" border="1"/>
<drawingstyle name="selectionFill" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="255,255,255" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="255,255,255" border="2" threshold="6.0"/>
<drawingstyle name="ghost" color="255,255,255" border="1"/>
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
<drawingstyle name="text.reference" color="255,255,255" border="1" threshold="20.0"/>
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
</group>
<group name="Active Layers">
<drawingstyle name="nWell" color="210,180,140" pattern="55AA55AA55AA55AA" threshold="1.50"/>
@ -109,21 +110,22 @@
<description>Alliance Standard Look - black background</description>
<darkening>3.0</darkening>
<group name="Viewer">
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="50,50,50" border="1"/>
<drawingstyle name="foreground" color="255,255,255" border="1"/>
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
<drawingstyle name="phantom" color="139,134,130" border="1"/>
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
<drawingstyle name="marker" color="80,250,80" border="1"/>
<drawingstyle name="selectionDraw" color="255,255,255" border="1"/>
<drawingstyle name="selectionFill" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="255,255,255" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="255,255,255" border="2" threshold="6.0"/>
<drawingstyle name="ghost" color="255,255,255" border="1"/>
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="255,255,255" border="1" threshold="4.0"/>
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
<drawingstyle name="fallback" color="238,238,238" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="50,50,50" border="1"/>
<drawingstyle name="foreground" color="255,255,255" border="1"/>
<drawingstyle name="rubber" color="192,0,192" border="4" threshold="0.02"/>
<drawingstyle name="phantom" color="139,134,130" border="1"/>
<drawingstyle name="boundaries" color="208,199,192" border="1" pattern="0000000000000000" threshold="0"/>
<drawingstyle name="marker" color="80,250,80" border="1"/>
<drawingstyle name="selectionDraw" color="255,255,255" border="1"/>
<drawingstyle name="selectionFill" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="255,255,255" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="255,255,255" border="2" threshold="6.0"/>
<drawingstyle name="ghost" color="255,255,255" border="1"/>
<drawingstyle name="text.ruler" color="255,255,255" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="255,255,255" border="1" threshold="4.0"/>
<drawingstyle name="text.reference" color="255,255,255" border="1" threshold="20.0"/>
<drawingstyle name="undef" color="238,130,238" border="0" pattern="2244118822441188"/>
</group>
<group name="Active Layers">
<drawingstyle name="nWell" color="210,180,140" pattern="feffffffefffffff" border="1" threshold="1.50"/>
@ -176,17 +178,18 @@
<description>Alliance Standard Look - white background</description>
<darkening>3.0</darkening>
<group name="Viewer">
<drawingstyle name="fallback" color="0,0,0" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="255,255,255" border="1"/>
<drawingstyle name="foreground" color="0,0,0" border="1"/>
<drawingstyle name="selectionDraw" color="0,0,0" border="1"/>
<drawingstyle name="selectionFill" color="0,0,0" border="1"/>
<drawingstyle name="grid" color="0,0,0" border="1" threshold="6.0"/>
<drawingstyle name="spot" color="0,0,0" border="1" threshold="6.0"/>
<drawingstyle name="ghost" color="0,0,0" border="1"/>
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
<drawingstyle name="undef" color="0,0,0" border="0" pattern="2244118822441188"/>
<drawingstyle name="fallback" color="0,0,0" border="1" pattern="55AA55AA55AA55AA"/>
<drawingstyle name="background" color="255,255,255" border="1"/>
<drawingstyle name="foreground" color="0,0,0" border="1"/>
<drawingstyle name="selectionDraw" color="0,0,0" border="1"/>
<drawingstyle name="selectionFill" color="0,0,0" border="1"/>
<drawingstyle name="grid" color="0,0,0" border="1" threshold="6.0"/>
<drawingstyle name="spot" color="0,0,0" border="1" threshold="6.0"/>
<drawingstyle name="ghost" color="0,0,0" border="1"/>
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
<drawingstyle name="text.instance" color="0,0,0" border="1" threshold="4.0"/>
<drawingstyle name="text.reference" color="0,0,0" border="1" threshold="20.0"/>
<drawingstyle name="undef" color="0,0,0" border="0" pattern="2244118822441188"/>
</group>
</displaystyle>
<displaystyle name="Ispd Global Route">
@ -237,10 +240,11 @@
<description>Useful for debugging layout - white background</description>
<darkening>3.0</darkening>
<group name="Viewer">
<drawingstyle name="background" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="0,0,0" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="0,0,0" border="1" threshold="2.0"/>
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
<drawingstyle name="background" color="255,255,255" border="1"/>
<drawingstyle name="grid" color="0,0,0" border="1" threshold="2.0"/>
<drawingstyle name="spot" color="0,0,0" border="1" threshold="2.0"/>
<drawingstyle name="text.ruler" color="0,0,0" border="1" threshold="0.0"/>
<drawingstyle name="text.reference" color="0,0,0" border="1" threshold="20.0"/>
</group>
<group name="Active Layers">
<drawingstyle name="active" color="175,175,175" pattern="0000000000000000" threshold="1.50" border="2"/>

View File

@ -26,6 +26,8 @@ namespace {
using std::cerr;
using std::endl;
using std::string;
using std::set;
using std::vector;
using Hurricane::ForEachIterator;
using Hurricane::_TName;
using Hurricane::Error;
@ -47,6 +49,7 @@ namespace {
public:
// Static Methods.
static ToolEnginesRelation* getToolEnginesRelation ( const Cell* cell );
static void destroyAllToolEnginesRelations ();
// Constructor.
static ToolEnginesRelation* create ( Cell* masterOwner );
// Methods.
@ -57,19 +60,23 @@ namespace {
inline unsigned int updateRoutingModificationFlag ();
virtual string _getTypeName () const;
virtual Record* _getRecord () const;
private:
// Internal: Attributes
unsigned int _placementModificationFlag;
unsigned int _routingModificationFlag;
// Internal: Constructor.
ToolEnginesRelation ( Cell* masterOwner );
protected:
virtual void _preDestroy ();
private:
// Internal: Attributes
static set<ToolEnginesRelation*> _toolEnginesRelations;
unsigned int _placementModificationFlag;
unsigned int _routingModificationFlag;
};
set<ToolEnginesRelation*> ToolEnginesRelation::_toolEnginesRelations;
ToolEnginesRelation::ToolEnginesRelation ( Cell* masterOwner )
: Relation (masterOwner)
, _placementModificationFlag(0)
@ -82,6 +89,7 @@ namespace {
ToolEnginesRelation* enginesRelation = new ToolEnginesRelation(masterOwner);
enginesRelation->_postCreate();
_toolEnginesRelations.insert ( enginesRelation );
return enginesRelation;
}
@ -149,6 +157,22 @@ namespace {
}
void ToolEnginesRelation::destroyAllToolEnginesRelations ()
{
set<ToolEnginesRelation*>::iterator irelation = _toolEnginesRelations.begin();
for ( ; irelation != _toolEnginesRelations.end() ; ++irelation ) {
vector<ToolEngine*> tools;
forEach ( ToolEngine*, itool, (*irelation)->getSlaveOwners().getSubSet<ToolEngine*>() )
tools.push_back ( *itool );
for ( size_t i=0 ; i<tools.size() ; ++i ) {
tools[i]->destroy ();
}
}
_toolEnginesRelations.clear ();
}
} // End of anonymous namespace.
@ -201,6 +225,12 @@ namespace CRL {
}
void ToolEngine::destroyAll ()
{
ToolEnginesRelation::destroyAllToolEnginesRelations ();
}
string ToolEngine::_getTypeName () const
{
return _TName ( "ToolEngine" );
@ -300,10 +330,9 @@ namespace CRL {
return NULL;
else
{
for_each_toolengine(toolengine, relation->getSlaveOwners().getSubSet<ToolEngine*>()) {
if (toolengine->getName() == name)
return toolengine;
end_for;
forEach ( ToolEngine*, itool, relation->getSlaveOwners().getSubSet<ToolEngine*>()) {
if (itool->getName() == name)
return *itool;
}
return NULL;
}

View File

@ -29,6 +29,7 @@
#include <string>
#include <vector>
#include "hurricane/Commons.h"
#include "hurricane/DBo.h"
@ -46,6 +47,7 @@ namespace CRL {
using std::string;
using std::vector;
using Hurricane::Record;
using Hurricane::Name;
using Hurricane::DBo;
@ -61,6 +63,7 @@ namespace CRL {
// Static Methods.
static ToolEngines get ( const Cell* cell );
static ToolEngine* get ( const Cell* cell, const Name& name );
static void destroyAll ();
// Methods.
virtual const Name& getName () const = 0;
inline Cell* getCell () const;