From: yu.dongliang <18588496441@163.com> Date: Fri, 15 Sep 2023 09:08:47 +0000 (+0800) Subject: ses_flow_jr() X-Git-Url: http://baseworks.info/?a=commitdiff_plain;h=ca4a4c569d9b79b7b4ffba6048b296add599a8d7;p=ses.git ses_flow_jr() --- diff --git a/ses_steps.c b/ses_steps.c index 3ed7fcc..6c2d001 100644 --- a/ses_steps.c +++ b/ses_steps.c @@ -86,6 +86,7 @@ void ses_flow_jr(ses_flow_t* flow) ses_path_t* path; ScfEpin* p; + ScfEpin* p0; ScfEpin* vip = flow->vip; int i; @@ -116,21 +117,39 @@ void ses_flow_jr(ses_flow_t* flow) for (i = 0; i < flow->paths->size; i++) { path = flow->paths->data[i]; + p0 = NULL; for (j = 0; j < path->pins->size; j++) { p = path->pins->data[j]; - if (p->lid == vip->lid) { + if (!p0) { + if (p->lid == vip->lid) + p0 = p; + continue; + } - vip = path->pins->data[path->pins->size - 1]; + if (p->sr != p->pr) { - flow->nr += vip->pr - p->pr; - flow->jnr += vip->jpr - p->jpr; + flow->nr += p->sr - p0->pr; + flow->jnr += p->jsr - p0->jpr; - scf_loge("flow->nr: %lg + j%lg, c%ldp%ld->pr: %lg + j%lg, vip c%ldp%ld->pr: %lg + j%lg\n", - flow->nr, flow->jnr, p->cid, p->id, p->pr, p->jpr, vip->cid, vip->id, vip->pr, vip->jpr); - break; + scf_logw("flow->nr: %lg + j%lg, c%ldp%ld->sr: %lg + j%lg, p0 c%ldp%ld->pr: %lg + j%lg\n", + flow->nr, flow->jnr, p->cid, p->id, p->sr, p->jsr, p0->cid, p0->id, p0->pr, p0->jpr); + + p0 = p; } } + + assert(p0); + + vip = path->pins->data[j - 1]; + + if (vip != p0) { + flow->nr += vip->sr - p0->pr; + flow->jnr += vip->jsr - p0->jpr; + } + + scf_loge("flow->nr: %lg + j%lg, vip c%ldp%ld->sr: %lg + j%lg, p0 c%ldp%ld->pr: %lg + j%lg\n", + flow->nr, flow->jnr, vip->cid, vip->id, vip->sr, vip->jsr, p0->cid, p0->id, p0->pr, p0->jpr); } }