One small enhancement to the code of the previous commit: If a
cell is referenced by a GDS "addendum" file but is not in either the tree of the root def or any other dumped GDS file, then check the database for those files and output them if they exist. This allows one way to get around missing cells in the GDS output if a cell from a GDS addendum is used but no cells from the library that the file is an addendum of are used.
This commit is contained in:
parent
e55c1ecbda
commit
f001502a18
|
|
@ -342,7 +342,31 @@ CalmaWrite(rootDef, f)
|
|||
* to insure that each child cell is output before it is used. The
|
||||
* root cell is output last.
|
||||
*/
|
||||
(void) calmaProcessDef(rootDef, f, CalmaDoLibrary);
|
||||
calmaProcessDef(rootDef, f, CalmaDoLibrary);
|
||||
|
||||
/*
|
||||
* Check for any cells that were instanced in the output definition
|
||||
* (by dumping a GDS file from a read-only view) but were never
|
||||
* defined (because the dumped GDS contained undefined references).
|
||||
* If these are in the database but were not part of the tree of
|
||||
* rootDef, then output them at the end.
|
||||
*/
|
||||
HashStartSearch(&hs);
|
||||
while ((he = HashNext(&calmaUndefHash, &hs)) != NULL)
|
||||
{
|
||||
char *refname = (char *)HashGetValue(he);
|
||||
if (refname && (refname[0] == '0'))
|
||||
{
|
||||
CellDef *extraDef;
|
||||
|
||||
extraDef = DBCellLookDef((char *)he->h_key.h_name);
|
||||
if (extraDef != NULL)
|
||||
calmaProcessDef(extraDef, f, FALSE);
|
||||
else
|
||||
TxError("Error: Cell %s is not defined in the output file!\n",
|
||||
refname + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Finish up by outputting the end-of-library marker */
|
||||
calmaOutRH(4, CALMA_ENDLIB, CALMA_NODATA, f);
|
||||
|
|
@ -360,21 +384,6 @@ CalmaWrite(rootDef, f)
|
|||
|
||||
HashFreeKill(&calmaLibHash);
|
||||
HashKill(&calmaPrefixHash);
|
||||
|
||||
/*
|
||||
* Check for any cells that were instanced in the output definition
|
||||
* (by dumping a GDS file from a read-only view) but were never
|
||||
* defined (because the dumped GDS contained undefined references).
|
||||
*/
|
||||
HashStartSearch(&hs);
|
||||
while ((he = HashNext(&calmaUndefHash, &hs)) != NULL)
|
||||
{
|
||||
char *refname = (char *)HashGetValue(he);
|
||||
if (refname && (refname[0] == '0'))
|
||||
TxError("Error: Cell %s is not defined in the output file!\n",
|
||||
refname + 1);
|
||||
}
|
||||
|
||||
HashFreeKill(&calmaUndefHash);
|
||||
return (good);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue