bool32.rising trigger
bool32.rising reset
frac32 input
frac32 output
int ntrig;
int rtrig;
int accu;
ntrig = 0;
rtrig = 0;
accu = 0;
if ((inlet_trig > 0) && !ntrig) {
accu += inlet_i;
ntrig = 1;
accu = __SSAT(accu, 28);
}
if (!(inlet_trig > 0))
ntrig = 0;
if ((inlet_rst > 0) && !rtrig) {
accu = 0;
rtrig = 1;
}
if (!(inlet_rst > 0))
rtrig = 0;
outlet_o = accu;