ses_steps_analyse()
authoryu.dongliang <18588496441@163.com>
Sun, 12 Nov 2023 09:49:22 +0000 (17:49 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 12 Nov 2023 09:49:22 +0000 (17:49 +0800)
ses_step_topo.c
ses_steps.c

index e979266109dce832d4c457d12bb91f01e42a0358..f1fdfb0f55c906d0581ba7be6303e93064becb5f 100644 (file)
@@ -297,12 +297,12 @@ static int __topo_path_xchg(ses_path_t* path0, int k0, ses_path_t* path1, int k1
 
        int i;
 
-       scf_logi("path0: %d, k0: %d ... path1: %d, k1: %d\n", path0->pins->size, k0, path1->pins->size, k1);
+       scf_logd("path0: %d, k0: %d ... path1: %d, k1: %d\n", path0->pins->size, k0, path1->pins->size, k1);
 
        for (i = 0; i + k0 < path0->pins->size && i + k1 < path1->pins->size; i++)
                SCF_XCHG(path0->pins->data[i + k0], path1->pins->data[i + k1]);
 
-       scf_logi("path0: %d, k0: %d ... path1: %d, k1: %d, i: %d\n", path0->pins->size, k0, path1->pins->size, k1, i);
+       scf_logd("path0: %d, k0: %d ... path1: %d, k1: %d, i: %d\n", path0->pins->size, k0, path1->pins->size, k1, i);
 
        if (i + k0 < path0->pins->size) {
 
@@ -329,7 +329,6 @@ static int __topo_path_xchg(ses_path_t* path0, int k0, ses_path_t* path1, int k1
                }
        }
 
-       scf_logi("path0: %d, k0: %d ... path1: %d, k1: %d, i: %d\n", path0->pins->size, k0, path1->pins->size, k1, i);
        return 0;
 }
 
@@ -372,10 +371,6 @@ static int _topo_path_completes(ScfEfunction* f, scf_vector_t* paths)
                        if (path1 == path0)
                                continue;
 
-                       scf_loge("i: %d, j: %d, path1: %p\n", i, j, path1);
-                       scf_loge("i: %d, j: %d, path1->pins: %p\n", i, j, path1->pins);
-                       scf_loge("i: %d, j: %d, path1->pins->size: %d\n\n", i, j, path1->pins->size);
-
                        p2 = path1->pins->data[0];
                        p3 = path1->pins->data[path1->pins->size - 1];
 
@@ -388,7 +383,7 @@ static int _topo_path_completes(ScfEfunction* f, scf_vector_t* paths)
                        for (k = path1->pins->size - 1; k >= 0; k -= 2) {
                                p  = path1->pins->data[k];
 
-                               if (p->lid == p1->lid)
+                               if (p->lid == p0->lid)
                                        break;
                        }
 
@@ -397,15 +392,11 @@ static int _topo_path_completes(ScfEfunction* f, scf_vector_t* paths)
                                                p2->cid, p2->id, p->cid,  p->id,
                                                p0->cid, p0->id, p1->cid, p1->id);
 
-                               scf_logi("path size: %d ... %d\n", path0->pins->size, path1->pins->size);
                                int ret = __topo_path_xchg(path0, 0, path1, k + 1);
                                if (ret < 0)
                                        return ret;
-                               scf_logw("path size: %d ... %d\n", path0->pins->size, path1->pins->size);
 
                                if (path0->pins->size <= 0) {
-                                       scf_loge("free path0: %d\n", path0->index);
-
                                        if (scf_vector_del(paths, path0) < 0)
                                                return -1;
 
@@ -427,16 +418,11 @@ static int _topo_path_completes(ScfEfunction* f, scf_vector_t* paths)
                                                p2->cid, p2->id, p3->cid, p3->id,
                                                p ->cid, p ->id, p1->cid, p1->id);
 
-                               scf_logi("path size: %d ... %d, k: %d\n", path0->pins->size, path1->pins->size, k);
-
                                int ret = __topo_path_xchg(path0, k, path1, path1->pins->size);
                                if (ret < 0)
                                        return ret;
-                               scf_logw("path size: %d ... %d, k: %d\n\n", path0->pins->size, path1->pins->size, k);
 
                                if (path0->pins->size <= 0) {
-                                       scf_loge("free path0: %d\n", path0->index);
-
                                        if (scf_vector_del(paths, path0) < 0)
                                                return -1;
 
index 3797568666d14d8940978386b1344aa9f029ca43..044cbc92bcf8c946bf7e101167eb50e19858cc48 100644 (file)
@@ -39,11 +39,11 @@ static ses_step_t*  ses_steps_1[] =
 //     &ses_step_simplify,
        &ses_step_topo,
 
-#if 0
        &ses_step_jr,
 
        &ses_step_va_diode,
        &ses_step_va_transistor,
+#if 1
        &ses_step_jr,
        &ses_step_va,
        &ses_step_va_bridge,
@@ -144,7 +144,7 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count)
                        return ret;
 
                int j;
-               for (j = 0; j < 1; j++) {
+               for (j = 0; j < 3; j++) {
                        printf("\n\033[33m%s(), %d(), j: %d\033[0m\n", __func__, __LINE__, j);
 
                        ret = __ses_steps_analyse(f, ns, i, ctx);