From 400ef77fe210e933b4bac23e47559b17ef2aa159 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 12 Nov 2023 17:49:22 +0800 Subject: [PATCH] ses_steps_analyse() --- ses_step_topo.c | 20 +++----------------- ses_steps.c | 4 ++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/ses_step_topo.c b/ses_step_topo.c index e979266..f1fdfb0 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -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; diff --git a/ses_steps.c b/ses_steps.c index 3797568..044cbc9 100644 --- a/ses_steps.c +++ b/ses_steps.c @@ -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); -- 2.25.1