topo layers
authoryu.dongliang <18588496441@163.com>
Thu, 27 Jul 2023 16:05:43 +0000 (00:05 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 27 Jul 2023 16:05:43 +0000 (00:05 +0800)
ses_step_topo.c

index 3a8910620f2db6fb1870b69e9f10aab09f0608d2..4c8958fe96e915e0c19b5db9393913366fd835b4 100644 (file)
@@ -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);