From: yu.dongliang <18588496441@163.com> Date: Sat, 28 Oct 2023 14:23:51 +0000 (+0800) Subject: __ses_path_sr() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=75f328a705193ab43aa13853d323d5c63ed3120a;p=ses.git __ses_path_sr() --- diff --git a/ses_step_dc_input.c b/ses_step_dc_input.c index ea0f5ab..736da1e 100644 --- a/ses_step_dc_input.c +++ b/ses_step_dc_input.c @@ -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; diff --git a/ses_step_jr.c b/ses_step_jr.c index fa3d9c9..ab5b724 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -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",