From: yu.dongliang <18588496441@163.com> Date: Tue, 10 Oct 2023 14:03:30 +0000 (+0800) Subject: tmp X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=1105c325ab0abb7b0e558a6bb04e306b0ea0c6ef;p=ses.git tmp --- diff --git a/ses_step_jr.c b/ses_step_jr.c index e88c28c..612d91a 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -8,8 +8,14 @@ void __ses_path_pr(ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1 ScfEcomponent* c0 = f->components[p0->cid]; ScfEcomponent* c1 = f->components[p1->cid]; - if (SCF_EDA_Transistor == c1->type && SCF_EDA_Transistor_E == p1->id && cp1 != p1) - p1 = path->pins->data[j - 1]; + if (SCF_EDA_Transistor == c1->type) { + + if (SCF_EDA_Transistor_E == p1->id) { + if (cp1 != p1) + p1 = path->pins->data[j - 1]; + } else + p1 = path->pins->data[j - 1]; + } if (SCF_EDA_Transistor == c0->type) { if (i > 0) { diff --git a/ses_step_topo.c b/ses_step_topo.c index 6f68509..d54c146 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -284,6 +284,7 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* p = c->pins[j]; p->vflag = 0; p->pflag = 0; + p->dr = 0; } } diff --git a/ses_step_va_diode.c b/ses_step_va_diode.c index 58fd699..76f994a 100644 --- a/ses_step_va_diode.c +++ b/ses_step_va_diode.c @@ -18,6 +18,8 @@ void __ses_path_split_i(ScfEfunction* f, ses_path_t* path, int i, int j, double __ses_path_pr(f, path, i, j, NULL, &r, &jr); + scf_logd("c%ldp%ld--c%ldp%ld, r: %lg\n", p0->cid, p0->id, p1->cid, p1->id, r); + int k; for (k = 0; k < path->childs->size; k++) { child = path->childs->data[k]; @@ -86,7 +88,8 @@ void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p) ses_ui_r(&p->dr, &p->jdr, v, jv, p->a, p->ja); - scf_logd("c%ldp%ld, v: %lg, r: %lg, p->a: %lg, p->dr: %lg\n", p->cid, p->id, v, r, p->a, p->dr); + scf_logw("c%ldp%ld, v: %lg, r: %lg, p1->sr: %lg, p0->sr: %lg, p->a: %lg, p->dr: %lg\n", + p->cid, p->id, v, r, p1->sr, p0->sr, p->a, p->dr); p->dr -= r; p->jdr -= jr; diff --git a/ses_step_va_transistor.c b/ses_step_va_transistor.c index a74b9ca..a2213b4 100644 --- a/ses_step_va_transistor.c +++ b/ses_step_va_transistor.c @@ -99,6 +99,9 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) p0->ja = el->ja; } + scf_logi("i: %d, c%ldp%ld-c%ldp%ld, pc->v: %lg, pc->a: %lg, p->a: %lg\n", + i, p0->cid, p0->id, pc->cid, pc->id, pc->v, pc->a, p->a); + __ses_path_dr(p, p1, pc); scf_loge("i: %d, c%ldp%ld--c%ldp%ld, v: %lg, pc->v: %lg, pc->a: %lg, pr: %lg, sr: %lg, pc->dr: %lg\n",