tmp
authoryu.dongliang <18588496441@163.com>
Tue, 25 Jul 2023 15:34:23 +0000 (23:34 +0800)
committeryu.dongliang <18588496441@163.com>
Tue, 25 Jul 2023 15:34:23 +0000 (23:34 +0800)
ses_step_dc_diode.c
ses_step_dc_input.c

index 795826f90e154e31a9c64584cfd3bafe9a6036cb..0f342e8e329088cd992720c5fae287c2869964fa 100644 (file)
@@ -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
index aad832ce02c141752bbf792e64de85e317362b93..ca39b206eb47777b618327bc4a523b3db631c485 100644 (file)
@@ -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);
                }