Commit dfe4d80b authored by Jean-Paul Chaput's avatar Jean-Paul Chaput
Browse files

Clarify semantic of flatten Collections (walkthrough).

In the Cell/Instance hierarchy, the "terminal" and "leaf cell" concepts
where not clearly defined and partially overlapping. Now, "Terminal" is
the refer to the physical hierarchy (layout) and "TerminalNetlist" to
the logical hierarchy (netlist). The logical hierarchy can be less deep
than the physical one thanks to a Cell dedicated cell flags. Collections
related to the physical hierarchy keep their old names, the one related
to the logical hierarchy are renamed from "Leaf" to "TerminalNetlist".
The name "Leaf" was too ambiguous (leaf for *what* hierarchy).

* Change: In Hurricane::Device, set the "TerminalNetlist" flag once and
    for all. No need set it in all the derived classes again.
* New: In Hurricane::MultiCapacitor, added new parameter "dummy" to
    create dummies around the capacity matrix.
* Change: In Hurricane::Cell, remove "Leaf" related methods, replace
    them by "TerminalNetlist" one, especially Collections. Now we have
    two clear sets of Collections to walkthough the layout or the
    netlist.
      Change the "Terminal" flag into "TerminalNetlist".
* Change: In Hurricane::CellCollections, rename "Leaf" into
    "TerminalNetlist" collections and apply the new semantic to the
    locators.
* Change: In Hurricane::DataBase, Leaf to TerminalInstance renaming.
* Change: In Hurricane::DeepNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::HyperNet, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Instance, Leaf to TerminalInstance renaming.
* Change: In Hurricane::Viewer::HierarchyInformations, Leaf to
    TerminalInstance renaming.
* Change: In CRL::AllianceFramework, Leaf to TerminalInstance renaming.
* Change: In CRL::Catalog, Leaf to TerminalInstance renaming.
* Change: In CRL::ApParser, Leaf to TerminalInstance renaming.
* Change: In EtesianEngine::AddFeeds, Leaf to TerminalInstance renaming.
* Bug: In EtesianEngine::resetPlacement, move there the loop over
    non terminal netlist instances to flag fully placed sub-blocks
    as terminal for the netlist. Only then remove the feed cells
    from unplaced instances. Previously, the feed cells where stripped
    even from already placed instances.
* Change: In Katana, Leaf to TerminalInstance renaming.
* Bug: In Bora::PyDSlicingNode, allow the range parameter to be the
    Python None object when we do not want to pass one but need to
    have it as positional parameter.
* Change: In Cumulus/clocktree/ClockTree.py, Leaf to TerminalInstance
    renaming.
