tmp
authoryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 12:43:22 +0000 (20:43 +0800)
committeryu.dongliang <18588496441@163.com>
Sun, 10 Sep 2023 12:43:22 +0000 (20:43 +0800)
ses_step_jr.c
ses_step_va.c

index d56375d6bbe8946791c4dd7d874a396304258953..d7d586616cb4ab7ebd71c10f92c630c2a338f509 100644 (file)
@@ -48,7 +48,7 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path)
                p->pr  = r;
                p->jpr = jr;
 
-               scf_loge("i: %d, c%ldp%ld, p->tr: %lg, p->jtr: %lg\n", i, p->cid, p->id, p->sr, p->jsr);
+               scf_loge("i: %d, c%ldp%ld, p->sr: %lg + j%lg\n", i, p->cid, p->id, p->sr, p->jsr);
        }
        printf("\n");
 
@@ -111,13 +111,15 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path)
                        r   =  r  / R;
                        jr  = -jr / R;
 
+                       scf_logw("j: %d, c%ldp%ld, p1->pr: %lg + j%lg, p1->sr: %lg + j%lg, r: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr, r, jr);
+
                        double dr  = p1->pr  - (p0->pr  + r);
                        double jdr = p1->jpr - (p0->jpr + jr);
 
                        p1->pr  -= dr;
                        p1->jpr -= jdr;
 
-                       scf_logw("j: %d, c%ldp%ld, p->pr: %lg + j%lg, p->sr: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr);
+                       scf_logw("j: %d, c%ldp%ld, p->pr: %lg + j%lg, p->sr: %lg + j%lg, dr: %lg + j%lg\n", j, p1->cid, p1->id, p1->pr, p1->jpr, p1->sr, p1->jsr, dr, jdr);
 
                        for (++j; j < path->pins->size; j++) {
                                p     = path->pins->data[j];
@@ -140,8 +142,7 @@ static int __ses_path_jr(ScfEfunction* f, ses_path_t* path)
        path->r  = p->pr;
        path->jr = p->jpr;
 
-       scf_loge("path: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg\n",
-                       path->index, path->r, path->jr, path->r0, path->jr0);
+       scf_loge("path: %d, r: %lg, jr: %lg, r0: %lg, jr0: %lg\n", path->index, path->r, path->jr, path->r0, path->jr0);
        return 0;
 }
 
index b0f15a5577cb2f5bd1782e3cf7d518a34c3a2ef1..357c9a7959a080962020ca515287fbf3042e3462 100644 (file)
@@ -39,12 +39,13 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path)
 
        double v  = p0->v  - p1->v;
        double jv = p0->jv - p1->jv;
-       double a  = 0;
-       double ja = 0;
 
-       ses_ur_i(&a, &ja, v, jv, path->r, path->jr);
+       ses_ur_i(&path->a, &path->ja, v, jv, path->r, path->jr);
 
-       scf_loge("path: %d, v: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n", path->index, v, jv, path->r, path->jr, a, ja);
+       scf_loge("path: %d, v: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n", path->index, v, jv, path->r, path->jr, path->a, path->ja);
+
+       double a   = path->a;
+       double ja  = path->ja;
 
        double r   = 0;
        double jr  = 0;
@@ -119,6 +120,8 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path)
                r     += p->r  + p->dr;
                jr    += p->jr + p->jdr;
 
+               scf_logw("path: %d, i: %d, c%ldp%ld, r: %lg + j%lg, p->r: %lg + j%lg, p->dr: %lg + j%lg\n", path->index, i, p->cid, p->id, r, jr, p->r, p->jr, p->dr, p->jdr);
+
                if (i & 0x1) {
                        r   += c->r;
                        jr  += c->jr;
@@ -128,12 +131,6 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path)
 
                        ses_ur_i(&p->a, &p->ja, dv, jdv, r, jr);
 
-                       scf_loge("path: %d, i: %d, c%ldp%ld, p->v: %lg + j%lg, dv: %lg + j%lg, r: %lg + j%lg, a: %lg + j%lg\n\n", path->index, i, p->cid, p->id,
-                                       p->v, p->jv, dv, jdv, r, jr, p->a, p->ja);
-
-                       r   = 0;
-                       jr  = 0;
-
                        if (path->childs) {
                                for (j    = 0; j < path->childs->size; j++) {
                                        child =        path->childs->data[j];
@@ -144,10 +141,18 @@ static int __ses_path_va(ScfEfunction* f, ses_path_t* path)
                                        if (p->lid == cp1->lid) {
                                                a  += child->a;
                                                ja += child->ja;
+
+                                               scf_logd("path: %d, i: %d, c%ldp%ld, child->a: %lg + j%lg\n", child->index, i, cp1->cid, cp1->id, child->a, child->ja);
                                        }
                                }
                        }
 
+                       scf_loge("path: %d, i: %d, c%ldp%ld, p->v: %lg + j%lg, dv: %lg + j%lg, r: %lg + j%lg, p->a: %lg + j%lg, a: %lg + j%lg\n\n", path->index, i, p->cid, p->id,
+                                       p->v, p->jv, dv, jdv, r, jr, p->a, p->ja, a, ja);
+
+                       r   = 0;
+                       jr  = 0;
+
                } else {
                        dv  = p->v;
                        jdv = p->jv;