pflag
authoryu.dongliang <18588496441@163.com>
Wed, 26 Jul 2023 13:23:38 +0000 (21:23 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 26 Jul 2023 13:23:38 +0000 (21:23 +0800)
ses_step_topo.c

index 5b509d12c8cff5b0eaec71e7d21204685e129c0c..fc09978555081acb0f2214ce2dcbf466e1cca8b1 100644 (file)
@@ -35,17 +35,20 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
        if (SCF_EDA_Transistor != rc->type || SCF_EDA_Transistor_E != rp->id)
                rp->vflag = 1;
 
-       scf_logi("c%ld_p%ld, l%ld\n", rc->id, rp->id, rp->lid);
+       scf_logi("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", rp->cid, rp->id, rp->lid, rp->vflag, rp->pflag);
 
        int ret = 0;
 
        for (i = 0; i < rc->n_pins; i++) {
                np =        rc->pins[i];
 
-               if (np->vflag)
+               if (np->vflag) {
+                       if (rp != np)
+                               scf_loge("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag);
                        continue;
+               }
 
-               scf_logi("c%ld_p%ld, l%ld\n", rc->id, np->id, np->lid);
+               scf_logi("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", np->cid, np->id, np->lid, np->vflag, np->pflag);
 
                el = f->elines[np->lid];
 
@@ -69,6 +72,11 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
                        if (scf_vector_add(ctx->paths, path) < 0)
                                return -ENOMEM;
 
+                       for (j = 0; j < path->size; j++) {
+                               p         = path->data[j];
+                               p->pflag  = 1;
+                       }
+
                        *ppath = NULL;
                        return 0;
                }
@@ -80,8 +88,11 @@ static int __dfs_path(ScfEfunction* f, ScfEcomponent* rc, ScfEpin* rp, ses_ctx_t
                        c  = f->components[el->pins[j]];
                        p  = c->pins      [el->pins[j + 1]];
 
-                       if (p->vflag)
+                       if (p->vflag) {
+                               if (p != np)
+                                       scf_loge("c%ld_p%ld, l%ld, vflag: %d, pflag: %d\n", p->cid, p->id, p->lid, p->vflag, p->pflag);
                                continue;
+                       }
 
                        if (SCF_EDA_Transistor != c->type || SCF_EDA_Transistor_E != p->id)
                                p->vflag = 1;