parent e2d6929f
......@@ -74,7 +74,8 @@ extern "C" {
PyErr_SetString( ConstructorError, "DSlicingNode.create(): Second argument *must* be of type Cell." );
return NULL;
}
if ( not IsPyStepParameterRange(pyParameterRange)
if ( (pyParameterRange != Py_None)
and not IsPyStepParameterRange(pyParameterRange)
and not IsPyMatrixParameterRange(pyParameterRange)) {
PyErr_SetString( ConstructorError, "DSlicingNode.create(): Third argument *must* be of type StepParameterRange or MatrixParameterRange." );
return NULL;
......
......@@ -113,6 +113,7 @@ extern "C" {
# if !defined(__PYTHON_MODULE__)
ParameterRange* ParameterRangeCast ( PyObject* derivedObject ) {
if (not derivedObject or (derivedObject == Py_None)) return NULL;
if (IsPyStepParameterRange (derivedObject)) return PYSTEPPARAMETERRANGE_O (derivedObject);
if (IsPyMatrixParameterRange(derivedObject)) return PYMATRIXPARAMETERRANGE_O(derivedObject);
......
......@@ -354,7 +354,7 @@ namespace CRL {
// The cell is not even in the Catalog : add an entry.
if (state == NULL) state = _catalog.getState( name, true );
if (state->isFlattenLeaf()) depth = 0;
if (state->isTerminalNetlist()) depth = 0;
state->setDepth( depth );
// Do not try to load.
......@@ -380,7 +380,7 @@ namespace CRL {
if (state->getCell() == NULL) {
state->setCell ( Cell::create( _libraries[ _environment.getLIBRARIES().getIndex() ]->getLibrary() , name ) );
state->getCell ()->put( CatalogProperty::create(state) );
state->getCell ()->setFlattenLeaf( false );
state->getCell ()->setTerminalNetlist( false );
createCell = true;
}
......@@ -526,7 +526,7 @@ namespace CRL {
state->setCell ( Cell::create ( library->getLibrary() , name ) );
state->getCell ()->put ( CatalogProperty::create(state) );
state->getCell ()->setFlattenLeaf ( false );
state->getCell ()->setTerminalNetlist ( false );
}
return state->getCell ();
......
......@@ -76,12 +76,12 @@ namespace CRL {
{
string s;
s += (isFlattenLeaf()) ? 'C' : '-';
s += (isFeed() ) ? 'F' : '-';
s += (isPad() ) ? 'P' : '-';
s += (isGds() ) ? 'G' : '-';
s += (isDelete() ) ? 'D' : '-';
s += (isInMemory() ) ? 'm' : '-';
s += (isTerminalNetlist()) ? 'C' : '-';
s += (isFeed() ) ? 'F' : '-';
s += (isPad() ) ? 'P' : '-';
s += (isGds() ) ? 'G' : '-';
s += (isDelete() ) ? 'D' : '-';
s += (isInMemory() ) ? 'm' : '-';
return s;
}
......@@ -163,12 +163,12 @@ namespace CRL {
if (state->getLibrary() != library) state->setLibrary( library );
state->setDepth( depth );
state->setFlattenLeaf( (sflags[0] == 'C') );
state->setFeed( (sflags[1] == 'F') );
state->setPad( (sflags[2] == 'P') );
state->setGds( (sflags[3] == 'G') );
state->setDelete( (sflags[4] == 'D') );
state->setInMemory( (sflags[5] == 'm') );
state->setTerminalNetlist( (sflags[0] == 'C') );
state->setFeed( (sflags[1] == 'F') );
state->setPad( (sflags[2] == 'P') );
state->setGds( (sflags[3] == 'G') );
state->setDelete( (sflags[4] == 'D') );
state->setInMemory( (sflags[5] == 'm') );
update( stack, state );
}
......@@ -253,10 +253,10 @@ namespace CRL {
for ( ; start<s.size() ; start++ ) {
switch ( s[start] ) {
case 'C': state->setFlattenLeaf ( true ); break;
case 'F': state->setFeed ( true ); break;
case 'G': state->setGds ( true ); break;
case 'D': state->setDelete ( true ); break;
case 'C': state->setTerminalNetlist ( true ); break;
case 'F': state->setFeed ( true ); break;
case 'G': state->setGds ( true ); break;
case 'D': state->setDelete ( true ); break;
default: return false;
}
}
......@@ -303,9 +303,9 @@ namespace CRL {
State* state = entry.second;
if (state->getLibrary() != library) continue;
if (state->isFlattenLeaf()) of << setw(20) << left << entry.first << "C\n";
if (state->isFeed() ) of << setw(20) << left << entry.first << "F\n";
if (state->isGds() ) of << setw(20) << left << entry.first << "G\n";
if (state->isTerminalNetlist()) of << setw(20) << left << entry.first << "C\n";
if (state->isFeed() ) of << setw(20) << left << entry.first << "F\n";
if (state->isGds() ) of << setw(20) << left << entry.first << "G\n";
}
of.close();
}
......
......@@ -348,7 +348,7 @@ namespace CRL {
throw Error ( "Missing CatalogProperty in cell %s.\n" , getString(cell->getName()).c_str() );
__state._cell = cell;
__state._cell->setTerminal ( false );
__state._cell->setTerminalNetlist ( false );
__state._state = sprop->getState();
__state._state->setLogical ( true );
......
......@@ -397,49 +397,47 @@ void DumpDate(ofstream &ccell)
}
void DumpInstances(ofstream &ccell, Cell* cell)
{
for_each_instance(instance, cell->getNotUnplacedInstances())
{
void DumpInstances(ofstream &ccell, Cell* cell)
{
for ( Instance* instance : cell->getNotUnplacedInstances()) {
ccell << "I " << toMBKlambda(instance->getAbutmentBox().getXMin())
<< "," << toMBKlambda(instance->getAbutmentBox().getYMin())
<< "," << instance->getMasterCell()->getName()
<< "," << instance->getName()
<< ",";
const Transformation& transformation = instance->getTransformation();
switch (transformation.getOrientation()) {
case Transformation::Orientation::ID:
ccell << "NOSYM";
break;
case Transformation::Orientation::R1:
ccell << "ROT_P";
break;
case Transformation::Orientation::R2:
ccell << "SYMXY";
break;
case Transformation::Orientation::R3:
ccell << "ROT_M";
break;
case Transformation::Orientation::MX:
ccell << "SYM_X";
break;
case Transformation::Orientation::XR:
ccell << "SY_RM";
break;
case Transformation::Orientation::MY:
ccell << "SYM_Y";
break;
case Transformation::Orientation::YR:
ccell << "SY_RP";
break;
default:
throw Error("Unrecognized orientation in transformation");
}
ccell << endl;
end_for;
const Transformation& transformation = instance->getTransformation();
switch (transformation.getOrientation()) {
case Transformation::Orientation::ID:
ccell << "NOSYM";
break;
case Transformation::Orientation::R1:
ccell << "ROT_P";
break;
case Transformation::Orientation::R2:
ccell << "SYMXY";
break;
case Transformation::Orientation::R3:
ccell << "ROT_M";
break;
case Transformation::Orientation::MX:
ccell << "SYM_X";
break;
case Transformation::Orientation::XR:
ccell << "SY_RM";
break;
case Transformation::Orientation::MY:
ccell << "SYM_Y";
break;
case Transformation::Orientation::YR:
ccell << "SY_RP";
break;
default:
throw Error("Unrecognized orientation in transformation");
}
ccell << endl;
}
}
}
}
......
......@@ -716,7 +716,7 @@ namespace {
return;
}
ignoreInstance = ignoreInstance and _cell->isTerminal();
ignoreInstance = ignoreInstance and _cell->isTerminalNetlist();
instance = Instance::create( _cell
, instanceName
......@@ -729,7 +729,7 @@ namespace {
, Instance::PlacementStatus::FIXED
, true // Checking of recursive calls
);
_cell->setTerminal( ignoreInstance );
_cell->setTerminalNetlist( ignoreInstance );
}
}
}
......@@ -781,7 +781,7 @@ namespace {
_state = catalogProperty->getState ();
_state->setPhysical ( true );
if ( _state->isFlattenLeaf() ) _cell->setFlattenLeaf ( true );
if ( _state->isTerminalNetlist() ) _cell->setTerminalNetlist ( true );
if ( _framework->isPad(_cell) ) _state->setPad ( true );
IoFile fileStream ( cellPath );
......
......@@ -599,7 +599,7 @@ architecture_body
: ARCHITECTURE
simple_name
{ if ( ( Vst::states->_behavioral )
|| ( Vst::states->_state->isFlattenLeaf() )
|| ( Vst::states->_state->isTerminalNetlist() )
|| ( Vst::states->_state->getDepth() <= 0 )
) YYACCEPT;
}
......@@ -785,7 +785,7 @@ component_instantiation_statement
throw Error( message.str() );
}
Vst::states->_instance = Instance::create( Vst::states->_cell, *$1, Vst::states->_masterCell );
Vst::states->_cell->setTerminal( false );
Vst::states->_cell->setTerminalNetlist( false );
} else {
if (not Vst::framework->getCell(*$2,Catalog::State::Views|Catalog::State::InMemory)) {
if (Vst::states->pushCell(*$2)) {
......
......@@ -450,7 +450,7 @@ namespace {
if (not _staticInit) staticInit();
_blifLut.insert( make_pair(getString(_cell->getName()), this) );
if (_cell->isTerminal())
if (_cell->isTerminalNetlist())
_depth = 1;
else {
cmess2 << " " << tab++ << "+ " << cell->getName() << " [.model]" << endl;
......@@ -770,7 +770,7 @@ namespace CRL {
}
Cell* cell = framework->createCell( blifLine[1] );
cell->setTerminal( false );
cell->setTerminalNetlist( false );
blifModel = new Model ( cell );
if (not mainModel or (blifLine[1] == mainName))
......
......@@ -77,55 +77,55 @@ namespace CRL {
class State {
public:
// Flags Constants.
enum Flags { FlattenLeaf = 1 << 0
, Feed = 1 << 1
, Pad = 1 << 2
, GDS = 1 << 3
, Delete = 1 << 4
, Logical = 1 << 5
, Physical = 1 << 6
, InMemory = 1 << 7
, Foreign = 1 << 8
, VstUseConcat = 1 << 9
, Views = Physical|Logical
enum Flags { TerminalNetlist = 1 << 0
, Feed = 1 << 1
, Pad = 1 << 2
, GDS = 1 << 3
, Delete = 1 << 4
, Logical = 1 << 5
, Physical = 1 << 6
, InMemory = 1 << 7
, Foreign = 1 << 8
, VstUseConcat = 1 << 9
, Views = Physical|Logical
};
// Constructors.
inline State ();
~State ();
inline State ();
~State ();
// Predicates.
inline bool isFlattenLeaf () const;
inline bool isFeed () const;
inline bool isPad () const;
inline bool isGds () const;
inline bool isDelete () const;
inline bool isPhysical () const;
inline bool isLogical () const;
inline bool isInMemory () const;
// Flags management.
inline unsigned int getFlags ( unsigned int mask=(unsigned int)-1 ) const;
inline bool setFlags ( unsigned int mask, bool value );
inline bool setFlattenLeaf ( bool value );
inline bool setFeed ( bool value );
inline bool setPad ( bool value );
inline bool setGds ( bool value );
inline bool setDelete ( bool value );
inline bool setPhysical ( bool value );
inline bool setLogical ( bool value );
inline bool setInMemory ( bool value );
// Accessors.
inline Cell* getCell () const;
inline Library* getLibrary () const;
inline unsigned int getDepth () const;
// Modifiers.
inline void merge ( const State& other );
Cell* setCell ( Cell* cell );
inline Library* setLibrary ( Library* library );
inline void setDepth ( unsigned int depth );
// Hurricane Management.
void toJson ( JsonWriter* w ) const;
inline string _getTypeName () const;
string _getString () const;
Record* _getRecord () const;
inline bool isTerminalNetlist () const;
inline bool isFeed () const;
inline bool isPad () const;
inline bool isGds () const;
inline bool isDelete () const;
inline bool isPhysical () const;
inline bool isLogical () const;
inline bool isInMemory () const;
// Flags management.
inline unsigned int getFlags ( unsigned int mask=(unsigned int)-1 ) const;
inline bool setFlags ( unsigned int mask, bool value );
inline bool setTerminalNetlist ( bool value );
inline bool setFeed ( bool value );
inline bool setPad ( bool value );
inline bool setGds ( bool value );
inline bool setDelete ( bool value );
inline bool setPhysical ( bool value );
inline bool setLogical ( bool value );
inline bool setInMemory ( bool value );
// Accessors.
inline Cell* getCell () const;
inline Library* getLibrary () const;
inline unsigned int getDepth () const;
// Modifiers.
inline void merge ( const State& other );
Cell* setCell ( Cell* cell );
inline Library* setLibrary ( Library* library );
inline void setDepth ( unsigned int depth );
// Hurricane Management.
void toJson ( JsonWriter* w ) const;
inline string _getTypeName () const;
string _getString () const;
Record* _getRecord () const;
private:
// Internal - Attributes.
......@@ -203,44 +203,44 @@ namespace CRL {
// -------------------------------------------------------------------
// Inline Functions.
inline Catalog::State::State () : _flags(0), _depth(1), _cell(NULL), _library(NULL) { }
inline bool Catalog::State::isFlattenLeaf () const { return (_flags&FlattenLeaf)?1:0; }
inline bool Catalog::State::isFeed () const { return (_flags&Feed )?1:0; }
inline bool Catalog::State::isPad () const { return (_flags&Pad )?1:0; }
inline bool Catalog::State::isGds () const { return (_flags&GDS )?1:0; }
inline bool Catalog::State::isDelete () const { return (_flags&Delete )?1:0; }
inline bool Catalog::State::isPhysical () const { return (_flags&Physical )?1:0; }
inline bool Catalog::State::isLogical () const { return (_flags&Logical )?1:0; }
inline bool Catalog::State::isInMemory () const { return (_flags&InMemory )?1:0; }
inline unsigned int Catalog::State::getFlags ( unsigned int mask ) const { return ( _flags & mask ); }
inline bool Catalog::State::setFlags ( unsigned int mask, bool value ) {
inline Catalog::State::State () : _flags(0), _depth(1), _cell(NULL), _library(NULL) { }
inline bool Catalog::State::isTerminalNetlist () const { return (_flags&TerminalNetlist)?1:0; }
inline bool Catalog::State::isFeed () const { return (_flags&Feed )?1:0; }
inline bool Catalog::State::isPad () const { return (_flags&Pad )?1:0; }
inline bool Catalog::State::isGds () const { return (_flags&GDS )?1:0; }
inline bool Catalog::State::isDelete () const { return (_flags&Delete )?1:0; }
inline bool Catalog::State::isPhysical () const { return (_flags&Physical )?1:0; }
inline bool Catalog::State::isLogical () const { return (_flags&Logical )?1:0; }
inline bool Catalog::State::isInMemory () const { return (_flags&InMemory )?1:0; }
inline unsigned int Catalog::State::getFlags ( unsigned int mask ) const { return ( _flags & mask ); }
inline bool Catalog::State::setFlags ( unsigned int mask, bool value ) {
if (value) { _flags |= mask; }
else { _flags &= ~mask; }
return ((_flags&mask) ? true : false);
}
inline bool Catalog::State::setFlattenLeaf ( bool value ) { return setFlags(FlattenLeaf,value); }
inline bool Catalog::State::setFeed ( bool value ) { return setFlags(Feed ,value); }
inline bool Catalog::State::setPad ( bool value ) { return setFlags(Pad ,value); }
inline bool Catalog::State::setGds ( bool value ) { return setFlags(GDS ,value); }
inline bool Catalog::State::setDelete ( bool value ) { return setFlags(Delete ,value); }
inline bool Catalog::State::setPhysical ( bool value ) { return setFlags(Physical ,value); }
inline bool Catalog::State::setLogical ( bool value ) { return setFlags(Logical ,value); }
inline bool Catalog::State::setInMemory ( bool value ) { return setFlags(InMemory ,value); }
inline Library* Catalog::State::setLibrary ( Library* library ) { return _library = library; }
inline void Catalog::State::setDepth ( unsigned int depth ) { _depth = depth; }
inline Cell* Catalog::State::getCell () const { return _cell; }
inline Library* Catalog::State::getLibrary () const { return _library; }
inline unsigned int Catalog::State::getDepth () const { return _depth; }
inline string Catalog::State::_getTypeName () const { return _TName("Catalog::State"); }
inline Catalog::Catalog () : _states() { }
inline map<Name,Catalog::State*>*
Catalog::getStates () { return &_states; }
inline string Catalog::_getTypeName () const { return _TName("Catalog"); }
inline CatalogProperty::CatalogProperty ( Catalog::State* state ) : PrivateProperty(), _state(state) {}
inline Catalog::State* CatalogProperty::getState () const { return _state; }
inline void CatalogProperty::setState ( Catalog::State* state ) { _state = state; }
inline bool Catalog::State::setTerminalNetlist ( bool value ) { return setFlags(TerminalNetlist,value); }
inline bool Catalog::State::setFeed ( bool value ) { return setFlags(Feed ,value); }
inline bool Catalog::State::setPad ( bool value ) { return setFlags(Pad ,value); }
inline bool Catalog::State::setGds ( bool value ) { return setFlags(GDS ,value); }
inline bool Catalog::State::setDelete ( bool value ) { return setFlags(Delete ,value); }
inline bool Catalog::State::setPhysical ( bool value ) { return setFlags(Physical ,value); }
inline bool Catalog::State::setLogical ( bool value ) { return setFlags(Logical ,value); }
inline bool Catalog::State::setInMemory ( bool value ) { return setFlags(InMemory ,value); }
inline Library* Catalog::State::setLibrary ( Library* library ) { return _library = library; }
inline void Catalog::State::setDepth ( unsigned int depth ) { _depth = depth; }
inline Cell* Catalog::State::getCell () const { return _cell; }
inline Library* Catalog::State::getLibrary () const { return _library; }
inline unsigned int Catalog::State::getDepth () const { return _depth; }
inline string Catalog::State::_getTypeName () const { return _TName("Catalog::State"); }
inline Catalog::Catalog () : _states() { }
inline map<Name,Catalog::State*>*
Catalog::getStates () { return &_states; }
inline string Catalog::_getTypeName () const { return _TName("Catalog"); }
inline CatalogProperty::CatalogProperty ( Catalog::State* state ) : PrivateProperty(), _state(state) {}
inline Catalog::State* CatalogProperty::getState () const { return _state; }
inline void CatalogProperty::setState ( Catalog::State* state ) { _state = state; }
// -------------------------------------------------------------------
......@@ -249,41 +249,41 @@ namespace CRL {
class CatalogExtension {
public:
static Catalog::State* get ( const Cell* );
static Catalog::State* get ( const Cell* );
public:
static inline bool isFlattenLeaf ( const Cell* );
static inline bool isFeed ( const Cell* );
static inline bool isPad ( const Cell* );
static inline bool isGds ( const Cell* );
static inline bool isDelete ( const Cell* );
static inline bool isPhysical ( const Cell* );
static inline bool isLogical ( const Cell* );
// Flags management.
static inline unsigned int getFlags ( const Cell*, unsigned int mask=(unsigned int)-1 );
static inline bool setFlags ( const Cell*, unsigned int mask, bool value );
static inline bool setFlattenLeaf ( const Cell*, bool value );
static inline bool setFeed ( const Cell*, bool value );
static inline bool setPad ( const Cell*, bool value );
static inline bool setGds ( const Cell*, bool value );
static inline bool setDelete ( const Cell*, bool value );
static inline bool setPhysical ( const Cell*, bool value );
static inline bool setLogical ( const Cell*, bool value );
// Accessors.
static inline Library* getLibrary ( const Cell* );
static inline unsigned int getDepth ( const Cell* );
// Modifiers.
static inline Library* setLibrary ( const Cell*, Library* library );
static inline void setDepth ( const Cell*, unsigned int depth );
static inline bool isTerminalNetlist ( const Cell* );
static inline bool isFeed ( const Cell* );
static inline bool isPad ( const Cell* );
static inline bool isGds ( const Cell* );
static inline bool isDelete ( const Cell* );
static inline bool isPhysical ( const Cell* );
static inline bool isLogical ( const Cell* );
// Flags management.
static inline unsigned int getFlags ( const Cell*, unsigned int mask=(unsigned int)-1 );
static inline bool setFlags ( const Cell*, unsigned int mask, bool value );
static inline bool setTerminalNetlist ( const Cell*, bool value );
static inline bool setFeed ( const Cell*, bool value );
static inline bool setPad ( const Cell*, bool value );
static inline bool setGds ( const Cell*, bool value );
static inline bool setDelete ( const Cell*, bool value );
static inline bool setPhysical ( const Cell*, bool value );
static inline bool setLogical ( const Cell*, bool value );
// Accessors.
static inline Library* getLibrary ( const Cell* );
static inline unsigned int getDepth ( const Cell* );
// Modifiers.
static inline Library* setLibrary ( const Cell*, Library* library );
static inline void setDepth ( const Cell*, unsigned int depth );
private:
static const Cell* _owner;
static Catalog::State* _cache;
};
inline bool CatalogExtension::isFlattenLeaf ( const Cell* cell )
inline bool CatalogExtension::isTerminalNetlist ( const Cell* cell )
{
Catalog::State* state = get(cell);
return (state == NULL) ? false : state->isFlattenLeaf();
return (state == NULL) ? false : state->isTerminalNetlist();
}
......@@ -343,10 +343,10 @@ namespace CRL {
}
inline bool CatalogExtension::setFlattenLeaf ( const Cell* cell, bool value )
inline bool CatalogExtension::setTerminalNetlist ( const Cell* cell, bool value )
{
Catalog::State* state = get(cell);
return (state == NULL) ? false : state->setFlattenLeaf(value);
return (state == NULL) ? false : state->setTerminalNetlist(value);
}
......
......@@ -518,10 +518,10 @@ namespace {
status = defwNewLine ();
CHECK_STATUS_CBK(status);
status = defwStartComponents ( cell->getLeafInstanceOccurrences().getSize() );
status = defwStartComponents ( cell->getTerminalNetlistInstanceOccurrences().getSize() );
CHECK_STATUS_CBK(status);
for ( Occurrence occurrence : cell->getLeafInstanceOccurrences() ) {
for ( Occurrence occurrence : cell->getTerminalNetlistInstanceOccurrences() ) {
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
string insname = toDefName(occurrence.getCompactString());
const char* source = NULL;
......
......@@ -710,7 +710,7 @@ namespace CRL {
if ( cell != NULL ) {
libraryName = getString(cell->getName()) + "_export";
for ( Occurrence occurrence : cell->getLeafInstanceOccurrences() ) {
for ( Occurrence occurrence : cell->getTerminalNetlistInstanceOccurrences() ) {
Instance* instance = static_cast<Instance*>(occurrence.getEntity());
cells.insert ( instance->getMasterCell() );
}
......
......@@ -186,7 +186,7 @@ namespace {
hCell = Cell::create(library, Name(cellNameString));
hCell->setTerminal(false);
if (!asDesignLibrary)
hCell->setFlattenLeaf(true);
hCell->setTerminalNetlist(true);
cerr << hCell << endl;