Hello. I'm traying to generate un HDL code from matlab user-definded function algorithm and got an error about function specialisation that I didn't understand.
Show older comments
this is the error msg that I got :
The function 'AppDec_Fun2' contains persistent variables 'dataAppFun2' and has specialization 'AppDec_Fun2_s1' associated with it. Function specializations containing persistent variables are not supported for fixed-point conversion. Consider rewriting your algorithm such that it does not use persistent variables within functions that require specialization.
3 Comments
Bouchra BENDAHANE
on 3 Sep 2021
Edited: Walter Roberson
on 3 Sep 2021
Walter Roberson
on 3 Sep 2021
Memory Store perhaps ?
Or you could probably avoid the problem by coding the function in fixed-point yourself, so that it did not need to be specialized to convert from double to fixed point.
Answers (1)
Kiran Kintali
on 7 Sep 2021
0 votes
Can you share a sample design.m, testbench.m and project file used for fixed point conversion?
Thanks
3 Comments
Bouchra BENDAHANE
on 7 Sep 2021
Kiran Kintali
on 7 Sep 2021
I was looking for project file containing 'AppDec_Fun2' to see the fixed point settings and a testbench driving the function to analyze the ranges.
Bouchra BENDAHANE
on 8 Sep 2021
Categories
Find more on MATLAB Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!