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!