IO Variants: 2
Variant: 1
frac32 input
frac32 output
frac32.u.map slew
int32_t acc;
acc = 0;
if (inlet_in > acc) {
if ((inlet_in - acc) > param_slew)
acc += param_slew;
else
acc = inlet_in;
} else {
if ((acc - inlet_in) > param_slew)
acc -= param_slew;
else
acc = inlet_in;
}
acc = __SSAT(acc, 28);
outlet_out = acc;
Variant: 2
frac32buffer input
frac32buffer output
frac32.u.map slew
int32_t acc;
acc = 0;
if (inlet_in > acc) {
if ((inlet_in - acc) > param_slew)
acc += param_slew;
else
acc = inlet_in;
} else {
if ((acc - inlet_in) > param_slew)
acc -= param_slew;
else
acc = inlet_in;
}
acc = __SSAT(acc, 28);
outlet_out = acc;