From 321016bdca63ac311e1cfa0fc514176310b7e7a4 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Thu, 19 Oct 2023 16:31:21 +0800 Subject: [PATCH] __ses_path_parent_jr() --- ses_step_jr.c | 20 +++----------------- ses_steps.c | 4 ++-- 2 files changed, 5 insertions(+), 19 deletions(-) diff --git a/ses_step_jr.c b/ses_step_jr.c index 2b617bf..22d785f 100644 --- a/ses_step_jr.c +++ b/ses_step_jr.c @@ -19,6 +19,7 @@ void __ses_path_pr(ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1 else { *r = 0; *jr = 0; + return; } } @@ -194,17 +195,8 @@ static void __ses_path_parent_jr(ScfEfunction* f, ses_path_t* path) for (i = 0; i < path->childs->size; i++) { child = path->childs->data[i]; - child->parent_r0 = 0; - child->parent_jr0 = 0; - - child->parent_r1 = 0; - child->parent_jr1 = 0; - - if (child->parent_p0 > 0) - __ses_path_pr(f, path, 0, child->parent_p0, NULL, &child->parent_r0, &child->parent_jr0); - - if (child->parent_p1 < path->pins->size - 1) - __ses_path_pr(f, path, child->parent_p1, path->pins->size - 1, NULL, &child->parent_r1, &child->parent_jr1); + __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); child->parent_r0 += path->parent_r0; child->parent_jr0 += path->parent_jr0; @@ -241,12 +233,6 @@ static int _jr_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* ct if (ret < 0) return ret; - path->parent_r0 = 0; - path->parent_jr0 = 0; - - path->parent_r1 = 0; - path->parent_jr1 = 0; - __ses_path_parent_jr(f, path); printf("\n"); } diff --git a/ses_steps.c b/ses_steps.c index 8b5938f..203a479 100644 --- a/ses_steps.c +++ b/ses_steps.c @@ -38,10 +38,10 @@ static ses_step_t* ses_steps_1[] = &ses_step_topo, &ses_step_jr, -#if 0 + &ses_step_va_diode, &ses_step_va_transistor, - +#if 0 &ses_step_jr, &ses_step_va, &ses_step_va_balance, -- 2.25.1