From: yu.dongliang <18588496441@163.com> Date: Wed, 4 Oct 2023 07:13:24 +0000 (+0800) Subject: __ses_path_jr() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=8033a3b11db9d12e46d1ac52d1439efc70792778;p=ses.git __ses_path_jr() --- diff --git a/ses_step_jr.c b/ses_step_jr.c index 327bd8c..d9c444b 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -39,7 +39,6 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) ses_path_t* child; ScfEcomponent* c; - ScfEcomponent* c1; ScfEpin* p; ScfEpin* p0; ScfEpin* p1; @@ -92,15 +91,14 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) p0 = NULL; p1 = NULL; - int k0; - int k1; + int k; for (j = 0; j < path->pins->size; j++) { p = path->pins->data[j]; if (p->lid == cp0->lid) { p0 = p; - k0 = j; + k = j; break; } } @@ -113,7 +111,6 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) if (p->lid == cp1->lid) { p1 = p; - k1 = j; break; } } @@ -126,7 +123,7 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) double _r = child->r / R; double _jr = -child->jr / R; - __ses_path_pr(f, path, k0, k1, &r, &jr); + __ses_path_pr(f, path, k, j, &r, &jr); R = r * r + jr * jr; r = r / R; @@ -147,7 +144,9 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) p1->pr -= dr; p1->jpr -= jdr; - if (SCF_EDA_Transistor == c->type && SCF_EDA_Transistor_E == p1->id) { + c = f->components[p1->lid]; + + if (SCF_EDA_Transistor == c->type && SCF_EDA_Transistor_E == p1->id && cp1 != p1) { p = path->pins->data[j - 1]; p->pr -= dr;