Hi, I have a function "HRCalc_Main_fxp_wrap" which contains multiple fixed-point objects and filter functions, and I'd like to accelerate its execution via fiaccel. Here's how I use fiaccel on HRCalc_Main_fxp_wrap function (where RawPPGStr & dc are fixed-point objects and the rest arguments are in double precision):
function [HROutAry_HW, HROutAry_FW, dataPtrAry, BPM_calcHR, pd] = HRCalc_Main_fiaccel(RawPPGStr, dc, BPM, Fs, FiltEn, DBGEn)
FxpNumInput = numerictype;
FxpNumInput.Signedness = 'Unsigned';
FxpNumInput.WordLength = InputWordLen;
FxpNumInput.FractionLength = InputFracLen;
FxpMathInput.OverflowMode = 'Saturate';
RawPPGStr_fi = fi(RawPPGStr, FxpNumInput, FxpMathInput);
dc_fi = fi(dc, FxpNumInput, FxpMathInput);
fiaccel HRCalc_Main_fxp_wrap -args {RawPPGStr_fi, dc_fi} -o HRCalc_Main_mex -report
[HROutAry_HW, HROutAry_FW, dataPtrAry, BPM_calcHR, pd] = HRCalc_Main_fxp_wrap(RawPPGStr_fi, dc, BPM, Fs, FiltEn, DBGEn);
function [HROutAry_HW, HROutAry_FW, dataPtrAry, BPM_calcHR, pd] = HRCalc_Main_fxp_wrap(RawPPGStr_fi, dc_fi, BPM, Fs, FiltEn, DBGEn)
However when I ran the HRCalc_Main_fiaccel in my test script, I kept running into the following error:
??? Unable to locate function 'HRCalc_Main_fxp_wrap'.
Code generation failed: View Error Report
Error using coder.internal.fihelper
Error in fiaccel (line 91)
coder.internal.fihelper(varargin{:});
Error in HRCalc_Main_fiaccel (line 39)
fiaccel HRCalc_Main_fxp_wrap -args {RawPPGStr_fi,
dc_fi} -o HRCalc_Main_mex -report
Error in HRCalc_test_SinPPG_fxp (line 44)
[HROutAry_HW_fxp, HROutAry_FW_fxp, dataPtrAry, BPM_calcHR,
pd_fxp] = HRCalc_Main_fiaccel(PPG_sin_N, dc_mean,
I googled using the key words "Unable to locate function" & "fiaccel" and can't find any similar question. Can someone with experiences in fiaccel help answer my question?
Thanks in advance
Johnson