__ses_path_jr()
authoryu.dongliang <18588496441@163.com>
Sat, 21 Oct 2023 08:47:31 +0000 (16:47 +0800)
committeryu.dongliang <18588496441@163.com>
Sat, 21 Oct 2023 08:47:31 +0000 (16:47 +0800)
ses_step_jr.c

index d666818d6922c93040faf2b6b55a799b0ecffc9d..2547a4d7531cb43681168c15962730aab8950ec9 100644 (file)
@@ -65,7 +65,12 @@ void __ses_path_pr(ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1
        }
 
        if (SCF_EDA_NPN == c0->type) {
-               if (i > 0) {
+
+               if (SCF_EDA_NPN_E == p0->id) {
+                       *r  = p1->pr  - p0->pr;
+                       *jr = p1->jpr - p0->jpr;
+
+               } else if (i > 0) {
                        p0 = path->pins->data[i - 1];
 
                        *r  = p1->pr  - p0->pr;
@@ -186,15 +191,19 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path)
                        p1->pr  -= dr;
                        p1->jpr -= jdr;
 
-                       c  = f->components[p1->cid];
+                       c = f->components[p1->cid];
 
-                       if (SCF_EDA_NPN == c->type && SCF_EDA_NPN_E == p1->id && cp1 != p1) {
+                       if (SCF_EDA_NPN == c->type && SCF_EDA_NPN_E == p1->id) {
 
-                               p       = path->pins->data[j - 1];
-                               p->pr  -= dr;
-                               p->jpr -= jdr;
+                               p = path->pins->data[j - 1];
 
-                               scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p->cid, p->id, p->pr, p->sr, pr, dr);
+                               if (cp1 != p1) {
+                                       p->pr  -= dr;
+                                       p->jpr -= jdr;
+                               } else {
+                                       p1->pr  = p->pr  - dr;
+                                       p1->jpr = p->jpr - jdr;
+                               }
                        }
 
                        scf_logi("j: %d, c%ldp%ld, p->pr: %lg, p->sr: %lg, pr: %lg, dr: %lg\n", j, p1->cid, p1->id, p1->pr, p1->sr, pr, dr);