ses_layout.c
authoryu.dongliang <18588496441@163.com>
Tue, 7 Nov 2023 17:14:13 +0000 (01:14 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 7 Nov 2023 17:14:13 +0000 (01:14 +0800)
ses_layout.c

index d17fb4abef3c9e0b0b7b3f6bc2b3638d03845adf..9e71e315834b99eca66c727c37bcbaf14065652a 100644 (file)
@@ -565,10 +565,13 @@ static int __ses_layout_lines4(ScfEfunction* f)
        ses_path_t*    path;
 
        ScfEcomponent* B;
+       ScfEcomponent* c;
        ScfEline*      el;
        ScfEpin*       Bp;
        ScfEpin*       Bn;
        ScfEpin*       p;
+       ScfEpin*       pc;
+       ScfEpin*       pe;
 
        intptr_t i;
        intptr_t j;
@@ -641,6 +644,22 @@ static int __ses_layout_lines4(ScfEfunction* f)
                        if (k < 0) {
                                n  = __ses_find_eline_index(f, p->lid);
 
+                               if (SCF_EDA_NPN == p->cid && SCF_EDA_NPN_B == p->id) {
+                                       c  = f->components[p->cid];
+                                       pc = c->pins[SCF_EDA_NPN_C];
+                                       pe = c->pins[SCF_EDA_NPN_E];
+
+                                       intptr_t ic = __ses_find_eline_index(f, pc->lid);
+                                       intptr_t ie = __ses_find_eline_index(f, pe->lid);
+
+                                       if (ic > ie)
+                                               __n = ic;
+                                       else
+                                               __n = ie;
+
+                                       scf_loge("c%ldp%ld, ic: %ld, ie: %ld\n", p->cid, p->id, ic, ie);
+                               }
+
                                eline_mov_before(f, __n, n);
                        }
                }
@@ -659,6 +678,20 @@ static int __ses_layout_lines4(ScfEfunction* f)
                if (k < 0) {
                        n  = __ses_find_eline_index(f, p->lid);
 
+                       if (SCF_EDA_NPN == p->cid && SCF_EDA_NPN_B == p->id) {
+                               c  = f->components[p->cid];
+                               pc = c->pins[SCF_EDA_NPN_C];
+                               pe = c->pins[SCF_EDA_NPN_E];
+
+                               intptr_t ic = __ses_find_eline_index(f, pc->lid);
+                               intptr_t ie = __ses_find_eline_index(f, pe->lid);
+                               if (ic > ie)
+                                       __n = ic;
+                               else
+                                       __n = ie;
+                               scf_loge("c%ldp%ld, ic: %ld, ie: %ld\n", p->cid, p->id, ic, ie);
+                       }
+
                        eline_mov_before(f, __n, n);
                }
                printf("\n");