From 8c524b2cf5e0fc8cbe5dbea62d6118f6aa20747e Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Tue, 25 Jul 2023 23:34:23 +0800 Subject: [PATCH] tmp --- ses_step_dc_diode.c | 2 +- ses_step_dc_input.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ses_step_dc_diode.c b/ses_step_dc_diode.c index 795826f..0f342e8 100644 --- a/ses_step_dc_diode.c +++ b/ses_step_dc_diode.c @@ -43,7 +43,7 @@ static int _dc_diode_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx else { el1 = f->elines[p1->lid]; - if (el1->v < SCF_EDA_V_MIN || el1->v > p1->v) { + if (el1->v < SCF_EDA_V_MIN || el1->v >= p1->v) { el1->v = p1->v; c->status = SCF_EDA_Status_ON; } else diff --git a/ses_step_dc_input.c b/ses_step_dc_input.c index aad832c..ca39b20 100644 --- a/ses_step_dc_input.c +++ b/ses_step_dc_input.c @@ -10,12 +10,15 @@ static int _dc_input_handler(ScfEfunction* f, int64_t ns, int64_t count, ses_ctx B = f->components[0]; + srand(time(NULL)); + for (i = 0; i < f->n_elines; i++) { el = f->elines[i]; if (SCF_EDA_PIN_IN & el->flags) { - el->v = (rand() & 0x1) * B->v; +// el->v = (rand() & 0x1) * B->v; + el->v = B->v; scf_logw("IN el: %ld, V: %lg\n", el->id, el->v); } -- 2.25.1