Revert "delete some logs"
authoryu.dongliang <18588496441@163.com>
Mon, 23 Oct 2023 12:57:52 +0000 (20:57 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 23 Oct 2023 12:57:52 +0000 (20:57 +0800)
This reverts commit aee65383950c38e997911d316ba2d301ca0b0189.

scf_eda_pb.h
ses_step_dc_transistor.c
ses_step_topo.c

index cb537e64091381cd80cd216857f617d161ec2086..5fdb4bae060af6be267b568f666fa1dfd031d66a 100644 (file)
@@ -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,
index 6bcba8709f9c6ce1f316194f0af73ec979f8ca4e..ccf5863be54591ad5b414aff6c3af3dd59fc14c7 100644 (file)
@@ -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;
 
index aa105b41aa01b0c36a1ecea8de7ff1a938989b54..e336659057c302d28c66f086990efcf596ffa685 100644 (file)
@@ -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;