From 27fa24016be1e4a849f14a06ffc26f1029c0545b Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 23 Oct 2023 20:57:52 +0800 Subject: [PATCH] Revert "delete some logs" This reverts commit aee65383950c38e997911d316ba2d301ca0b0189. --- scf_eda_pb.h | 7 ++----- ses_step_dc_transistor.c | 8 ++++---- ses_step_topo.c | 23 +++++++++++++---------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/scf_eda_pb.h b/scf_eda_pb.h index cb537e6..5fdb4ba 100644 --- a/scf_eda_pb.h +++ b/scf_eda_pb.h @@ -29,11 +29,8 @@ enum { #define SCF_EDA_V_MIN -10000000.0 #define SCF_EDA_V_MAX 10000000.0 -#define SCF_EDA_V_Diode_ON 0.680 -#define SCF_EDA_V_Diode_OFF 0.700 - -#define SCF_EDA_V_NPN_ON 0.690 -#define SCF_EDA_V_NPN_OFF 0.685 +#define SCF_EDA_V_Diode_ON 0.69 +#define SCF_EDA_V_Diode_OFF 0.70 enum { SCF_EDA_Battery_NEG, diff --git a/ses_step_dc_transistor.c b/ses_step_dc_transistor.c index 6bcba87..ccf5863 100644 --- a/ses_step_dc_transistor.c +++ b/ses_step_dc_transistor.c @@ -46,7 +46,7 @@ static int _dc_transistor_handler(ScfEfunction* f, int64_t ns, int64_t count, se continue; pe->v = le->v; - pb->v = le->v + SCF_EDA_V_NPN_ON; + pb->v = le->v + SCF_EDA_V_Diode_ON; lb->v = pb->v; if (le->v == Bn->v) @@ -57,7 +57,7 @@ static int _dc_transistor_handler(ScfEfunction* f, int64_t ns, int64_t count, se } else if (le->v < SCF_EDA_V_MIN) { pb->v = lb->v; - pe->v = lb->v - SCF_EDA_V_NPN_ON; + pe->v = lb->v - SCF_EDA_V_Diode_ON; le->v = pe->v; if (lb->v == Bp->v) @@ -65,7 +65,7 @@ static int _dc_transistor_handler(ScfEfunction* f, int64_t ns, int64_t count, se c->status = SCF_EDA_Status_ON; - } else if (lb->v >= le->v + SCF_EDA_V_NPN_OFF) { + } else if (lb->v >= le->v + SCF_EDA_V_Diode_OFF) { if (le->v == Bn->v) { if (lb->v == Bp->v) { @@ -78,7 +78,7 @@ static int _dc_transistor_handler(ScfEfunction* f, int64_t ns, int64_t count, se } else if (lb->v == Bp->v) le->vconst = 1; - lb->v = le->v + SCF_EDA_V_NPN_ON; + lb->v = le->v + SCF_EDA_V_Diode_ON; pb->v = lb->v; pe->v = le->v; diff --git a/ses_step_topo.c b/ses_step_topo.c index aa105b4..e336659 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -32,7 +32,7 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ if (SCF_EDA_NPN != rc->type || SCF_EDA_NPN_E != rp->id) rp->vflag = 1; - scf_logd("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", rp->cid, rp->id, rp->lid, rp->vflag, rp->pflag); + scf_logi("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", rp->cid, rp->id, rp->lid, rp->vflag, rp->pflag); int ret = 0; @@ -45,12 +45,12 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ if (SCF_EDA_NPN == rc->type && SCF_EDA_NPN_E != np->id) continue; - scf_logd("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag); + scf_logi("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag); el = f->elines[np->lid]; if (SCF_EDA_PIN_POS & el->flags) { - scf_logd("pos l%ld\n\n", el->id); + scf_loge("pos l%ld\n\n", el->id); ret = SCF_EDA_Path_OFF; continue; @@ -69,7 +69,7 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ np->vflag = 1; if (SCF_EDA_PIN_NEG & el->flags) { - scf_logd("neg l%ld\n\n", el->id); + scf_loge("neg l%ld\n\n", el->id); if (scf_vector_add(__paths, *ppath) < 0) return -ENOMEM; @@ -91,7 +91,7 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ p = c->pins [el->pins[j + 1]]; if (p->pflag && p != np && *ppath) { - scf_logd("branch: c%ld_p%ld, l%ld\n", c->id, p->id, el->id); + scf_loge("branch: c%ld_p%ld, l%ld\n", c->id, p->id, el->id); if ((*ppath)->pins->size > 0) { if (scf_vector_add(__paths, *ppath) < 0) @@ -140,10 +140,10 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ if (SCF_EDA_Path_OFF == ret) { rp->vflag = 0; - scf_logd("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid); + scf_logw("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid); } else if (SCF_EDA_Status_OFF == ret) - scf_logd("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid); + scf_loge("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid); } return ret; @@ -255,7 +255,7 @@ bridge_sp0: for (i = 0; i < path->bridges->size; i++) { sp0 = path->bridges->data[i]; - scf_logd("path: %d, i: %d, bridge: %d\n", path->index, i, sp0->index); + scf_loge("path: %d, i: %d, bridge: %d\n", path->index, i, sp0->index); } if (path->bridges->size <= 0) { @@ -398,7 +398,10 @@ static int _topo_print(scf_vector_t* paths) for (i = 0; i < paths->size; i++) { path = paths->data[i]; + scf_logi("i: %d, path->type: %d\n", i, path->type); + ses_path_print(path); + printf("\n"); } } @@ -447,13 +450,13 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* if (c == B) continue; - scf_logd("i: %ld\n", i); + scf_logw("i: %ld\n", i); int ret = __dfs_path(f, c, p, ctx->paths, &path); if (ret < 0) return ret; -// printf("ret: %d\n\n", ret); + printf("ret: %d\n\n", ret); if (!path) continue; -- 2.25.1