Update directed case for drcSurround in DRCtech.c

Before this modification "directed" surround rule only worked for layers1 and layers2 belonging to the same plane.
After this modification the "directed" rule works also for different planes, even if layer1 is a contact type.
This commit is contained in:
fabian-l-c 2020-06-09 16:11:22 -03:00 committed by GitHub
parent f6c6e2c29c
commit a263a5a5a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 15 additions and 11 deletions

View File

@ -2816,16 +2816,17 @@ drcSurround(argc, argv)
for (j = 0; j < DBNumTypes; j++)
{
if (i == j) continue; /* Ignore false edges */
if (pset = (DBTypesOnSamePlane(i, j) & pmask2))
{
if (isDirectional)
{
if (pset = (DBTypesOnSamePlane(i, j) & pmask))
{
/* Directional surround is done entirely differently */
if (TTMaskHasType(&setM, i) && TTMaskHasType(&invM, j))
{
plane1 = LowestMaskBit(pmask);
plane2 = LowestMaskBit(pset);
plane1 = LowestMaskBit(pset);
plane2 = LowestMaskBit(pmask2);
/* Find bucket preceding the new one we wish to insert */
dp = drcFindBucket(i, j, distance);
@ -2836,12 +2837,12 @@ drcSurround(argc, argv)
&DBAllTypeBits,
why, distance,
DRC_REVERSE | DRC_BOTHCORNERS,
plane1, plane2);
plane2, plane1);
dptrig = (DRCCookie *)mallocMagic(sizeof(DRCCookie));
drcAssign(dptrig, distance, dpnew, &set2,
&DBZeroTypeBits, why, 0,
DRC_FORWARD | DRC_TRIGGER,
plane1, plane2);
plane2, plane1);
dp->drcc_next = dptrig;
/* And the other direction. . . */
@ -2853,16 +2854,19 @@ drcSurround(argc, argv)
&DBAllTypeBits,
why, distance,
DRC_FORWARD | DRC_BOTHCORNERS,
plane1, plane2);
plane2, plane1);
dptrig = (DRCCookie *)mallocMagic(sizeof(DRCCookie));
drcAssign(dptrig, distance, dpnew, &set2,
&DBZeroTypeBits, why, 0,
DRC_REVERSE | DRC_TRIGGER,
plane1, plane2);
plane2, plane1);
dp->drcc_next = dptrig;
}
}
}
else
{
if (pset = (DBTypesOnSamePlane(i, j) & pmask2))
{
if (TTMaskHasType(&set1, i) && TTMaskHasType(&set2, j))
{