Corrected two errors in the DRC checking, one of which passed a

much larger area than necessary to the interaction check, and
the other which failed to scale the tech halo distance down
after scaling all the rules.  Both of these led to huge areas
of a layout being unnecessarily checked when even a tiny part
of the layout was modified.  Corrected behavior matches
expectations for interactive DRC response.
This commit is contained in:
Tim Edwards 2018-03-15 10:51:07 -04:00
parent 501a121ee3
commit 6492061480
5 changed files with 20 additions and 17 deletions

View File

@ -281,7 +281,7 @@ areaCheck(tile, arg)
* Side effects:
* Calls function for each design-rule violation in celldef
* that is triggered by an edge in rect and whose violation
* area falls withing clipRect. This routine makes a flat check:
* area falls within clipRect. This routine makes a flat check:
* it considers only information in the paint planes of celldef,
* and does not expand children. Function should have the form:
* void

View File

@ -481,7 +481,7 @@ DRCContinuous()
*/
while ((DRCPendingRoot != (DRCPendingCookie *)NULL) &&
DBSrPaintArea ((Tile *) NULL,
DRCPendingRoot->dpc_def->cd_planes [PL_DRC_CHECK],
DRCPendingRoot->dpc_def->cd_planes[PL_DRC_CHECK],
&TiPlaneRect, &DBAllButSpaceBits, drcCheckTile, (ClientData) NULL))
{
/* check for new user command (without blocking) */
@ -664,7 +664,7 @@ drcCheckTile(tile, arg)
*/
/* DRCBasicCheck (celldef, &checkbox, &erasebox, drcPaintError,
(ClientData) drcTempPlane); */
(ClientData) drcTempPlane); */
/* Check #2: check interactions between paint and subcells, and
* also between subcells and other subcells. If any part of a
@ -675,8 +675,8 @@ drcCheckTile(tile, arg)
*/
DRCErrorType = TT_ERROR_S;
(void) DRCInteractionCheck(celldef, &square, &erasebox,
drcPaintError, (ClientData) drcTempPlane);
(void) DRCInteractionCheck(celldef, &erasebox, drcPaintError,
(ClientData) drcTempPlane);
/* Check #3: check for array formation errors in the area. */

View File

@ -530,7 +530,7 @@ drcWhyFunc(scx, cdarg)
/* Check paint and interactions in this subcell. */
(void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area,
(void) DRCInteractionCheck(def, &scx->scx_area,
(dolist) ? drcListError : drcPrintError,
(ClientData) scx);
(void) DRCArrayCheck(def, &scx->scx_area,
@ -554,7 +554,7 @@ drcWhyAllFunc(scx, cdarg)
/* Check paint and interactions in this subcell. */
(void) DRCInteractionCheck(def, &scx->scx_area, &scx->scx_area,
(void) DRCInteractionCheck(def, &scx->scx_area,
drcListallError, (ClientData)scx);
(void) DRCArrayCheck(def, &scx->scx_area,
drcListallError, (ClientData)scx);

View File

@ -573,9 +573,8 @@ drcExactOverlapTile(tile, cxp)
*/
int
DRCInteractionCheck(def, area, erasebox, func, cdarg)
DRCInteractionCheck(def, erasebox, func, cdarg)
CellDef *def; /* Definition in which to do check. */
Rect *area; /* Area in which all errors are to be found. */
Rect *erasebox; /* Smaller area containing DRC check tiles */
void (*func)(); /* Function to call for each error. */
ClientData cdarg; /* Extra info to be passed to func. */
@ -596,25 +595,25 @@ DRCInteractionCheck(def, area, erasebox, func, cdarg)
* square separately.
*/
x = (area->r_xbot/DRCStepSize) * DRCStepSize;
if (x > area->r_xbot) x -= DRCStepSize;
y = (area->r_ybot/DRCStepSize) * DRCStepSize;
if (y > area->r_ybot) y -= DRCStepSize;
for (square.r_xbot = x; square.r_xbot < area->r_xtop;
x = (erasebox->r_xbot/DRCStepSize) * DRCStepSize;
if (x > erasebox->r_xbot) x -= DRCStepSize;
y = (erasebox->r_ybot/DRCStepSize) * DRCStepSize;
if (y > erasebox->r_ybot) y -= DRCStepSize;
for (square.r_xbot = x; square.r_xbot < erasebox->r_xtop;
square.r_xbot += DRCStepSize)
for (square.r_ybot = y; square.r_ybot < area->r_ytop;
for (square.r_ybot = y; square.r_ybot < erasebox->r_ytop;
square.r_ybot += DRCStepSize)
{
square.r_xtop = square.r_xbot + DRCStepSize;
square.r_ytop = square.r_ybot + DRCStepSize;
/* Limit square to area. Otherwise, a huge processing */
/* Limit square to erasebox. Otherwise, a huge processing */
/* penalty is incurred for finding a single error (e.g., */
/* using "drc find" or "drc why" in a large design with a */
/* large step size. */
cliparea = square;
GeoClip(&cliparea, area);
GeoClip(&cliparea, erasebox);
/* Find all the interactions in the square, and clip to the error
* area we're interested in. */

View File

@ -3384,6 +3384,10 @@ drcTechFinalStyle(style)
drcScaleUp(style, style->DRCScaleFactorD);
drcScaleDown(style, style->DRCScaleFactorN);
/* Scale DRCTechHalo to match */
DRCTechHalo *= style->DRCScaleFactorD;
DRCTechHalo /= style->DRCScaleFactorN;
/* Set maximum halo */
style->DRCTechHalo = DRCTechHalo;