__ses_path_pos(), __ses_path_neg()
authoryu.dongliang <18588496441@163.com>
Fri, 20 Oct 2023 06:40:27 +0000 (14:40 +0800)
committeryu.dongliang <18588496441@163.com>
Fri, 20 Oct 2023 06:40:27 +0000 (14:40 +0800)
ses_core.h
ses_step_dc_input.c
ses_step_output.c

index a16ca8d114d5656aeeaf25558fb8a8ac6c08ef06..ed0a941582949edacfa24106be035d4094cc5534 100644 (file)
@@ -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)
 {
index 212beb355abac2816a63997b05603f449252f333..2daed43d333c38e1b594e722cfb0cd0411eae975 100644 (file)
@@ -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);
index bd90030c2ae2ac40efae1081358dac79c922f377..0b8a77b5aedbb6668d08a1b91d477e2783c5edf1 100644 (file)
@@ -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;