From 3c51421902b0325560c36fb169eb203cb622643a Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Fri, 20 Oct 2023 14:40:27 +0800 Subject: [PATCH] __ses_path_pos(), __ses_path_neg() --- ses_core.h | 2 ++ ses_step_dc_input.c | 2 +- ses_step_output.c | 14 +++++++------- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/ses_core.h b/ses_core.h index a16ca8d..ed0a941 100644 --- a/ses_core.h +++ b/ses_core.h @@ -115,6 +115,8 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count); void __ses_path_split_i(ScfEfunction* f, ses_path_t* path, int i, int j, double la, double jla, double* a, double* ja); void __ses_path_pr (ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1, double* r, double* jr); void __ses_path_sr (ScfEfunction* f, ses_path_t* path, int i, int j, ScfEpin* cp1, double* r, double* jr); +int __ses_path_pos (ScfEfunction* f, ScfEline* el); +int __ses_path_neg (ScfEfunction* f, ScfEline* el); static inline void vertical(int* px, int* py, int dx, int dy, int d) { diff --git a/ses_step_dc_input.c b/ses_step_dc_input.c index 212beb3..2daed43 100644 --- a/ses_step_dc_input.c +++ b/ses_step_dc_input.c @@ -17,7 +17,7 @@ static int _dc_input_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx if (SCF_EDA_PIN_IN & el->flags) { - el->v = (0x1) * B->v; + el->v = (0x0) * B->v; el->vconst = 1; scf_logw("IN el: %ld, V: %lg\n", el->id, el->v); diff --git a/ses_step_output.c b/ses_step_output.c index bd90030..0b8a77b 100644 --- a/ses_step_output.c +++ b/ses_step_output.c @@ -1,6 +1,6 @@ #include"ses_core.h" -int __dfs_path_pos(ScfEfunction* f, ScfEline* el) +static int __dfs_path_pos(ScfEfunction* f, ScfEline* el) { ScfEcomponent* c; ScfEcomponent* c2; @@ -64,7 +64,7 @@ int __dfs_path_pos(ScfEfunction* f, ScfEline* el) return 0; } -int __dfs_path_neg(ScfEfunction* f, ScfEline* el) +static int __dfs_path_neg(ScfEfunction* f, ScfEline* el) { ScfEcomponent* c; ScfEpin* p; @@ -112,7 +112,7 @@ int __dfs_path_neg(ScfEfunction* f, ScfEline* el) return 0; } -int dfs_path_pos(ScfEfunction* f, ScfEline* el) +int __ses_path_pos(ScfEfunction* f, ScfEline* el) { ScfEcomponent* c; ScfEpin* p; @@ -132,7 +132,7 @@ int dfs_path_pos(ScfEfunction* f, ScfEline* el) return __dfs_path_pos(f, el); } -int dfs_path_neg(ScfEfunction* f, ScfEline* el) +int __ses_path_neg(ScfEfunction* f, ScfEline* el) { ScfEcomponent* c; ScfEpin* p; @@ -166,12 +166,12 @@ static int _output_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t if (SCF_EDA_PIN_OUT & el->flags) { - if (dfs_path_pos(f, el)) { + if (__ses_path_pos(f, el)) { - if (!dfs_path_neg(f, el)) + if (!__ses_path_neg(f, el)) el->v = Bp->v; - } else if (dfs_path_neg(f, el)) + } else if (__ses_path_neg(f, el)) el->v = Bn->v; else return -EINVAL; -- 2.25.1