From b1786349da86df5f30c1aab3dfcc24f767d46e92 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 10 Sep 2023 20:43:22 +0800 Subject: [PATCH] tmp --- ses_step_jr.c | 9 +++++---- ses_step_va.c | 25 +++++++++++++++---------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/ses_step_jr.c b/ses_step_jr.c index d56375d..d7d5866 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -48,7 +48,7 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) p->pr = r; p->jpr = jr; - scf_loge("i: %d, c%ldp%ld, p->tr: %lg, p->jtr: %lg\n", i, p->cid, p->id, p->sr, p->jsr); + scf_loge("i: %d, c%ldp%ld, p->sr: %lg + j%lg\n", i, p->cid, p->id, p->sr, p->jsr); } printf("\n"); @@ -111,13 +111,15 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) r = r / R; jr = -jr / R; + scf_logw("j: %d, c%ldp%ld, p1->pr: %lg + j%lg, p1->sr: %lg + j%lg, r: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr, r, jr); + double dr = p1->pr - (p0->pr + r); double jdr = p1->jpr - (p0->jpr + jr); p1->pr -= dr; p1->jpr -= jdr; - scf_logw("j: %d, c%ldp%ld, p->pr: %lg + j%lg, p->sr: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr); + scf_logw("j: %d, c%ldp%ld, p->pr: %lg + j%lg, p->sr: %lg + j%lg, dr: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr, dr, jdr); for (++j; j < path->pins->size; j++) { p = path->pins->data[j]; @@ -140,8 +142,7 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) path->r = p->pr; path->jr = p->jpr; - scf_loge("path: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg\n", - path->index, path->r, path->jr, path->r0, path->jr0); + scf_loge("path: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg\n", path->index, path->r, path->jr, path->r0, path->jr0); return 0; } diff --git a/ses_step_va.c b/ses_step_va.c index b0f15a5..357c9a7 100644 --- a/ses_step_va.c +++ b/ses_step_va.c @@ -39,12 +39,13 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path) double v = p0->v - p1->v; double jv = p0->jv - p1->jv; - double a = 0; - double ja = 0; - ses_ur_i(&a, &ja, v, jv, path->r, path->jr); + ses_ur_i(&path->a, &path->ja, v, jv, path->r, path->jr); - scf_loge("path: %d, v: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n", path->index, v, jv, path->r, path->jr, a, ja); + scf_loge("path: %d, v: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n", path->index, v, jv, path->r, path->jr, path->a, path->ja); + + double a = path->a; + double ja = path->ja; double r = 0; double jr = 0; @@ -119,6 +120,8 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path) r += p->r + p->dr; jr += p->jr + p->jdr; + scf_logw("path: %d, i: %d, c%ldp%ld, r: %lg + j%lg, p->r: %lg + j%lg, p->dr: %lg + j%lg\n", path->index, i, p->cid, p->id, r, jr, p->r, p->jr, p->dr, p->jdr); + if (i & 0x1) { r += c->r; jr += c->jr; @@ -128,12 +131,6 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path) ses_ur_i(&p->a, &p->ja, dv, jdv, r, jr); - scf_loge("path: %d, i: %d, c%ldp%ld, p->v: %lg + j%lg, dv: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n\n", path->index, i, p->cid, p->id, - p->v, p->jv, dv, jdv, r, jr, p->a, p->ja); - - r = 0; - jr = 0; - if (path->childs) { for (j = 0; j < path->childs->size; j++) { child = path->childs->data[j]; @@ -144,10 +141,18 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path) if (p->lid == cp1->lid) { a += child->a; ja += child->ja; + + scf_logd("path: %d, i: %d, c%ldp%ld, child->a: %lg + j%lg\n", child->index, i, cp1->cid, cp1->id, child->a, child->ja); } } } + scf_loge("path: %d, i: %d, c%ldp%ld, p->v: %lg + j%lg, dv: %lg + j%lg, r: %lg + j%lg, p->a: %lg + j%lg, a: %lg + j%lg\n\n", path->index, i, p->cid, p->id, + p->v, p->jv, dv, jdv, r, jr, p->a, p->ja, a, ja); + + r = 0; + jr = 0; + } else { dv = p->v; jdv = p->jv; -- 2.25.1