HDLcoder ignores coder.const
显示 更早的评论
I'm tryint to compile some code into HDL. There are weights used in digital filter which I want to precompute at the compile time.
The way I did this is
persistent c buf tout pfb_weights;
if isempty(c)
...
pfb_weights = coder.const(get_pfb_weights(settings_Nfft,settings_Ntaps));
end
The reason I think it is not working is that the coding report says:
- It lists sin function under Toolbox Function Usage: Supported List. Sin function is only used in get_pfb_weights function
- It lists coder/matlabcoder under Toolbox Function Usage: Unsupported List
- If I attempt fixedpoint conversion it complains that function "double" inside get_pfb_weights is not suitable for fixed point conversion and wouldn't proceed.
How do we fix this?
采纳的回答
更多回答(1 个)
Kiran Kintali
2022-9-25
0 个投票
You can find examples of HDL Coder friendly designs with coder.load and coder.const in the attachment.

类别
在 帮助中心 和 File Exchange 中查找有关 Get Started with HDL Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!