bool32.rising trigger
int32 output
int32 maximum
int ntrig;
int rtrig;
int count;
count = 0;
ntrig = 0;
rtrig = 0;
if ((inlet_trig > 0) && !ntrig) {
count += 1;
if (count >= param_maximum) {
count = 0;
}
ntrig = 1;
} else if (!(inlet_trig > 0))
ntrig = 0;
outlet_o = count;