From: yu.dongliang <18588496441@163.com> Date: Thu, 27 Jul 2023 16:05:43 +0000 (+0800) Subject: topo layers X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=92a1d7637dace612eb8a5a7c1c6cc7624464b23d;p=ses.git topo layers --- diff --git a/ses_step_topo.c b/ses_step_topo.c index 3a89106..4c8958f 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -193,11 +193,14 @@ static int _topo_layers(ses_ctx_t* ctx) for (k = 0; k < path1->pins->size; k++) { p = path1->pins->data[k]; - if (p->lid == p0->lid || p->lid == p1->lid) { - n++; - if (2 == n) - goto branch; - } + if (p->lid == p0->lid) + n |= 0x1; + + if (p->lid == p1->lid) + n |= 0x2; + + if (0x3 == n) + goto branch; } } @@ -210,10 +213,10 @@ branch: return -ENOMEM; } - if (scf_vector_del(ctx->paths, path0) < 0) { - scf_loge("i: %d, ctx->paths->size: %d\n", i, ctx->paths->size); + if (scf_vector_del(ctx->paths, path0) < 0) return -1; - } + + scf_loge("path0: %d, path1: %d\n", path0->index, path1->index); if (scf_vector_add(path1->childs, path0) < 0) { ses_path_free(path0);