From: yu.dongliang <18588496441@163.com> Date: Sat, 14 Oct 2023 08:28:29 +0000 (+0800) Subject: _topo_layers() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=553de77f587e09c1ac38ac06936d9882acefff13;p=ses.git _topo_layers() --- diff --git a/ses_step_topo.c b/ses_step_topo.c index fea2e68..64aa14a 100644 --- a/ses_step_topo.c +++ b/ses_step_topo.c @@ -174,10 +174,12 @@ static void _topo_path_sort(ses_path_t* path) scf_vector_qsort(path->childs, _ses_child_cmp); } -static int _topo_layers(scf_vector_t* paths) +static int _topo_layers(scf_vector_t* paths, ScfEcomponent* B) { ses_path_t* child; ses_path_t* parent; + ScfEpin* Bp; + ScfEpin* Bn; ScfEpin* p0; ScfEpin* p1; ScfEpin* p; @@ -186,6 +188,9 @@ static int _topo_layers(scf_vector_t* paths) int j; int k; + Bp = B->pins[SCF_EDA_Battery_POS]; + Bn = B->pins[SCF_EDA_Battery_NEG]; + for (i = 0; i < paths->size; i++) { child = paths->data[i]; child->index = i; @@ -199,6 +204,9 @@ static int _topo_layers(scf_vector_t* paths) p0 = child->pins->data[0]; p1 = child->pins->data[child->pins->size - 1]; + if (p0->lid == Bp->lid && p1->lid == Bn->lid) + continue; + for (j = paths->size - 1; j >= 0; j--) { parent = paths->data[j]; @@ -353,7 +361,7 @@ static int _topo_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* } } - int ret = _topo_layers(ctx->paths); + int ret = _topo_layers(ctx->paths, B); if (ret < 0) return ret;