From bd38683c4a7c5c026fd4bb393ed5e2554902fd9b Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 30 Jul 2023 22:33:10 +0800 Subject: [PATCH] merge parallel connections --- ses_step_topo.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/ses_step_topo.c b/ses_step_topo.c index 4c8958f..0b70cd9 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -164,8 +164,11 @@ static int _topo_layers(ses_ctx_t* ctx) { ses_path_t* path0; ses_path_t* path1; + ses_path_t* path2; ScfEpin* p0; ScfEpin* p1; + ScfEpin* p2; + ScfEpin* p3; ScfEpin* p; int i; @@ -211,6 +214,19 @@ branch: path1->childs = scf_vector_alloc(); if (!path1->childs) return -ENOMEM; + + } else { + for (j = 0; j < path1->childs->size; j++) { + path2 = path1->childs->data[j]; + + p2 = path2->pins->data[0]; + p3 = path2->pins->data[path2->pins->size - 1]; + + if (p2->lid == p0->lid && p3->lid == p1->lid) { + path1 = path2; + break; + } + } } if (scf_vector_del(ctx->paths, path0) < 0) -- 2.25.1