I have following queries please resolve .
2 次查看(过去 30 天)
显示 更早的评论
i want to generate hdl code of designed simulink model for FPGA but following problems are occuring:
- Error: HDL code generation does not support double or single data type for the block 'Trigonometric Function'
- and mathworks functions are not supported for hdl code generation
0 个评论
回答(1 个)
Tim McBrayer
2014-7-28
In general you do not want to use double data types anywhere in the HDL portion of your Simulink design. Floating point values are not in general synthesizable onto a FPGA. As a convenience, HDL Coder supports doubles (albeit with warnings) for early design and prototyping. However, for some blocks such as the Trig Function, double values are not supported at all. The use of this block requires you to convert your design to use fixed-point values.
I'm not sure what construct you are referring to when you state "mathworks functions are not supported". The MATLAB Function block is fully supported by HDL Coder. Again, you will want to use fixed-point math in the code inside this block so that the result will be synthesizable. If you are not referring to this block but are referring to HDL Code generation directly from MATLAB code, outside Simulink, this has been supported via a somewhat different flow since R2012a.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!