From a904abf8d000760e85b7ed4930d8e90967ef5187 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 30 Oct 2023 11:18:09 +0800 Subject: [PATCH] ses_lines_same_components() --- ses_layout.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/ses_layout.c b/ses_layout.c index 4bf6b1d..8269211 100644 --- a/ses_layout.c +++ b/ses_layout.c @@ -422,6 +422,38 @@ int ses_lines_same_components(ScfEfunction* f) el1->n_lines = 1; } +#if 1 + for (i = 0; i < f->n_elines; ) { + el0 = f->elines[i]; + + if (0 == el0->n_lines || el0->n_pins <= 4) { + i++; + continue; + } + + for (j = i + 1; j < f->n_elines; j++) + f->elines[j - 1] = f->elines[j]; + + j = __ses_find_eline_index(f, el0->conns[0]->lid); + + if (el0->n_conns > 1) { + m = __ses_find_eline_index(f, el0->conns[1]->lid); + + if (j > m) + SCF_XCHG(j, m); + } else + m = j + 2; + + for (n = f->n_elines - 1; n > j + 1; n--) + f->elines[n] = f->elines[n - 1]; + + f->elines[j + 1] = el0; + el0->n_lines = 0; + + scf_loge("mov el%ld: %ld --> (%ld) %ld (%ld)\n", el0->id, i, j, j + 1, m); + } +#endif + #if 1 for (i = 0; i < f->n_elines; i++) { el0 = f->elines[i]; -- 2.25.1