Skip to content

Commit

Permalink
Modified the handling of polygon cells when writing GDS; if a
Browse files Browse the repository at this point in the history
polygon cell has been created with the "gds polygon subcell"
option and the parent cell is read-only (vendor GDS), then the
polygon cell does not actually exist in the original GDS and
should not be output during a "gds write".
  • Loading branch information
RTimothyEdwards committed Jun 9, 2022
1 parent d099562 commit 085131b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.3.310
8.3.311
12 changes: 12 additions & 0 deletions calma/CalmaWrite.c
Original file line number Diff line number Diff line change
Expand Up @@ -863,6 +863,7 @@ calmaProcessDef(def, outf, do_library)
bool do_library; /* If TRUE, output only children of def, but not def */
{
char *filename;
int polyidx;
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd;
HashEntry *he;

Expand Down Expand Up @@ -1168,6 +1169,17 @@ calmaProcessDef(def, outf, do_library)
}
}

/* Quick check on "polygonXXXXX" cells---these are generated by the */
/* "gds polygon subcell" option, and if the parent cell is a vendor */
/* GDS file, then these cells do not actually exist in the layout */
/* and should not be output. */

if (isReadOnly == FALSE)
if (!strncmp(def->cd_name, "polygon", 7))
if (sscanf(def->cd_name + 7, "%d", &polyidx) == 1)
if (def->cd_parents->cu_parent != NULL)
DBPropGet(def->cd_parents->cu_parent, "GDS_FILE", &isReadOnly);

/* Output this cell definition from the Magic database */
if (!isReadOnly)
if (!do_library)
Expand Down
12 changes: 12 additions & 0 deletions calma/CalmaWriteZ.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,7 @@ calmaProcessDefZ(def, outf, do_library)
bool do_library; /* If TRUE, output only children of def, but not def */
{
char *filename;
int polyidx;
bool isReadOnly, oldStyle, hasContent, isAbstract, hasGDSEnd;
HashEntry *he;

Expand Down Expand Up @@ -1080,6 +1081,17 @@ calmaProcessDefZ(def, outf, do_library)
}
}

/* Quick check on "polygonXXXXX" cells---these are generated by the */
/* "gds polygon subcell" option, and if the parent cell is a vendor */
/* GDS file, then these cells do not actually exist in the layout */
/* and should not be output. */

if (isReadOnly == FALSE)
if (!strncmp(def->cd_name, "polygon", 7))
if (sscanf(def->cd_name + 7, "%d", &polyidx) == 1)
if (def->cd_parents->cu_parent != NULL)
DBPropGet(def->cd_parents->cu_parent, "GDS_FILE", &isReadOnly);

/* Output this cell definition from the Magic database */
if (!isReadOnly)
if (!do_library)
Expand Down

0 comments on commit 085131b

Please sign in to comment.