From c4f65be096f3451c38f759c54a6d8ba04316f5ec Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Fri, 29 Sep 2023 01:48:28 +0200 Subject: [PATCH] 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). --- crlcore/src/ccore/gds/GdsParser.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crlcore/src/ccore/gds/GdsParser.cpp b/crlcore/src/ccore/gds/GdsParser.cpp index 6ce5c66c..76d2c9dc 100644 --- a/crlcore/src/ccore/gds/GdsParser.cpp +++ b/crlcore/src/ccore/gds/GdsParser.cpp @@ -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 );