__ses_setc_xy()
authoryu.dongliang <18588496441@163.com>
Tue, 31 Oct 2023 08:28:41 +0000 (16:28 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 31 Oct 2023 08:28:41 +0000 (16:28 +0800)
ses_layout.c

index 4d22bd84ea1184c59f16ca3d462aa5b3ffbd957d..db8603403b57b2b113260f78fc2635093a69f593 100644 (file)
@@ -854,12 +854,19 @@ static void __ses_setc_xy(ScfEfunction* f, int d)
                c->y = (p0->y + p1->y) / 2;
 
                p0->x = c->x;
-               p1->x = c->x;
 
-               for (j = 2; j < c->n_pins; j++) {
+               if (2 == c->n_pins) {
+                       p1->x = c->x;
+                       continue;
+               }
+
+               for (j = 1; j < c->n_pins; j++) {
                        p0 =        c->pins[j];
 
-                       p0->x = (p0->x + 3 * c->x) / 4;
+                       if (j & 0x1)
+                               p0->x = c->x - d / 3;
+                       else
+                               p0->x = c->x + d / 3;
                }
        }
 }