From 4d7285652aaeff014884ca33ddd6cb0f331bf101 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Sun, 3 Sep 2023 20:56:44 +0800 Subject: [PATCH] ses step va --- ses_step_va.c | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ses_step_va.c b/ses_step_va.c index e9c63a0..9b9e809 100644 --- a/ses_step_va.c +++ b/ses_step_va.c @@ -2,7 +2,7 @@ int _ses_path_cmp(const void* v0, const void* v1); -int __ses_path_jr(ses_path_t* path) +int __ses_path_jr(ScfEfunction* f, ses_path_t* path) { if (!path) return -EINVAL; @@ -12,12 +12,13 @@ int __ses_path_jr(ses_path_t* path) return -EINVAL; } - ses_path_t* child; - ScfEpin* p; - ScfEpin* p0; - ScfEpin* p1; - ScfEpin* cp0; - ScfEpin* cp1; + ses_path_t* child; + ScfEcomponent* c; + ScfEpin* p; + ScfEpin* p0; + ScfEpin* p1; + ScfEpin* cp0; + ScfEpin* cp1; double R; double r; @@ -35,6 +36,12 @@ int __ses_path_jr(ses_path_t* path) r += p->r; jr += p->jr; + if (i & 0x1) { + c = f->components[p->cid]; + r += c->r; + jr += c->jr; + } + p->tr = r; p->jtr = jr; @@ -54,7 +61,7 @@ int __ses_path_jr(ses_path_t* path) return -EINVAL; } - int ret = __ses_path_jr(child); + int ret = __ses_path_jr(f, child); if (ret < 0) return ret; @@ -152,7 +159,7 @@ static int _va_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx_t* ct scf_logi("i: %ld, path->type: %d\n", i, path->type); - int ret = __ses_path_jr(path); + int ret = __ses_path_jr(f, path); if (ret < 0) return ret; -- 2.25.1