From f247d1e2ce9d0bcd83c42df0c92d85f4315b9797 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 27 May 2025 13:33:17 +0200 Subject: [PATCH] Add parameter perlim: continous sequence or one time sequence. --- src/xspice/icm/xtradev/seegenerator/cfunc.mod | 7 +++++++ src/xspice/icm/xtradev/seegenerator/ifspec.ifs | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/xspice/icm/xtradev/seegenerator/cfunc.mod b/src/xspice/icm/xtradev/seegenerator/cfunc.mod index c0a5e1e78..0da86c709 100644 --- a/src/xspice/icm/xtradev/seegenerator/cfunc.mod +++ b/src/xspice/icm/xtradev/seegenerator/cfunc.mod @@ -176,6 +176,7 @@ void cm_seegen(ARGS) /* structure holding parms, *last_ctrl = ctrl; } + /* the double exponential current pulse function */ if (tcurr < *last_t_value) out = 0; else @@ -188,6 +189,12 @@ void cm_seegen(ARGS) /* structure holding parms, /* set the time for the next pulse */ *last_t_value = *last_t_value + tperiod; (*pulse_number)++; + if (*pulse_number > PORT_SIZE(out)) { + if (PARAM(perlim) == FALSE) + *pulse_number = 1; + else + *last_t_value = 1e12; /* stop any output */ + } } if (*pulse_number - 1 < PORT_SIZE(out)) OUTPUT(out[*pulse_number - 1]) = out; diff --git a/src/xspice/icm/xtradev/seegenerator/ifspec.ifs b/src/xspice/icm/xtradev/seegenerator/ifspec.ifs index 432179a68..c4868c7c7 100644 --- a/src/xspice/icm/xtradev/seegenerator/ifspec.ifs +++ b/src/xspice/icm/xtradev/seegenerator/ifspec.ifs @@ -7,16 +7,16 @@ Universty Duisburg-Essen Duisburg, Germany Project Flowspace -AUTHORS +AUTHORS - 19 May 2025 +Holger Vogt 19 May 2025 SUMMARY This file contains the interface specification file for the - analog ilimit code model. + analog seegen code model. ===============================================================================*/ @@ -73,6 +73,17 @@ Vector: no no Vector_Bounds: - - Null_Allowed: yes yes +PARAMETER_TABLE: + +Parameter_Name: perlim +Description: "pulse repetition limited" +Data_Type: boolean +Default_Value: TRUE +Limits: - +Vector: no +Vector_Bounds: - +Null_Allowed: yes + STATIC_VAR_TABLE: Static_Var_Name: last_t_value