__ses_path_jr()
authoryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 13:10:29 +0000 (21:10 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 13:10:29 +0000 (21:10 +0800)
ses_step_jr.c

index d7d586616cb4ab7ebd71c10f92c630c2a338f509..b8587d1c36ea7d8130ed0f26cd8ff094aeacfe00 100644 (file)
@@ -97,8 +97,17 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path)
                        double _r  =  child->r  / R;
                        double _jr = -child->jr / R;
 
-                       r  = p1->pr  - p0->pr;
-                       jr = p1->jpr - p0->jpr;
+                       c = f->components[p1->cid];
+
+                       if (SCF_EDA_Transistor == c->type && SCF_EDA_Transistor_E == p1->id) {
+                               p  = path->pins->data[j - 1];
+
+                               r  = p->pr  - p0->pr;
+                               jr = p->jpr - p0->jpr;
+                       } else {
+                               r  = p1->pr  - p0->pr;
+                               jr = p1->jpr - p0->jpr;
+                       }
 
                        R  =   r * r + jr * jr;
                        r  =   r / R;