From 14d8bb0ceb89e104959505f9d10a685c9699c052 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Thu, 16 Nov 2023 14:46:30 +0800 Subject: [PATCH] tmp --- ses_step_va_bridge.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/ses_step_va_bridge.c b/ses_step_va_bridge.c index 63d3bb6..c34cb26 100644 --- a/ses_step_va_bridge.c +++ b/ses_step_va_bridge.c @@ -128,7 +128,7 @@ int __ses_flow_v_neg(ScfEfunction* f, ses_flow_t* flow, double dv_vip, double dj p = path->pins->data[j]; if (j0 < 0) { - if (p->lid == vip->lid) + if (!(j & 0x1) && p->lid == vip->lid) j0 = j; else continue; @@ -320,12 +320,14 @@ static int __ses_path_va_bridge(ScfEfunction* f, ses_path_t* bridge, int* change scf_logw("flow vip: c%ldp%ld->a: %lg, fp0: c%ldp%ld->a: %lg, fp1: c%ldp%ld->a: %lg\n\n", flow->vip->cid, flow->vip->id, flow->vip->a, fp0->cid, fp0->id, fp0->a, fp1->cid, fp1->id, fp1->a); - double da = 0; - double dja = 0; + double da; + double dja; + + double v; + double jv; double a = 0; double ja = 0; - double Eta = 0.001; int k = 0; @@ -344,17 +346,17 @@ static int __ses_path_va_bridge(ScfEfunction* f, ses_path_t* bridge, int* change scf_loge("da: %lg, a: %lg\n", da, a); - double dv = flow->vip->v; - double djv = flow->vip->jv; + v = flow->vip->v; + jv = flow->vip->jv; ret = __ses_flow_a_pos(f, flow, a, ja); if (ret < 0) return ret; - dv = flow->vip->v - dv; - djv = flow->vip->jv - djv; + double dv = flow->vip->v - v; + double djv = flow->vip->jv - jv; - scf_logi("dv: %lg, ----------------\n", dv); + scf_logi("dv: %lg, v: %lg - %lg ----------------\n", dv, flow->vip->v, v); ret = __ses_flow_v_neg(f, flow, dv, djv); if (ret < 0) @@ -362,10 +364,10 @@ static int __ses_path_va_bridge(ScfEfunction* f, ses_path_t* bridge, int* change printf("\n"); k++; - } while (k < 20); + } while (k < 46); - double v = p0->v - p1->v; - double jv = p0->jv - p1->jv; + v = p0->v - p1->v; + jv = p0->jv - p1->jv; scf_loge("bridge: %d, c%ldp%ld--c%ldp%ld, v: %lg, p0->v: %lg, p1->v: %lg, n_diodes: %d, p0->a: %lg, p1->a: %lg\n", bridge->index, p0->cid, p0->id, p1->cid, p1->id, v, p0->v, p1->v, bridge->n_diodes, p0->a, p1->a); -- 2.25.1