Add a prefix to GDS sub-cell isolated in a "per cell" library.

The GDS file write all the cell names (SREF) in one namespace, so cells
with identical names, coming from different libraries may clash. When
a GDS is read *and* contains sub-cell, we isolate them in a sub-library,
but we must *also* give the cells in them unique names, we prefix by
the library name (which in turn is the top cell name).
This commit is contained in:
Jean-Paul Chaput 2023-09-29 01:48:28 +02:00
parent 93cc7cd178
commit c4f65be096
1 changed files with 2 additions and 0 deletions

View File

@ -810,6 +810,8 @@ namespace {
if (cell) return cell;
if (not Gds::getTopCellName().empty() and (cellName != Gds::getTopCellName())) {
cellName.insert( 0, "." );
cellName.insert( 0, Gds::getTopCellName() );
workLibrary = _library->getLibrary( Gds::getTopCellName() );
if (workLibrary) {
cell = workLibrary->getCell( cellName );