__ses_path_split_i()
authoryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 05:29:50 +0000 (13:29 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 05:29:50 +0000 (13:29 +0800)
ses_core.h
ses_step_va_diode.c
ses_step_va_transistor.c

index 5130d007672fe1e1357c6392d215c3a9daffed65..36a6f49be39b12a4aa0d35735ceca4aff50aedc5 100644 (file)
@@ -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)
index 7a7ce2423047a9b9f3a2e2e96b2837c978a5cacd..a98d1a480facc58df4043e27fe6b65341a368802 100644 (file)
@@ -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);
 
index e253cbd10d6403187e93a138d1fe6ef9aeb541f8..8b698e4e380581e33ed349b057d2978d6915096a 100644 (file)
@@ -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;