From 92a1d7637dace612eb8a5a7c1c6cc7624464b23d Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Fri, 28 Jul 2023 00:05:43 +0800 Subject: [PATCH] topo layers --- ses_step_topo.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) 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); -- 2.25.1