I have following queries please resolve .

조회 수: 2 (최근 30일)
Bhavna
Bhavna 2014년 7월 26일
답변: Tim McBrayer 2014년 7월 28일
i want to generate hdl code of designed simulink model for FPGA but following problems are occuring:
  1. Error: HDL code generation does not support double or single data type for the block 'Trigonometric Function'
  2. and mathworks functions are not supported for hdl code generation

답변 (1개)

Tim McBrayer
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.

카테고리

Help CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by