More accurate layout detection in CRL::GdsDriver.

* Bug: In CRL::GdsDriver::hasLayout(), a Cell was saved in the GDSII
    stream only if it has a layout, but the check was not accurate
    enough. In the Arlet6502, the whole core was missing.
      Now check for the abscence of Plugs (not unfinished Nets) and
    PLACED/FIXED instances.
This commit is contained in:
Jean-Paul Chaput 2020-11-14 18:48:49 +01:00
parent 4344023221
commit bf0d1ef350
1 changed files with 7 additions and 1 deletions

View File

@ -55,6 +55,10 @@ namespace {
bool hasLayout ( const Cell* cell )
{
for ( Instance* instance : cell->getInstances() ) {
if (instance->getPlacementStatus() != Instance::PlacementStatus::UNPLACED)
return true;
}
for ( Net* net : cell->getNets() ) {
for ( Component* component : net->getComponents() ) {
if (dynamic_cast<Plug*>(component) == NULL) return true;
@ -667,7 +671,9 @@ namespace CRL {
GdsStream gstream ( cellFile );
DepthOrder cellOrder ( cell );
for ( auto element : cellOrder.getCellDepths() ) gstream << element.first;
for ( auto element : cellOrder.getCellDepths() ) {
gstream << element.first;
}
return true;
}