Borrar filtros
Borrar filtros

Found unsupported division expression for HDL code generation; Signed input data type is not supported for division with Floor RoundMode.

1 visualización (últimos 30 días)
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

Respuesta aceptada

Bharath Venkataraman
Bharath Venkataraman el 14 de Jul. de 2015
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.

Más respuestas (0)

Categorías

Más información sobre Code Generation en Help Center y File Exchange.

Productos

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by