From 2044618dc1f2cb4e88d208ea223ebceb6064746d Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 31 Oct 2023 16:28:41 +0800 Subject: [PATCH] __ses_setc_xy() --- ses_layout.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/ses_layout.c b/ses_layout.c index 4d22bd8..db86034 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -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; } } } -- 2.25.1