__ses_path_sr()
authoryu.dongliang <18588496441@163.com>
Sat, 28 Oct 2023 14:23:51 +0000 (22:23 +0800)
committeryu.dongliang <18588496441@163.com>
Sat, 28 Oct 2023 14:23:51 +0000 (22:23 +0800)
ses_step_dc_input.c
ses_step_jr.c

index ea0f5ab53b0abba9b9803adcd82ac1ddc7eabdc4..736da1ee1de8fe327ad017564194d6f0ccd292f1 100644 (file)
@@ -22,7 +22,7 @@ static int _dc_input_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx
                if (!(SCF_EDA_PIN_IN & el->flags))
                        continue;
 
-               k   = 0;
+               k   = 1 % 2;
                el2 = f->elines[B->pins[k]->lid];
 
                el->v      = k * B->v;
index fa3d9c99118918e5a844836e325f7b79b20a61ee..ab5b724162ee2a60875c5b92be5d6ade30a5744b 100644 (file)
@@ -18,14 +18,8 @@ void __ses_path_sr(ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1
                                p1 = path->pins->data[j - 1];
 
                } else if (j > 0) {
-                       p1 = path->pins->data[j - 1];
-                       c1 = f->components[p1->cid];
-
-                       if (SCF_EDA_NPN == c1->type && SCF_EDA_NPN_E == p1->id) {
-                               p1  = path->pins->data[j];
-                               r1  = p1->r  + p1->dr;
-                               jr1 = p1->jr + p1->jdr;
-                       }
+                       r1  = p1->r  + p1->dr;
+                       jr1 = p1->jr + p1->jdr;
                } else {
                        *r  = 0;
                        *jr = 0;
@@ -44,8 +38,8 @@ void __ses_path_sr(ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1
                        *jr = p1->jsr;
                }
        } else {
-               *r  = p1->sr  - p0->sr;
-               *jr = p1->jsr - p0->jsr;
+               *r  = p1->sr  - r1  - p0->sr;
+               *jr = p1->jsr - jr1 - p0->jsr;
        }
 
        scf_logd("c%ldp%ld-c%ldp%ld, r: %lg, p0->sr: %lg, p0->pr: %lg, p1->sr: %lg, p1->pr: %lg\n",