tmp
authoryu.dongliang <18588496441@163.com>
Thu, 9 Nov 2023 09:09:42 +0000 (17:09 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 9 Nov 2023 09:09:42 +0000 (17:09 +0800)
ses_layout.c

index 1d8d37542e64cc30f29a377e5e4f9717671e0104..890250e5127df9467e733d04fd900e8b19a59848 100644 (file)
@@ -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];