diff --git a/src/xspice/icm/xtradev/seegenerator/cfunc.mod b/src/xspice/icm/xtradev/seegenerator/cfunc.mod index 55bad8000..5361fbca8 100644 --- a/src/xspice/icm/xtradev/seegenerator/cfunc.mod +++ b/src/xspice/icm/xtradev/seegenerator/cfunc.mod @@ -130,6 +130,7 @@ void cm_seegen(ARGS) /* structure holding parms, double tdelay; /* delay until first pulse */ double inull; /* max. current of pulse */ double tperiod; /* pulse repetition period */ + double ctrlthres; /* control voltage threshold */ double ctrl; /* control input */ double out; /* output current */ double *last_t_value; /* static storage of next pulse time */ @@ -145,6 +146,7 @@ void cm_seegen(ARGS) /* structure holding parms, tdelay = PARAM(tdelay); tperiod = PARAM(tperiod); inull = PARAM(inull); + ctrlthres = PARAM(ctrlthres); if (PORT_NULL(ctrl)) ctrl = 1; @@ -169,7 +171,7 @@ void cm_seegen(ARGS) /* structure holding parms, pulse_number = (int *) STATIC_VAR(pulse_number); last_ctrl = (double *) STATIC_VAR(last_ctrl); - if (*last_ctrl < 0.5 && ctrl >= 0.5) { + if (*last_ctrl < ctrlthres && ctrl >= ctrlthres) { *last_t_value = *last_t_value + tcurr; *last_ctrl = ctrl; } diff --git a/src/xspice/icm/xtradev/seegenerator/ifspec.ifs b/src/xspice/icm/xtradev/seegenerator/ifspec.ifs index 08f3c45f0..cf232e915 100644 --- a/src/xspice/icm/xtradev/seegenerator/ifspec.ifs +++ b/src/xspice/icm/xtradev/seegenerator/ifspec.ifs @@ -65,14 +65,14 @@ Null_Allowed: yes yes PARAMETER_TABLE: -Parameter_Name: tperiod -Description: "pulse repetition" -Data_Type: real -Default_Value: 0 -Limits: - -Vector: no -Vector_Bounds: - -Null_Allowed: yes +Parameter_Name: tperiod ctrlthres +Description: "pulse repetition" "control voltage threshold" +Data_Type: real real +Default_Value: 0 0.5 +Limits: - - +Vector: no no +Vector_Bounds: - - +Null_Allowed: yes yes STATIC_VAR_TABLE: