Added the ability to track the first CellDef to fail to read and
report it after "Failure to read in entire sub-tree". This will not report every failing cell (since it quits reading after the first failure) but will avoid the existing issue of printing nothing and leaving the user with no feedback as to which cell was the problem.
This commit is contained in:
parent
41e65b5214
commit
0ae54b500a
|
|
@ -302,6 +302,7 @@ CalmaWrite(rootDef, f)
|
||||||
{
|
{
|
||||||
int oldCount = DBWFeedbackCount, problems, nerr;
|
int oldCount = DBWFeedbackCount, problems, nerr;
|
||||||
bool good;
|
bool good;
|
||||||
|
CellDef *err_def;
|
||||||
CellUse dummy;
|
CellUse dummy;
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
HashSearch hs;
|
HashSearch hs;
|
||||||
|
|
@ -327,9 +328,11 @@ CalmaWrite(rootDef, f)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dummy.cu_def = rootDef;
|
dummy.cu_def = rootDef;
|
||||||
if (DBCellReadArea(&dummy, &rootDef->cd_bbox, !CalmaAllowUndefined))
|
err_def = DBCellReadArea(&dummy, &rootDef->cd_bbox, !CalmaAllowUndefined);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of the cell.\n");
|
TxError("Failure to read entire subtree of the cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,7 @@ CalmaWriteZ(rootDef, f)
|
||||||
{
|
{
|
||||||
int oldCount = DBWFeedbackCount, problems, nerr;
|
int oldCount = DBWFeedbackCount, problems, nerr;
|
||||||
bool good;
|
bool good;
|
||||||
|
CellDef *err_def;
|
||||||
CellUse dummy;
|
CellUse dummy;
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
HashSearch hs;
|
HashSearch hs;
|
||||||
|
|
@ -302,9 +303,11 @@ CalmaWriteZ(rootDef, f)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dummy.cu_def = rootDef;
|
dummy.cu_def = rootDef;
|
||||||
if (DBCellReadArea(&dummy, &rootDef->cd_bbox, !CalmaAllowUndefined))
|
err_def = DBCellReadArea(&dummy, &rootDef->cd_bbox, !CalmaAllowUndefined);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of the cell.\n");
|
TxError("Failure to read entire subtree of the cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -124,6 +124,7 @@ CIFWrite(rootDef, f)
|
||||||
{
|
{
|
||||||
bool good;
|
bool good;
|
||||||
int oldCount = DBWFeedbackCount;
|
int oldCount = DBWFeedbackCount;
|
||||||
|
CellDef *err_def;
|
||||||
CellUse dummy;
|
CellUse dummy;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -133,9 +134,11 @@ CIFWrite(rootDef, f)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dummy.cu_def = rootDef;
|
dummy.cu_def = rootDef;
|
||||||
if (DBCellReadArea(&dummy, &rootDef->cd_bbox, TRUE))
|
err_def = DBCellReadArea(&dummy, &rootDef->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read in entire subtree of the cell.\n");
|
TxError("Failure to read in entire subtree of the cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return (FALSE);
|
return (FALSE);
|
||||||
}
|
}
|
||||||
DBFixMismatch();
|
DBFixMismatch();
|
||||||
|
|
|
||||||
|
|
@ -274,8 +274,8 @@ dbUnexpandFunc(scx, arg)
|
||||||
* the given rectangle.
|
* the given rectangle.
|
||||||
*
|
*
|
||||||
* Results:
|
* Results:
|
||||||
* If "halt_on_error" is TRUE, then return 1 if any subcell could not
|
* If "halt_on_error" is TRUE, then return a pointer to the first
|
||||||
* be read. Otherwise, return 0.
|
* subcell that could not be read. Otherwise, return NULL.
|
||||||
*
|
*
|
||||||
* Side effects:
|
* Side effects:
|
||||||
* May make new cells known to the database. Sets the CDAVAILABLE
|
* May make new cells known to the database. Sets the CDAVAILABLE
|
||||||
|
|
@ -284,7 +284,7 @@ dbUnexpandFunc(scx, arg)
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int
|
CellDef *
|
||||||
DBCellReadArea(rootUse, rootRect, halt_on_error)
|
DBCellReadArea(rootUse, rootRect, halt_on_error)
|
||||||
CellUse *rootUse; /* Root cell use from which search begins */
|
CellUse *rootUse; /* Root cell use from which search begins */
|
||||||
Rect *rootRect; /* Area to be read, in root coordinates */
|
Rect *rootRect; /* Area to be read, in root coordinates */
|
||||||
|
|
@ -292,32 +292,37 @@ DBCellReadArea(rootUse, rootRect, halt_on_error)
|
||||||
{
|
{
|
||||||
int dbReadAreaFunc();
|
int dbReadAreaFunc();
|
||||||
SearchContext scontext;
|
SearchContext scontext;
|
||||||
|
CellDef *err_def = NULL;
|
||||||
|
|
||||||
scontext.scx_use = rootUse;
|
scontext.scx_use = rootUse;
|
||||||
scontext.scx_trans = GeoIdentityTransform;
|
scontext.scx_trans = GeoIdentityTransform;
|
||||||
scontext.scx_area = *rootRect;
|
scontext.scx_area = *rootRect;
|
||||||
if (dbReadAreaFunc(&scontext, halt_on_error) == 1)
|
if (dbReadAreaFunc(&scontext, ((halt_on_error == TRUE) ? &err_def : NULL)) == 1)
|
||||||
return 1;
|
return err_def;
|
||||||
|
|
||||||
return 0;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
dbReadAreaFunc(scx, halt_on_error)
|
dbReadAreaFunc(scx, err_ptr)
|
||||||
SearchContext *scx; /* Pointer to context specifying
|
SearchContext *scx; /* Pointer to context specifying
|
||||||
* the cell use to be read in, and
|
* the cell use to be read in, and
|
||||||
* an area to be recursively read in
|
* an area to be recursively read in
|
||||||
* coordinates of the cell use's def.
|
* coordinates of the cell use's def.
|
||||||
*/
|
*/
|
||||||
bool halt_on_error; /* If TRUE, failure to find a cell causes a halt */
|
CellDef **err_ptr; /* If non-NULL, failure to find a cell causes a halt
|
||||||
|
* and the CellDef in error is returned in err_def.
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
CellDef *def = scx->scx_use->cu_def;
|
CellDef *def = scx->scx_use->cu_def;
|
||||||
|
|
||||||
if ((def->cd_flags & CDAVAILABLE) == 0)
|
if ((def->cd_flags & CDAVAILABLE) == 0)
|
||||||
{
|
{
|
||||||
if (DBCellRead(def, TRUE, TRUE, NULL) == FALSE)
|
if (DBCellRead(def, TRUE, TRUE, NULL) == FALSE)
|
||||||
if (halt_on_error)
|
{
|
||||||
return 1;
|
*err_ptr = def;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Note: we don't have to invoke DBReComputeBbox here because
|
/* Note: we don't have to invoke DBReComputeBbox here because
|
||||||
* if the bbox changed then there was a timestamp mismatch and
|
* if the bbox changed then there was a timestamp mismatch and
|
||||||
|
|
@ -325,9 +330,8 @@ dbReadAreaFunc(scx, halt_on_error)
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DBCellSrArea(scx, dbReadAreaFunc, (ClientData)halt_on_error))
|
if (DBCellSrArea(scx, dbReadAreaFunc, (ClientData)err_ptr))
|
||||||
if (halt_on_error)
|
return 1;
|
||||||
return 1;
|
|
||||||
|
|
||||||
/* Be clever about handling arrays: if the search area covers this
|
/* Be clever about handling arrays: if the search area covers this
|
||||||
* whole definition, then there's no need to look at any other
|
* whole definition, then there's no need to look at any other
|
||||||
|
|
|
||||||
|
|
@ -784,7 +784,7 @@ extern bool DBCellRead();
|
||||||
extern bool DBTestOpen();
|
extern bool DBTestOpen();
|
||||||
extern char *DBGetTech();
|
extern char *DBGetTech();
|
||||||
extern bool DBCellWrite();
|
extern bool DBCellWrite();
|
||||||
extern int DBCellReadArea();
|
extern CellDef *DBCellReadArea();
|
||||||
extern void DBFileRecovery();
|
extern void DBFileRecovery();
|
||||||
extern bool DBWriteBackup();
|
extern bool DBWriteBackup();
|
||||||
extern bool DBReadBackup();
|
extern bool DBReadBackup();
|
||||||
|
|
|
||||||
|
|
@ -692,11 +692,14 @@ DRCCheck(use, area)
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
SearchContext scx;
|
SearchContext scx;
|
||||||
|
CellDef *err_def;
|
||||||
extern int drcCheckFunc(); /* Forward reference. */
|
extern int drcCheckFunc(); /* Forward reference. */
|
||||||
|
|
||||||
if (DBCellReadArea(use, area, TRUE))
|
err_def = DBCellReadArea(use, area, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read in entire subtree of cell.\n");
|
TxError("Failure to read in entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,11 +361,14 @@ ExtAll(rootUse)
|
||||||
CellUse *rootUse;
|
CellUse *rootUse;
|
||||||
{
|
{
|
||||||
LinkedDef *defList = NULL;
|
LinkedDef *defList = NULL;
|
||||||
|
CellDef *err_def;
|
||||||
|
|
||||||
/* Make sure the entire subtree is read in */
|
/* Make sure the entire subtree is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of cell.\n");
|
TxError("Failure to read entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -460,15 +463,17 @@ ExtUnique(rootUse, option)
|
||||||
CellUse *rootUse;
|
CellUse *rootUse;
|
||||||
int option;
|
int option;
|
||||||
{
|
{
|
||||||
CellDef *def;
|
CellDef *def, *err_def;
|
||||||
LinkedDef *defList = NULL;
|
LinkedDef *defList = NULL;
|
||||||
int nwarn;
|
int nwarn;
|
||||||
int locoption;
|
int locoption;
|
||||||
|
|
||||||
/* Make sure the entire subtree is read in */
|
/* Make sure the entire subtree is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of cell.\n");
|
TxError("Failure to read entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -857,11 +862,14 @@ ExtIncremental(rootUse)
|
||||||
CellUse *rootUse;
|
CellUse *rootUse;
|
||||||
{
|
{
|
||||||
LinkedDef *defList = NULL;
|
LinkedDef *defList = NULL;
|
||||||
|
CellDef *err_def;
|
||||||
|
|
||||||
/* Make sure the entire subtree is read in */
|
/* Make sure the entire subtree is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of cell.\n");
|
TxError("Failure to read entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -167,11 +167,14 @@ ExtTimes(rootUse, f)
|
||||||
double clip, inter;
|
double clip, inter;
|
||||||
HashSearch hs;
|
HashSearch hs;
|
||||||
HashEntry *he;
|
HashEntry *he;
|
||||||
|
CellDef *err_def;
|
||||||
|
|
||||||
/* Make sure this cell is read in */
|
/* Make sure this cell is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of cell.\n");
|
TxError("Failure to read entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1022,11 +1025,14 @@ ExtInterCount(rootUse, halo, f)
|
||||||
FILE *f;
|
FILE *f;
|
||||||
{
|
{
|
||||||
double inter;
|
double inter;
|
||||||
|
CellDef *err_def;
|
||||||
|
|
||||||
/* Make sure this cell is read in */
|
/* Make sure this cell is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootUse->cu_def->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Failure to read entire subtree of cell.\n");
|
TxError("Failure to read entire subtree of cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2178,7 +2178,7 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer,
|
||||||
bool recurse;
|
bool recurse;
|
||||||
{
|
{
|
||||||
HashTable propHashTbl, siteHashTbl;
|
HashTable propHashTbl, siteHashTbl;
|
||||||
CellDef *def, *rootdef;
|
CellDef *def, *rootdef, *err_def;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char *filename;
|
char *filename;
|
||||||
float scale = CIFGetOutputScale(1000); /* conversion to microns */
|
float scale = CIFGetOutputScale(1000); /* conversion to microns */
|
||||||
|
|
@ -2186,9 +2186,11 @@ LefWriteAll(rootUse, writeTopCell, lefTech, lefHide, lefPinOnly, lefTopLayer,
|
||||||
rootdef = rootUse->cu_def;
|
rootdef = rootUse->cu_def;
|
||||||
|
|
||||||
/* Make sure the entire subtree is read in */
|
/* Make sure the entire subtree is read in */
|
||||||
if (DBCellReadArea(rootUse, &rootdef->cd_bbox, TRUE))
|
err_def = DBCellReadArea(rootUse, &rootdef->cd_bbox, TRUE);
|
||||||
|
if (err_def != NULL)
|
||||||
{
|
{
|
||||||
TxError("Could not read entire subtree of the cell.\n");
|
TxError("Could not read entire subtree of the cell.\n");
|
||||||
|
TxError("Failed on cell %s.\n", err_def->cd_name);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue