branch path
authoryu.dongliang <18588496441@163.com>
Wed, 26 Jul 2023 13:59:46 +0000 (21:59 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 26 Jul 2023 13:59:46 +0000 (21:59 +0800)
scf_eda_pb.h
ses_step_topo.c

index e4aff68be663bc9132a7d40805500fdb6f7f9c2f..75e92a30778cd2e0938e7ebb89090df126449b26 100644 (file)
@@ -43,6 +43,7 @@ enum {
        SCF_EDA_Status_ON,
        SCF_EDA_Status_OFF,
        SCF_EDA_Path_OFF,
+       SCF_EDA_Path_TO,
 };
 
 enum {
index fc09978555081acb0f2214ce2dcbf466e1cca8b1..88890d03a9d6725e5bfca0e7662c75a55791fed1 100644 (file)
@@ -44,7 +44,7 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
 
                if (np->vflag) {
                        if (rp != np)
-                               scf_loge("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag);
+                               scf_logd("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag);
                        continue;
                }
 
@@ -88,9 +88,15 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
                        c  = f->components[el->pins[j]];
                        p  = c->pins      [el->pins[j + 1]];
 
+                       if (p->pflag && p != np) {
+                               scf_loge("branch: c%ld_p%ld, l%ld\n", c->id, p->id, el->id);
+                               ret = SCF_EDA_Path_TO;
+                               goto end;
+                       }
+
                        if (p->vflag) {
                                if (p != np)
-                                       scf_loge("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", p->cid, p->id, p->lid, p->vflag, p->pflag);
+                                       scf_logd("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", p->cid, p->id, p->lid, p->vflag, p->pflag);
                                continue;
                        }
 
@@ -101,24 +107,24 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
                        if (ret < 0)
                                return ret;
 
-                       if (SCF_EDA_Status_OFF == ret)
-                               scf_loge("off: c%ld_p%ld, l%ld\n", p->cid, p->id, p->lid);
-                       else if (SCF_EDA_Path_OFF == ret) {
+                       if (SCF_EDA_Path_OFF == ret) {
                                p->vflag = 0;
                                scf_logw("off: c%ld_p%ld, l%ld\n", p->cid, p->id, p->lid);
-                       }
+
+                       } else if (SCF_EDA_Status_OFF == ret)
+                               scf_loge("off: c%ld_p%ld, l%ld\n", p->cid, p->id, p->lid);
                }
 
                if (ret > 0) {
                        if (*ppath)
                                scf_vector_del(*ppath, np);
 
-                       if (SCF_EDA_Status_OFF == ret)
-                               scf_loge("off: c%ld_p%ld, l%ld, *ppath: %p\n", np->cid, np->id, np->lid, *ppath);
-                       else if (SCF_EDA_Path_OFF == ret) {
+                       if (SCF_EDA_Path_OFF == ret) {
                                np->vflag = 0;
                                scf_logw("off: c%ld_p%ld, l%ld\n", np->cid, np->id, np->lid);
-                       }
+
+                       } else if (SCF_EDA_Status_OFF == ret)
+                               scf_loge("off: c%ld_p%ld, l%ld, *ppath: %p\n", np->cid, np->id, np->lid, *ppath);
                }
        }
 
@@ -126,14 +132,15 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
                if (*ppath)
                        scf_vector_del(*ppath, rp);
 
-               if (SCF_EDA_Status_OFF == ret)
-                       scf_loge("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid);
-               else if (SCF_EDA_Path_OFF == ret) {
+               if (SCF_EDA_Path_OFF == ret) {
                        rp->vflag = 0;
                        scf_logw("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid);
-               }
+
+               } else if (SCF_EDA_Status_OFF == ret)
+                       scf_loge("off: c%ld_p%ld, l%ld\n", rp->cid, rp->id, rp->lid);
        }
 
+end:
        return ret;
 }
 
@@ -194,7 +201,7 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t*
                if (!path)
                        continue;
 
-               if (ret > 0) {
+               if (SCF_EDA_Status_OFF == ret || SCF_EDA_Path_OFF == ret) {
                        scf_vector_clear(path, NULL);
                        continue;
                }