__ses_path_parent_jr()
authoryu.dongliang <18588496441@163.com>
Thu, 19 Oct 2023 08:31:21 +0000 (16:31 +0800)
committeryu.dongliang <18588496441@163.com>
Thu, 19 Oct 2023 08:31:21 +0000 (16:31 +0800)
ses_step_jr.c
ses_steps.c

index 2b617bfe5665af064a8ba135dbeb685f3a9a6a18..22d785f2a14355c00e364991b3cc546843eee9ea 100644 (file)
@@ -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");
        }
index 8b5938fd58f730aeb724c53033b9118b9a3e7c42..203a4799d976f294db712966cb2882146f90ea2b 100644 (file)
@@ -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,