I have following queries please resolve .

2 visualizzazioni (ultimi 30 giorni)
Bhavna
Bhavna il 26 Lug 2014
Risposto: Tim McBrayer il 28 Lug 2014
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

Risposte (1)

Tim McBrayer
Tim McBrayer il 28 Lug 2014
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.

Categorie

Scopri di più su Code Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by