From 7ef4f236f64320d397a67a70e7baa6843d368577 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Thu, 9 Nov 2023 17:09:42 +0800 Subject: [PATCH] tmp --- ses_layout.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/ses_layout.c b/ses_layout.c index 1d8d375..890250e 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -671,7 +671,40 @@ static int __ses_layout_lines2(ScfEfunction* f) return 0; __ses_layout_lines4(f); +#if 0 + for (i = 0; i < f->n_elines; i++) { + el0 = f->elines[i]; + + if (el0->n_pins != 4) + continue; + + ScfEcomponent* c0 = f->components[el0->pins[0]]; + ScfEcomponent* c1 = f->components[el0->pins[2]]; + + ScfEpin* p0 = c0->pins[el0->pins[1]]; + ScfEpin* p1 = c1->pins[el0->pins[3]]; + + if (SCF_EDA_NPN == c0->type && SCF_EDA_NPN == c1->type) { + + ScfEpin* pb0 = c0->pins[SCF_EDA_NPN_B]; + ScfEpin* pb1 = c1->pins[SCF_EDA_NPN_B]; + + if (el0->id != pb0->lid && el0->id != pb1->lid) { + intptr_t i0 = __ses_find_eline_index(f, pb0->lid); + intptr_t i1 = __ses_find_eline_index(f, pb1->lid); + if (i0 > i1) + i0 = i1; + + el1 = f->elines[i0]; + + eline_mov_after(f, i0, i); + + scf_logi("mov el%ld [%ld] --> [%ld] el%ld\n", el0->id, i, i0, el1->id); + } + } + } +#endif #if 1 for (i = 0; i < f->n_elines; i++) { el0 = f->elines[i]; -- 2.25.1