merge parallel connections
authoryu.dongliang <18588496441@163.com>
Sun, 30 Jul 2023 14:33:10 +0000 (22:33 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 30 Jul 2023 14:33:10 +0000 (22:33 +0800)
ses_step_topo.c

index 4c8958fe96e915e0c19b5db9393913366fd835b4..0b70cd94dc175c2bbf4f4c42db867229994161b3 100644 (file)
@@ -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)