bool32.rising trigger
bool32.rising reset
int32 o
int ntrig;
int rtrig;
int accu;
ntrig = 0;
rtrig = 0;
accu = 0;
if ((inlet_trig) && !ntrig) {
accu += 1;
ntrig = 1;
}
if (!inlet_trig)
ntrig = 0;
if ((inlet_rst) && !rtrig) {
accu = 0;
rtrig = 1;
}
if (!inlet_rst)
rtrig = 0;
outlet_o = accu;