From 7083d1904cde2685671b8f2251c7bf538f1f2abe Mon Sep 17 00:00:00 2001 From: Maximo Date: Tue, 16 Nov 2021 20:30:22 -0300 Subject: [PATCH] Quick fix of 'def write' issue with the nets extending beyond it's original shape in some cases. It would be good to analyze in more detail the use of the extlen variable --- lef/defWrite.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/lef/defWrite.c b/lef/defWrite.c index 1cf57c8c..be89f796 100644 --- a/lef/defWrite.c +++ b/lef/defWrite.c @@ -963,8 +963,13 @@ defNetGeometryFunc(tile, plane, defdata) x1 = r.r_xbot * oscale; x2 = r.r_xtop * oscale; if (routeWidth == 0) routeWidth = h; - extlen = (defdata->specialmode != DO_REGULAR) ? - 0 : (routeWidth * oscale) / 2; + + extlen = 0; + if(defdata->specialmode == DO_REGULAR) + { + x1 = x1 + (routeWidth/2*oscale); + x2 = x2 - (routeWidth/2*oscale); + } } else /* vertical orientation */ { @@ -974,8 +979,13 @@ defNetGeometryFunc(tile, plane, defdata) y1 = r.r_ybot * oscale; y2 = r.r_ytop * oscale; if (routeWidth == 0) routeWidth = w; - extlen = (defdata->specialmode != DO_REGULAR) ? - 0 : (routeWidth * oscale) / 2; + + extlen = 0; + if(defdata->specialmode == DO_REGULAR) + { + y1 = y1 + (routeWidth/2*oscale); + y2 = y2 - (routeWidth/2*oscale); + } } } else /* Type is a via */