__ses_path_va()
authoryu.dongliang <18588496441@163.com>
Mon, 11 Sep 2023 05:52:26 +0000 (13:52 +0800)
committeryu.dongliang <18588496441@163.com>
Mon, 11 Sep 2023 05:52:26 +0000 (13:52 +0800)
ses_step_dc_input.c
ses_step_va.c

index 2daed43d333c38e1b594e722cfb0cd0411eae975..bef68ea1af13a7018721de7fcd8d978290fb0dd2 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 = (0x0) * B->v;
+                       el->v = (i & 0x1) * B->v;
                        el->vconst = 1;
 
                        scf_logw("IN el: %ld, V: %lg\n", el->id, el->v);
index 77be93108edc23cca838a664fd31d45f0ca78b6c..d57d842889c8c519aba7aee05155586944e768ef 100644 (file)
@@ -15,6 +15,7 @@ static int __ses_path_split_a(ScfEfunction* f, ses_path_t* path, int i, double*
 
        int j;
        int k;
+       int n = 0;
 
        p = path->pins->data[i];
 
@@ -67,9 +68,11 @@ static int __ses_path_split_a(ScfEfunction* f, ses_path_t* path, int i, double*
                int ret = __ses_path_va(f, child);
                if (ret < 0)
                        return ret;
+
+               n++;
        }
 
-       return 0;
+       return n;
 }
 
 static int __ses_path_split_v(ScfEfunction* f, ses_path_t* path, ScfEpin* p0, int i, double a, double ja)
@@ -108,7 +111,7 @@ static int __ses_path_split_v(ScfEfunction* f, ses_path_t* path, ScfEpin* p0, in
 
                ses_ir_u(&v, &jv, a, ja, r, jr);
 
-               scf_logd("c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p->cid, p->id, a, ja, r, jr, v, jv);
+               scf_logd("c%ldp%ld, c%ldp%ld, a: %lg + j%lg, r: %lg + j%lg, v: %lg + j%lg\n", p0->cid, p0->id, p->cid, p->id, a, ja, r, jr, v, jv);
        }
 
        p->v  = p0->v  - v;
@@ -180,7 +183,10 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path)
                        if (ret < 0)
                                return ret;
 
-                       p0 = p;
+                       if (ret > 0) {
+                               p0 = p;
+                               scf_logd("i: %d, p0: c%ldp%ld\n", i, p0->cid, p0->id);
+                       }
 
                } else {
                        int ret = __ses_path_split_v(f, path, p0, i, a, ja);