From e866c81a9bc28bcb6ff2d58f708e9b25d2f3cb0c Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Mon, 23 Oct 2023 10:40:57 +0800 Subject: [PATCH] __ses_path_jr() --- ses_step_jr.c | 50 +++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 39 insertions(+), 11 deletions(-) diff --git a/ses_step_jr.c b/ses_step_jr.c index f6ad8cf..4d24f36 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -229,29 +229,57 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path) path->r = p->pr; path->jr = p->jpr; + if (path->bridges) { + + printf("\033[33mbridges:\033[0m\n"); + + for (i = path->bridges->size - 1; i >= 0; i--) { + child = path->bridges->data[i]; + + int ret = __ses_path_jr(f, child); + if (ret < 0) + return ret; + } + } + scf_loge("path: %d, r: %lg, r0: %lg\n\n", path->index, path->r, path->r0); return 0; } static void __ses_path_parent_jr(ScfEfunction* f, ses_path_t* path) { - if (!path->childs) - return; - - ses_path_t* child; + ses_path_t* sp; int i; - for (i = 0; i < path->childs->size; i++) { - child = path->childs->data[i]; + if (path->childs) { + + for (i = 0; i < path->childs->size; i++) { + sp = path->childs->data[i]; + + __ses_path_pr(f, path, 0, sp->parent_p0, NULL, &sp->parent_r0, &sp->parent_jr0); + __ses_path_pr(f, path, sp->parent_p1, path->pins->size - 1, NULL, &sp->parent_r1, &sp->parent_jr1); + + scf_logw("child: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n", + sp->index, sp->parent_p0, sp->parent_p1, sp->parent_r0, sp->parent_r1); + + __ses_path_parent_jr(f, sp); + } + } + + if (path->bridges) { - __ses_path_pr(f, path, 0, child->parent_p0, NULL, &child->parent_r0, &child->parent_jr0); - __ses_path_pr(f, path, child->parent_p1, path->pins->size - 1, NULL, &child->parent_r1, &child->parent_jr1); + for (i = 0; i < path->bridges->size; i++) { + sp = path->bridges->data[i]; - scf_logw("child: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n", - child->index, child->parent_p0, child->parent_p1, child->parent_r0, child->parent_r1); + __ses_path_pr(f, path, 0, sp->parent_p0, NULL, &sp->parent_r0, &sp->parent_jr0); + __ses_path_pr(f, path, sp->parent_p1, path->pins->size - 1, NULL, &sp->parent_r1, &sp->parent_jr1); - __ses_path_parent_jr(f, child); + scf_loge("bridges: %d, parent_p0: %d, parent_p1: %d, r0: %lg, r1: %lg\n", + sp->index, sp->parent_p0, sp->parent_p1, sp->parent_r0, sp->parent_r1); + + __ses_path_parent_jr(f, sp); + } } } -- 2.25.1