Corrected the algorithm created yesterday for copying up DRC errors
from child cells, which was incorrectly descending all the way down into the hierarchy; not only can this produce the incorrect result but it also wastes time searching cells that don't need to be searched.
This commit is contained in:
parent
65b7ca8dac
commit
6b633be797
|
|
@ -107,10 +107,22 @@ drcFindOtherCells(use, area)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* For each tile found in drcCopyErrorsFunc(), translate the */
|
/*
|
||||||
/* tile position into the coordinate system of the parent cell */
|
* ----------------------------------------------------------------------------
|
||||||
/* (represented by the drcTemp plane in ClientData) and */
|
*
|
||||||
/* copy (paint) into it. */
|
* drcSubCopyErrors ---
|
||||||
|
*
|
||||||
|
* For each tile found in drcCopyErrorsFunc(), translate the tile position
|
||||||
|
* into the coordinate system of the parent cell (represented by the drcTemp
|
||||||
|
* plane in ClientData) and apply the function passed in the filter, which is
|
||||||
|
* whatever function handles DRC errors inside an error tile (which is
|
||||||
|
* different for "drc why" commands than for "drc check".
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* 0 to keep the search going.
|
||||||
|
*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
int
|
int
|
||||||
drcSubCopyErrors(tile, cxp)
|
drcSubCopyErrors(tile, cxp)
|
||||||
|
|
@ -121,9 +133,6 @@ drcSubCopyErrors(tile, cxp)
|
||||||
Rect destArea;
|
Rect destArea;
|
||||||
struct drcClientData *arg = (struct drcClientData *)cxp->tc_filter->tf_arg;
|
struct drcClientData *arg = (struct drcClientData *)cxp->tc_filter->tf_arg;
|
||||||
|
|
||||||
// DBTreeSrTiles() checks its own tiles, which we want to ignore.
|
|
||||||
if (arg->dCD_celldef == cxp->tc_scx->scx_use->cu_def) return 0;
|
|
||||||
|
|
||||||
TiToRect(tile, &area);
|
TiToRect(tile, &area);
|
||||||
GeoClip(&area, &cxp->tc_scx->scx_area);
|
GeoClip(&area, &cxp->tc_scx->scx_area);
|
||||||
GeoTransRect(&cxp->tc_scx->scx_trans, &area, &destArea);
|
GeoTransRect(&cxp->tc_scx->scx_trans, &area, &destArea);
|
||||||
|
|
@ -135,6 +144,40 @@ drcSubCopyErrors(tile, cxp)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* drcSubCopyFunc ---
|
||||||
|
*
|
||||||
|
* This routine is applied for each subcell of a parent def. It calls
|
||||||
|
* DBNoTreeSrTiles() with the above routine drcSubCopyErrors(), which
|
||||||
|
* copies all TT_ERROR_P tiles from the child cell up into the parent.
|
||||||
|
* This is used only within areas found to be non-interacting with the
|
||||||
|
* parent, such that any error found in the child cell is guaranteed to
|
||||||
|
* be a real error, and not one that might be resolved by additional
|
||||||
|
* material found in the parent or a sibling cell.
|
||||||
|
*
|
||||||
|
* Returns:
|
||||||
|
* Whatever DBNoTreeSrTiles() returns.
|
||||||
|
*
|
||||||
|
* ----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
int
|
||||||
|
drcSubCopyFunc(scx, fp)
|
||||||
|
SearchContext *scx;
|
||||||
|
TreeFilter *fp;
|
||||||
|
{
|
||||||
|
TileTypeBitMask drcMask;
|
||||||
|
|
||||||
|
/* Create a mask with only TT_ERROR_P in it */
|
||||||
|
TTMaskZero(&drcMask);
|
||||||
|
TTMaskSetType(&drcMask, TT_ERROR_P);
|
||||||
|
|
||||||
|
/* Use DBNoTreeSrTiles() because we want to search only one level down */
|
||||||
|
return DBNoTreeSrTiles(scx, &drcMask, 0, drcSubCopyErrors, fp->tf_arg);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -607,17 +650,12 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
void (*savedPaintPlane)();
|
void (*savedPaintPlane)();
|
||||||
struct drcClientData arg;
|
struct drcClientData arg;
|
||||||
SearchContext scx;
|
SearchContext scx;
|
||||||
TileTypeBitMask drcMask;
|
|
||||||
|
|
||||||
drcSubFunc = func;
|
drcSubFunc = func;
|
||||||
drcSubClientData = cdarg;
|
drcSubClientData = cdarg;
|
||||||
oldTiles = DRCstatTiles;
|
oldTiles = DRCstatTiles;
|
||||||
count = 0;
|
count = 0;
|
||||||
|
|
||||||
/* Create a mask with only TT_ERROR_P in it */
|
|
||||||
TTMaskZero(&drcMask);
|
|
||||||
TTMaskSetType(&drcMask, TT_ERROR_P);
|
|
||||||
|
|
||||||
/* Divide the area to be checked up into squares. Process each
|
/* Divide the area to be checked up into squares. Process each
|
||||||
* square separately.
|
* square separately.
|
||||||
*/
|
*/
|
||||||
|
|
@ -670,7 +708,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
|
|
||||||
/* Copy errors up from all non-interacting children */
|
/* Copy errors up from all non-interacting children */
|
||||||
scx.scx_area = subArea;
|
scx.scx_area = subArea;
|
||||||
DBTreeSrTiles(&scx, &drcMask, 0, drcSubCopyErrors, &arg);
|
DBCellSrArea(&scx, drcSubCopyFunc, &arg);
|
||||||
|
|
||||||
DRCErrorType = errorSaveType;
|
DRCErrorType = errorSaveType;
|
||||||
continue;
|
continue;
|
||||||
|
|
@ -706,7 +744,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
||||||
/* Copy errors up from all non-interacting children */
|
/* Copy errors up from all non-interacting children */
|
||||||
scx.scx_area = subArea;
|
scx.scx_area = subArea;
|
||||||
DBTreeSrTiles(&scx, &drcMask, 0, drcSubCopyErrors, &arg);
|
DBCellSrArea(&scx, drcSubCopyFunc, &arg);
|
||||||
}
|
}
|
||||||
/* check below */
|
/* check below */
|
||||||
if (intArea.r_ybot > eraseClip.r_ybot)
|
if (intArea.r_ybot > eraseClip.r_ybot)
|
||||||
|
|
@ -717,7 +755,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
||||||
/* Copy errors up from all non-interacting children */
|
/* Copy errors up from all non-interacting children */
|
||||||
scx.scx_area = subArea;
|
scx.scx_area = subArea;
|
||||||
DBTreeSrTiles(&scx, &drcMask, 0, drcSubCopyErrors, &arg);
|
DBCellSrArea(&scx, drcSubCopyFunc, &arg);
|
||||||
}
|
}
|
||||||
subArea.r_ytop = intArea.r_ytop;
|
subArea.r_ytop = intArea.r_ytop;
|
||||||
subArea.r_ybot = intArea.r_ybot;
|
subArea.r_ybot = intArea.r_ybot;
|
||||||
|
|
@ -730,7 +768,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
||||||
/* Copy errors up from all non-interacting children */
|
/* Copy errors up from all non-interacting children */
|
||||||
scx.scx_area = subArea;
|
scx.scx_area = subArea;
|
||||||
DBTreeSrTiles(&scx, &drcMask, 0, drcSubCopyErrors, &arg);
|
DBCellSrArea(&scx, drcSubCopyFunc, &arg);
|
||||||
}
|
}
|
||||||
/* check left */
|
/* check left */
|
||||||
if (intArea.r_xbot > eraseClip.r_xbot)
|
if (intArea.r_xbot > eraseClip.r_xbot)
|
||||||
|
|
@ -741,7 +779,7 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
|
||||||
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
DRCBasicCheck(def, &eraseHalo, &subArea, func, cdarg);
|
||||||
/* Copy errors up from all non-interacting children */
|
/* Copy errors up from all non-interacting children */
|
||||||
scx.scx_area = subArea;
|
scx.scx_area = subArea;
|
||||||
DBTreeSrTiles(&scx, &drcMask, 0, drcSubCopyErrors, &arg);
|
DBCellSrArea(&scx, drcSubCopyFunc, &arg);
|
||||||
}
|
}
|
||||||
DRCErrorType = errorSaveType;
|
DRCErrorType = errorSaveType;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue