From: yu.dongliang <18588496441@163.com> Date: Sat, 21 Oct 2023 08:47:31 +0000 (+0800) Subject: __ses_path_jr() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=cf38d03e3cf0a2ad77433dfbe9543bf7a5521cb6;p=ses.git __ses_path_jr() --- diff --git a/ses_step_jr.c b/ses_step_jr.c index d666818..2547a4d 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -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);