From 052e7ba45f232b403ecb549ef1380f003cc6e6b1 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 6 Nov 2023 16:11:41 +0800 Subject: [PATCH] __ses_xchg_ce() --- ses_layout.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ses_layout.c b/ses_layout.c index da7a3a5..cbe80f1 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -1283,7 +1283,10 @@ static void __ses_xchg_ce(ScfEfunction* f, int d) if (SCF_EDA_NPN != c->type) continue; - j = (c->color - 1) % 2; + j = 0; + + if (c->color > 0) + j = (c->color - 1) % 2; pb = c->pins[SCF_EDA_NPN_B]; pc = c->pins[SCF_EDA_NPN_C]; @@ -1304,6 +1307,9 @@ static void __ses_xchg_ce(ScfEfunction* f, int d) } else if (pc->y < pb->y) { + pc = c->pins[SCF_EDA_NPN_C]; + pe = c->pins[SCF_EDA_NPN_E]; + if ((0 == j && pc->x > pb->x) || (1 == j && pc->x < pb->x)) SCF_XCHG(pc->x, pe->x); } -- 2.25.1