From: yu.dongliang <18588496441@163.com> Date: Tue, 17 Oct 2023 14:59:05 +0000 (+0800) Subject: fix: topo handler __dfs_path() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=522fe7002364a24f202f921a4adcbf175bc9adda;p=ses.git fix: topo handler __dfs_path() --- diff --git a/ses_step_topo.c b/ses_step_topo.c index 64aa14a..98a3b86 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -49,8 +49,7 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ if (SCF_EDA_PIN_POS & el->flags) { scf_loge("pos l%ld\n\n", el->id); - ret = SCF_EDA_Path_OFF; - np->vflag = 1; + ret = SCF_EDA_Path_OFF; continue; } @@ -91,13 +90,16 @@ int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, scf_vector_t* __ if (p->pflag && p != np && *ppath) { scf_loge("branch: c%ld_p%ld, l%ld\n", c->id, p->id, el->id); - if (scf_vector_add(__paths, *ppath) < 0) - return -ENOMEM; + if ((*ppath)->pins->size > 0) { + if (scf_vector_add(__paths, *ppath) < 0) + return -ENOMEM; - for (k = 0; k < (*ppath)->pins->size; k++) { - p = (*ppath)->pins->data[k]; - p->pflag = 1; - } + for (k = 0; k < (*ppath)->pins->size; k++) { + p = (*ppath)->pins->data[k]; + p->pflag = 1; + } + } else + ses_path_free(*ppath); *ppath = NULL; continue; @@ -298,7 +300,6 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* } } - scf_loge("ctx->paths: %p, ctx->paths->size: %d\n", ctx->paths, ctx->paths->size); scf_vector_clear(ctx->paths, ( void (*)(void*) )ses_path_free); B = f->components[0];