From: yu.dongliang <18588496441@163.com> Date: Wed, 25 Oct 2023 07:22:19 +0000 (+0800) Subject: tmp X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=3807730d1be626d077aa320f47a382e19f9c41a9;p=ses.git tmp --- diff --git a/ses_step_va_diode.c b/ses_step_va_diode.c index ac9cb7f..7b02a0d 100644 --- a/ses_step_va_diode.c +++ b/ses_step_va_diode.c @@ -43,13 +43,9 @@ void __ses_path_split_i(ScfEfunction* f, ses_path_t* path, int i, int j, double j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, child->r, r, child->a, la); } else { - int ret = __ses_path_va_diode(f, child); - if (ret < 0) { - scf_loge("ret: %d\n", ret); - + if (ret < 0) ses_split_i(&child->a, &child->ja, la, jla, child->r, child->jr, r, jr); - } scf_loge("j: %d, c%ldp%ld--c%ldp%ld, v: %lg, child->r: %lg, r: %lg, child->a: %lg, el->a: %lg\n", j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, child->r, r, child->a, la); @@ -299,7 +295,7 @@ static int __ses_path_va_diode(ScfEfunction* f, ses_path_t* path) double __vi = p0->v - SCF_EDA_V_Diode_ON * __ni; double __vj = p1->v + SCF_EDA_V_Diode_ON * __nj; - scf_logi("i: %d, j: %d, c%ldp%ld--c%ldp%ld, ni: %d, nj: %d, vi: %lg, vj: %lg\n", + scf_logd("i: %d, j: %d, c%ldp%ld--c%ldp%ld, ni: %d, nj: %d, vi: %lg, vj: %lg\n", i, j, pi->cid, pi->id, pj->cid, pj->id, __ni, __nj, __vi, __vj); pi->v = __vi; @@ -330,7 +326,10 @@ static int __ses_path_va_diode(ScfEfunction* f, ses_path_t* path) c = f->components[pj->cid]; - scf_logi("i: %d, j: %d, c%ldp%ld--c%ldp%ld, a: %lg\n", i, j, pi->cid, pi->id, pj->cid, pj->id, a); + path->a = a; + path->ja = ja; + + scf_logd("i: %d, j: %d, c%ldp%ld--c%ldp%ld, a: %lg\n", i, j, pi->cid, pi->id, pj->cid, pj->id, a); if (SCF_EDA_Diode == c->type && SCF_EDA_Diode_POS == pj->id) { @@ -360,7 +359,7 @@ static int __ses_path_va_diode(ScfEfunction* f, ses_path_t* path) pj->a = a; pj->ja = ja; - scf_logw("j: %d, c%ldp%ld--c%ldp%ld, v: %lg, pj->v: %lg, pj->a: %lg, pr: %lg, sr: %lg\n\n", + scf_logd("j: %d, c%ldp%ld--c%ldp%ld, v: %lg, pj->v: %lg, pj->a: %lg, pr: %lg, sr: %lg\n\n", j, pj->cid, pj->id, p1->cid, p1->id, v, pj->v, pj->a, pr, sr); if (path->childs) diff --git a/ses_step_va_transistor.c b/ses_step_va_transistor.c index 6b3016a..370e05f 100644 --- a/ses_step_va_transistor.c +++ b/ses_step_va_transistor.c @@ -67,10 +67,14 @@ int __ses_status_check(ScfEfunction* f, ScfEcomponent* c, ScfEpin* pb, ScfEpin* if (c->status != SCF_EDA_Status_OFF) { c->status = SCF_EDA_Status_OFF; + scf_logi("\033[34mc%ld, status: %d, pb->v: %lg, pe->v: %lg, diff: %lg, Von: %lg, Voff: %lg\033[0m\n", + c->id, c->status, pb->v, pe->v, pb->v - pe->v, Von, Voff); goto _changed; } } else if (SCF_EDA_Status_ON != c->status) { c->status = SCF_EDA_Status_ON; + scf_logi("\033[34mc%ld, status: %d, pb->v: %lg, pe->v: %lg, diff: %lg, Von: %lg, Voff: %lg\033[0m\n", + c->id, c->status, pb->v, pe->v, pb->v - pe->v, Von, Voff); goto _changed; } @@ -238,7 +242,7 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) el->ja = pc->ja; el->vconst = 1; - scf_logw("i: %d, c%ldp%ld--c%ldp%ld, v: %lg, pc->v: %lg, pc->a: %lg, pr: %lg, pc->dr: %lg\n", + scf_logd("i: %d, c%ldp%ld--c%ldp%ld, v: %lg, pc->v: %lg, pc->a: %lg, pr: %lg, pc->dr: %lg\n", i, p0->cid, p0->id, pc->cid, pc->id, v, pc->v, pc->a, pr, pc->dr); if (path->childs) { @@ -251,9 +255,7 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) p->v = el->v; p->jv = el->jv; - scf_logi("--------------\n"); __ses_path_split_i(f, path, 0, i - 1, el->a, el->ja, &p->a, &p->ja); - scf_logi("--------------\n\n"); } } else { p0->a = el->a;