Unable to locate function in fiaccel
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
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)
InputWordLen = 12;
InputFracLen = 0;
% ---- Define input fixed-point precisions ----
FxpNumInput = numerictype;
FxpNumInput.Signedness = 'Unsigned';
FxpNumInput.WordLength = InputWordLen;
FxpNumInput.FractionLength = InputFracLen;
FxpMathInput = fimath;
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,
BPM, Fs, FiltEn, DBGEn);
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
0 comentarios
Respuestas (1)
Akash
el 22 de En. de 2024
Hi Jui,
I attempted to reproduce the error using the provided code but I did not encounter the same issue. To help resolve the error you are experiencing with 'fiaccel', please try the following steps:
1. Make sure the file containing the "HRCalc_Main_fxp_wrap" function is on the MATLAB path.
2. You can try placing the "HRCalc_Main_fxp_wrap" and "HRCalc_Main_fiaccel" functions in separate ".m" files.
3. You may check if there are any Unicode characters in the path to your top-level file. Code generation may fail if such characters are present. You may refer to the below provided MATLAB documentation for more information:
I hope it helps.
0 comentarios
Ver también
Categorías
Más información sobre Automated Fixed-Point Conversion in MATLAB en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!