From: yu.dongliang <18588496441@163.com> Date: Wed, 26 Jul 2023 13:59:46 +0000 (+0800) Subject: branch path X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=eb64da2e19b67cbdcd76d3aba362ce7ab6c9854b;p=ses.git branch path --- diff --git a/scf_eda_pb.h b/scf_eda_pb.h index e4aff68..75e92a3 100644 --- a/scf_eda_pb.h +++ b/scf_eda_pb.h @@ -43,6 +43,7 @@ enum { SCF_EDA_Status_ON, SCF_EDA_Status_OFF, SCF_EDA_Path_OFF, + SCF_EDA_Path_TO, }; enum { diff --git a/ses_step_topo.c b/ses_step_topo.c index fc09978..88890d0 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -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; }