From e236205fa247713c116c8a17c24b0e8934c70ed8 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Fri, 8 Sep 2023 16:35:15 +0800 Subject: [PATCH] tmp --- ses_step_va_transistor.c | 55 ++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 30 deletions(-) diff --git a/ses_step_va_transistor.c b/ses_step_va_transistor.c index bfd93df..913f368 100644 --- a/ses_step_va_transistor.c +++ b/ses_step_va_transistor.c @@ -67,10 +67,11 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) ses_path_t* child; ScfEcomponent* c; ScfEline* el; - ScfEpin* p; ScfEpin* p0; ScfEpin* p1; - ScfEpin* p2; + ScfEpin* pb; + ScfEpin* pc; + ScfEpin* pe; int i; int j; @@ -96,10 +97,10 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) double jsr; for (i = 1; i < path->pins->size - 1; i++) { - p = path->pins->data[i]; + pb = path->pins->data[i]; - el = f->elines [p->lid]; - c = f->components[p->cid]; + el = f->elines [pb->lid]; + c = f->components[pb->cid]; if (!el->vconst) continue; @@ -107,40 +108,34 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) if (SCF_EDA_Transistor != c->type) continue; - p->v = el->v; - p->jv = el->jv; + pb->v = el->v; + pb->jv = el->jv; - if (SCF_EDA_Transistor_B == p->id) { - - v = p0->v - p->v; - jv = p0->jv - p->jv; - - pr = p->pr - p0->pr; - jpr = p->jpr - p0->jpr; - - sr = p->sr - p0->sr; - jsr = p->jsr - p0->jsr; - - ses_ur_i(&el->a, &el->ja, v, jv, pr, jpr); + if (SCF_EDA_Transistor_B != pb->id) + continue; - p->a = el->a; - p->ja = el->ja; - el->aconst = 1; + v = p0->v - pb->v; + jv = p0->jv - pb->jv; - if (path->childs) - __ses_path_split_i(path, p, p1, el, &p->a, &p->ja); + pr = pb->pr - p0->pr; + jpr = pb->jpr - p0->jpr; - __ses_path_dr(p, p1, p); + sr = pb->sr - p0->sr; + jsr = pb->jsr - p0->jsr; - scf_loge("i: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, p->v: %lg + j%lg, p->a: %lg + j%lg, pr: %lg + j%lg, sr: %lg + j%lg, p->dr: %lg + j%lg\n", - i, p->cid, p->id, p1->cid, p1->id, v, jv, p->v, p->jv, p->a, p->ja, pr, jpr, sr, jsr, p->dr, p->jdr); + ses_ur_i(&el->a, &el->ja, v, jv, pr, jpr); + pb->a = el->a; + pb->ja = el->ja; + el->aconst = 1; - } else if (SCF_EDA_Transistor_C == p->id) { + if (path->childs) + __ses_path_split_i(path, pb, p1, el, &pb->a, &pb->ja); - } else { + __ses_path_dr(pb, p1, pb); - } + scf_loge("i: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, pb->v: %lg + j%lg, pb->a: %lg + j%lg, pr: %lg + j%lg, sr: %lg + j%lg, pb->dr: %lg + j%lg\n", + i, pb->cid, pb->id, p1->cid, p1->id, v, jv, pb->v, pb->jv, pb->a, pb->ja, pr, jpr, sr, jsr, pb->dr, pb->jdr); } printf("\n"); -- 2.25.1