ses_lines_same_components()
authoryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 03:18:09 +0000 (11:18 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 30 Oct 2023 03:18:09 +0000 (11:18 +0800)
ses_layout.c

index 4bf6b1de8cf990f58dab12d84e914e134d2c4721..826921157392cb43f88bc5f328ac136df0d62365 100644 (file)
@@ -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];