tmp
authoryu.dongliang <18588496441@163.com>
Wed, 25 Oct 2023 12:38:17 +0000 (20:38 +0800)
committeryu.dongliang <18588496441@163.com>
Wed, 25 Oct 2023 12:38:17 +0000 (20:38 +0800)
ses_step_va_bridge.c
ses_steps.c

index aad2201cbbc6b628b9018e86946c78579512286d..886b81a667ad7ba0b3323060a98a84dfba2f4ce2 100644 (file)
@@ -10,19 +10,23 @@ static int __ses_path_va_bridge(ScfEfunction* f, ses_path_t* path, int* changed)
                return -EINVAL;
        }
 
-       ses_path_t*    child;
-       ScfEcomponent* c;
        ScfEcomponent* B;
        ScfEline*      el;
+       ScfEpin*       Bp;
        ScfEpin*       Bn;
        ScfEpin*       p0;
        ScfEpin*       p1;
 
-       int i;
+       B  = f->components[0];
+       Bp = B->pins[SCF_EDA_Battery_POS];
+       Bn = B->pins[SCF_EDA_Battery_NEG];
 
        p0 = path->pins->data[0];
        p1 = path->pins->data[path->pins->size - 1];
 
+       if (p0->lid == Bp->lid && p1->lid == Bn->lid)
+               return 0;
+
        el     = f->elines[p0->lid];
        p0->v  = el->v;
        p0->jv = el->jv;
@@ -49,14 +53,14 @@ static int ses_path_va_bridge(ScfEfunction* f, ses_path_t* path, int* changed)
        if (!path)
                return -EINVAL;
 
+       int ret = __ses_path_va_bridge(f, path, changed);
+       if (ret < 0)
+               return ret;
+
        if (path->bridges) {
                for (j = 0; j < path->bridges->size; j++) {
                        child     = path->bridges->data[j];
 
-                       int ret = __ses_path_va_bridge(f, child, changed);
-                       if (ret < 0)
-                               return ret;
-
                        ret = ses_path_va_bridge(f, child, changed);
                        if (ret < 0)
                                return ret;
index 056a1c11e7d6d14ffbe785a79fe5f2d0dfe9367d..80d3cefc47bb5cc116cd2cd162b710ff3367c3d8 100644 (file)
@@ -141,7 +141,7 @@ int ses_steps_analyse(ScfEfunction* f, int64_t ns, int64_t count)
                        return ret;
 
                int j;
-               for (j = 0; j < 3; j++) {
+               for (j = 0; j < 1; j++) {
                        ret = __ses_steps_analyse(f, ns, i, ctx);
 
                        if (-EAGAIN == ret)