From: yu.dongliang <18588496441@163.com> Date: Sun, 30 Jul 2023 14:33:10 +0000 (+0800) Subject: merge parallel connections X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=bd38683c4a7c5c026fd4bb393ed5e2554902fd9b;p=ses.git merge parallel connections --- 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)