Additional change to CalmaWrite: when handling cellnames with

lengths exceeding the maximum GDS name length (32 characters),
truncate by removing all but the last 32 characters, instead of
the previous behavior which was to remove all but the first 32
characters.  The last 32 characters are far more likely to be
unique than the first 32, given that the usual reason for extra-
long names is the concatentation of hierarchical names.
This commit is contained in:
Tim Edwards 2019-05-22 17:03:52 -04:00
parent 30a2226dbb
commit a56309fdb6
1 changed files with 6 additions and 5 deletions

View File

@ -2757,16 +2757,17 @@ calmaOutStringRecord(type, str, f)
/*
* Make sure length is even.
* Output at most CALMANAMELENGTH characters.
* If the name is longer than CALMANAMELENGTH, then output the
* last CALMANAMELENGTH characters (since cell names are more
* likely to be unique in the last characters than in the first
* characters).
*/
if (len & 01) len++;
if (len > CALMANAMELENGTH)
{
char csav;
TxError("Warning: Cellname %s truncated ", str);
csav = *(str + 32);
*(str + 32) = '\0';
TxError("to %32s (GDS format limit)\n", str);
*(str + 32) = csav;
TxError("to %s (GDS format limit)\n", str + len - CALMANAMELENGTH);
locstr = str + len - CALMANAMELENGTH;
len = CALMANAMELENGTH;
}
calmaOutI2(len+4, f); /* Record length */