Corrected a minor issue with the database read incorrectly generating

an error message when reading uses from a .mag file.  Also modified
the GDS write routine to provide an error message when an abstract
view points to a GDS file but the GDS file cannot be found.
This commit is contained in:
Tim Edwards 2018-04-24 09:29:05 -04:00
parent 1a626550ff
commit c522acab33
2 changed files with 30 additions and 27 deletions

View File

@ -681,12 +681,12 @@ calmaProcessDef(def, outf)
/* another vendor GDS, it would not normally be output. */
DBPropGet(def->cd_parents->cu_parent, "GDS_FILE", &isReadOnly);
if (!isReadOnly)
if (!isReadOnly || isAbstract)
TxError("Calma output error: Can't find GDS file \"%s\" "
"for vendor cell \"%s\". Using magic's "
"internal definition\n", filename,
def->cd_name);
else
if (isReadOnly)
def->cd_flags |= CDVENDORGDS;
}
else if (isAbstract)

View File

@ -1400,39 +1400,42 @@ badTransform:
/* now two versions of the same cell name coming from different */
/* sources, and this must be corrected. */
if (subCellDef->cd_file != NULL)
if (*pathptr != '\0')
{
slashptr = strrchr(subCellDef->cd_file, '/');
if (slashptr != NULL)
if (subCellDef->cd_file != NULL)
{
*slashptr = '\0';
if (strcmp(subCellDef->cd_file, pathptr))
slashptr = strrchr(subCellDef->cd_file, '/');
if (slashptr != NULL)
{
TxError("Duplicate cell in %s: Instance of cell %s is from "
"path %s but cell was previously read from %s.\n",
cellDef->cd_name, slashptr + 1, pathptr,
subCellDef->cd_file);
*slashptr = '\0';
/* To do: Check if new path does not exist (ignore), */
/* or if new path has same symbolic link or is the same */
/* filesize and checksum (ignore). If file appears to */
/* be truly different, then create a new cell with a */
/* modified cell name. */
if (strcmp(subCellDef->cd_file, pathptr))
{
TxError("Duplicate cell in %s: Instance of cell %s is from "
"path %s but cell was previously read from %s.\n",
cellDef->cd_name, slashptr + 1, pathptr,
subCellDef->cd_file);
TxError("New path will be ignored. Please check.\n");
/* To do: Check if new path does not exist (ignore), */
/* or if new path has same symbolic link or is the same */
/* filesize and checksum (ignore). If file appears to */
/* be truly different, then create a new cell with a */
/* modified cell name. */
TxError("New path will be ignored. Please check.\n");
}
*slashptr = '/';
}
*slashptr = '/';
}
}
else if (*pathptr != '\0')
{
/* Reconstruct file from path and cellname */
else
{
/* Reconstruct file from path and cellname */
strcat(path, "/");
strcat(path, subCellDef->cd_name);
strcat(path, DBSuffix);
StrDup(&subCellDef->cd_file, path);
strcat(path, "/");
strcat(path, subCellDef->cd_name);
strcat(path, DBSuffix);
StrDup(&subCellDef->cd_file, path);
}
}
subCellUse = DBCellNewUse(subCellDef, (useid[0]) ?