Found unsupported division expression for HDL code generation; Signed input data type is not supported for division with Floor RoundMode.
3 ビュー (過去 30 日間)
古いコメントを表示
Hello There,
I got the following error while I'm converting my Matlab Code to HDL-coder
Error : "Found unsupported division expression for HDL code generation; Signed input data type is not supported for division with Floor RoundMode."
Here is the matlab code :
Gx1(nn)=fi(cos_func(dr(nn)),true,16,16).*fi(call_power_func(2.718281828,double(-(double(t(nn)).*(double(t(nn))))/2)),true,16,16);
Notes:
t= (1x100000) double
max(t)= 0.999999000000000
min(t)= 0
[Merged from duplicate - WDR]
Hello There,
I got the following error while I'm converting my Matlab Code to HDL-coder, Can you please help me to fix this error? I simplified my code as below to trace the error, as it looks the Cos function is not working with HDL, even after I created a cos special func.
"Error: Found unsupported division expression for HDL code generation; Signed input data type is not supported for division with Floor RoundMode."
Here is the code:
dr=[0.26,0.36,0.76,0.5,0.75,0.33,0.67,0.87,0.98,0.21];
dr= fi(dr,true,16,16);
Gx2=zeros(1,10);
Gx2= fi(Gx2,true,16,16);
for nn=1:1:10;
Gx2(nn)=cos_func(dr(nn));
end
% code end
---
where:
function y = cos_func( x ) %#codegen
y=cos(x);
end
0 件のコメント
採用された回答
Bharath Venkataraman
2015 年 7 月 14 日
The cos function is not supported for HDL code generation. You can use a lookup table (predefined array)that stores the cos values and look up the right value based on the input x.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で FPGA, ASIC, and SoC Development についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!