Corrected the bplane branch implementation of DRCFindInteractions,

where the function drcFindOtherCells() was missing, which causes
interaction areas to be missed and messes up the DRC checks between
parent and child cells.
This commit is contained in:
Tim Edwards 2020-03-22 17:08:21 -04:00
parent ff0ba7f89d
commit 4777ced813
1 changed files with 41 additions and 0 deletions

View File

@ -43,6 +43,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
static Rect drcSubIntArea; /* Accumulates area of interactions. */
static CellDef *drcSubDef; /* Cell definition we're checking. */
static int drcSubRadius; /* Interaction radius. */
static CellUse *drcCurSub; /* Holds current use while searching for interactions */
static Rect drcSubLookArea; /* Area where we're looking for interactions */
static void (*drcSubFunc)(); /* Error function. */
static ClientData drcSubClientData;
@ -62,6 +63,37 @@ static DRCCookie drcSubcellCookie = {
extern int DRCErrorType;
/*
* ----------------------------------------------------------------------------
*
* drcFindOtherCells --
*
* This is a search function invoked when looking around a given
* cell for interactions. If a cell use is found other than drcCurSub,
* then it constitutes an interaction, and its area is included into
* the area parameter.
*
* Results:
* Always returns 0 to keep the search alive.
*
* Side effects:
* The area parameter may be modified by including the area
* of the current use.
*
* ----------------------------------------------------------------------------
*/
int
drcFindOtherCells(use, area)
CellUse *use;
Rect *area;
{
if (use != drcCurSub)
GeoInclude(&use->cu_bbox, area);
return 0;
}
/*
* ----------------------------------------------------------------------------
@ -121,6 +153,15 @@ drcSubcellFunc(subUse, propagate)
GeoTransRect(&(subUse->cu_transform), &subIntArea, &locIntArea);
GeoInclude(&locIntArea, &intArea);
if (!GEO_RECTNULL(&subIntArea)) *propagate = TRUE;
drcCurSub = subUse;
(void) DBSrCellPlaneArea(drcSubDef->cd_cellPlane, &haloArea,
drcFindOtherCells, (ClientData)(&intArea));
if (GEO_RECTNULL(&intArea)) return 0;
GEO_EXPAND(&intArea, drcSubRadius, &intArea);
GeoClip(&intArea, &haloArea);
(void) GeoInclude(&intArea, &drcSubIntArea);
return 0;
}