From 48ed183137c892e4d9980521b89666a33d972779 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sat, 7 Oct 2023 14:18:59 +0800 Subject: [PATCH] __ses_path_split_v() --- ses_step_va.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/ses_step_va.c b/ses_step_va.c index 943b819..97c7502 100644 --- a/ses_step_va.c +++ b/ses_step_va.c @@ -76,6 +76,7 @@ static int __ses_path_split_a(ScfEfunction* f, ses_path_t* path, int i, double* n++; } + scf_logw("*****************\n"); return n; } @@ -97,32 +98,30 @@ static int __ses_path_split_v(ScfEfunction* f, ses_path_t* path, ScfEpin* p0, in r = p->sr - (p->r + p->dr ) - p0->sr; jr = p->jsr - (p->jr + p->jdr) - p0->jsr; - ses_ir_u(&v, &jv, a, ja, r, jr); - - scf_logd("c%ldp%ld, c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p0->cid, p0->id, p->cid, p->id, a, ja, r, jr, v, jv); - } else if (i >= 1) { p2 = path->pins->data[i - 1]; - r = p2->sr - p0->sr; - jr = p2->jsr - p0->jsr; - - ses_ir_u(&v, &jv, a, ja, r, jr); - - scf_logd("c%ldp%ld, c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p0->cid, p0->id, p->cid, p->id, a, ja, r, jr, v, jv); + if (p2 == p0) { + r = p0->r + p0->dr; + jr = p0->jr + p0->jdr; + } else { + r = p2->sr - p0->sr; + jr = p2->jsr - p0->jsr; + } } else return -EINVAL; } else { r = p->sr - p0->sr; jr = p->jsr - p0->jsr; - - ses_ir_u(&v, &jv, a, ja, r, jr); } + ses_ir_u(&v, &jv, a, ja, r, jr); + p->v = p0->v - v; p->jv = p0->jv - jv; + scf_logd("c%ldp%ld, c%ldp%ld, a: %lg, r: %lg, v: %lg\n", p0->cid, p0->id, p->cid, p->id, a, r, v); return 0; } -- 2.25.1