about hdl coder in simulink
1 次查看(过去 30 天)
显示 更早的评论
Hii,
Can you please tell me what are the settings to be done for 'sin', 'cos' blocks while using for HDL Conversion..? I am getting error as "HDL code generation does not support double or single data type for the block Trigonometric Function". I am not able to follow this. Please help me in fixing this problem.
and also while using square root its giving error as "Sqrt function with non-fixedpoint output datatype is not supported." and "Sqrt function with signed input is not supported."
please help me with this.
Thank you
Regards, Prashanth
0 个评论
回答(1 个)
Walter Roberson
2016-4-21
It is suggested that you use CORDIC; see https://www.mathworks.com/examples/simulink-hdl-coder/mw/hdlcoder_product-hdlcordic_eml-cordic-algorithm-using-the-matlab-reg-function-block
3 个评论
Walter Roberson
2016-4-21
Yes, it requires so much code.
In some cases, there is information around that allows the sin or cos to be calculated more directly by geometric means such as "opposite divided by hypotenuse". cos in particular has in interpretation from dot products.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!