From d92f117e5e00d03d5c27c90981b74406fb9ae2df Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Fri, 8 Sep 2023 16:39:39 +0800 Subject: [PATCH] delete some unused code --- ses_core.h | 2 ++ ses_step_va_diode.c | 4 +-- ses_step_va_transistor.c | 62 ---------------------------------------- 3 files changed, 4 insertions(+), 64 deletions(-) diff --git a/ses_core.h b/ses_core.h index 6a2e12d..5130d00 100644 --- a/ses_core.h +++ b/ses_core.h @@ -72,6 +72,8 @@ 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_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 beda3d4..1e98b5f 100644 --- a/ses_step_va_diode.c +++ b/ses_step_va_diode.c @@ -1,6 +1,6 @@ #include"ses_core.h" -static 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, ScfEline* el, double* a, double* ja) { ses_path_t* child; ScfEpin* cp0; @@ -45,7 +45,7 @@ static void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEl } } -static void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p) +void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p) { double v = p0->v - p1->v; double jv = p0->jv - p1->jv; diff --git a/ses_step_va_transistor.c b/ses_step_va_transistor.c index 913f368..094b8cc 100644 --- a/ses_step_va_transistor.c +++ b/ses_step_va_transistor.c @@ -1,67 +1,5 @@ #include"ses_core.h" -static void __ses_path_split_i(ses_path_t* path, ScfEpin* p0, ScfEpin* p1, ScfEline* el, double* a, double* ja) -{ - ses_path_t* child; - ScfEpin* cp0; - ScfEpin* cp1; - - double v = p0->v - p1->v; - double jv = p0->jv - p1->jv; - - double r = p1->pr - p0->pr; - double jr = p1->jpr - p0->jpr; - - int j; - for (j = 0; j < path->childs->size; j++) { - child = path->childs->data[j]; - - cp0 = child->pins->data[0]; - cp1 = child->pins->data[child->pins->size - 1]; - - 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); - - *a -= child->a; - *ja -= child->ja; - - cp0->a = child->a; - cp0->ja = child->ja; - cp1->a = child->a; - cp1->ja = child->ja; - - double cr; - double jcr; - - ses_ui_r(&cp1->dr, &cp1->jdr, v, jv, child->a, child->ja); - - cp1->dr -= child->r; - 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); - } -} - -static void __ses_path_dr(ScfEpin* p0, ScfEpin* p1, ScfEpin* p) -{ - double v = p0->v - p1->v; - double jv = p0->jv - p1->jv; - - double r = p1->sr - p0->sr; - double jr = p1->jsr - p0->jsr; - - ses_ui_r(&p->dr, &p->jdr, v, jv, p->a, p->ja); - - scf_logd("c%ldp%ld, v: %lg + j%lg, r: %lg + j%lg, p->a: %lg + j%lg, p->dr: %lg + j%lg\n", p->cid, p->id, - v, jv, r, jr, p->a, p->ja, p->dr, p->jdr); - - p->dr -= r; - p->jdr -= jr; -} - static int __ses_path_va_transistor(ScfEfunction* f, ses_path_t* path) { ses_path_t* child; -- 2.25.1