From f97e9d917e50ff57e5ca3dbf00574a64e6688b21 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 10 Sep 2023 13:29:50 +0800 Subject: [PATCH] __ses_path_split_i() --- ses_core.h | 2 +- ses_step_va_diode.c | 10 +++++----- ses_step_va_transistor.c | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ses_core.h b/ses_core.h index 5130d00..36a6f49 100644 --- a/ses_core.h +++ b/ses_core.h @@ -72,7 +72,7 @@ int ses_layout_board (ScfEboard* b); int ses_loop_function(ScfEfunction* f, scf_vector_t* loops); int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count); -void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja); +void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, double la, double jla, double* a, double* ja); void __ses_path_dr (ScfEpin* p0, ScfEpin* p1, ScfEpin* p); static inline void vertical(int* px, int* py, int dx, int dy, int d) diff --git a/ses_step_va_diode.c b/ses_step_va_diode.c index 7a7ce24..a98d1a4 100644 --- a/ses_step_va_diode.c +++ b/ses_step_va_diode.c @@ -1,6 +1,6 @@ #include"ses_core.h" -void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja) +void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, double la, double jla, double* a, double* ja) { ses_path_t* child; ScfEpin* cp0; @@ -22,7 +22,7 @@ void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el if (cp0->lid != p0->lid || cp1->lid != p1->lid) continue; - ses_split_i(&child->a, &child->ja, el->a, el->ja, child->r, child->jr, r, jr); + ses_split_i(&child->a, &child->ja, la, jla, child->r, child->jr, r, jr); *a -= child->a; *ja -= child->ja; @@ -41,7 +41,7 @@ void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el cp1->jdr -= child->jr; scf_loge("j: %d, c%ldp%ld--c%ldp%ld, v: %lg + j%lg, child->r: %lg + j%lg, child->a: %lg + j%lg, el->a: %lg + j%lg, cp1->dr: %lg + j%lg\n", - j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, jv, child->r, child->jr, child->a, child->ja, el->a, el->ja, cp1->dr, cp1->jdr); + j, cp0->cid, cp0->id, cp1->cid, cp1->id, v, jv, child->r, child->jr, child->a, child->ja, la, jla, cp1->dr, cp1->jdr); } } @@ -128,7 +128,7 @@ static int __ses_path_va_diode(ScfEfunction* f, ses_path_t* path) el->aconst = 1; if (path->childs) - __ses_path_split_i(path, p, p1, el, &p->a, &p->ja); + __ses_path_split_i(path, p, p1, el->a, el->ja, &p->a, &p->ja); __ses_path_dr(p, p1, p); @@ -163,7 +163,7 @@ static int __ses_path_va_diode(ScfEfunction* f, ses_path_t* path) p->ja = el->ja; if (path->childs) - __ses_path_split_i(path, p0, p, el, &p->a, &p->ja); + __ses_path_split_i(path, p0, p, el->a, el->ja, &p->a, &p->ja); __ses_path_dr(p0, p, p); diff --git a/ses_step_va_transistor.c b/ses_step_va_transistor.c index e253cbd..8b698e4 100644 --- a/ses_step_va_transistor.c +++ b/ses_step_va_transistor.c @@ -79,8 +79,8 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) if (path->childs) { - __ses_path_split_i(path, p0, pb, el, &p->a, &p->ja); - __ses_path_split_i(path, pb, p1, el, &pb->a, &pb->ja); + __ses_path_split_i(path, p0, pb, el->a, el->ja, &p->a, &p->ja); + __ses_path_split_i(path, pb, p1, el->a, el->ja, &pb->a, &pb->ja); } else { p0->a = el->a; @@ -166,7 +166,7 @@ static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) p->ja = el->ja; if (path->childs) - __ses_path_split_i(path, p0, pc, el, &p->a, &p->ja); + __ses_path_split_i(path, p0, pc, el->a, el->ja, &p->a, &p->ja); else { p0->a = el->a; p0->ja = el->ja; -- 2.25.1