필터 지우기
필터 지우기

where is the HDL Coder option to 'Support floating point numbers'?

조회 수: 7 (최근 30일)
Samir Khan
Samir Khan 2018년 10월 18일
편집: Samir Khan 2018년 10월 19일
I keep getting the following error message each time I try to generate HDL code:
"The persistent variable 'x' in chart 'Subsystem/MATLAB Function' is of non-integer type. The option 'Support floating-point numbers' has not been set Code Generation configuration options. Hence, only integer code/data is allowed. HDL code generation failed for 'Subsystem/MATLAB Function'"
I wonder if this is simply a check box in the configuration options that I need to select, but I can't seem to find anything.

답변 (1개)

Steven Lord
Steven Lord 2018년 10월 18일
When I searched the release R2018a documentation for the phrase "'Support floating-point numbers'" this page was the second hit.
I opened a sample model (f14). Under the Simulation menu I opened the Model Configuration Parameters dialog. In the Code Generation section I had to select ert.tlc (since the first item in the Dependencies section on that documentation page states that this option is only available on ERT-based targets and f14 uses the generic target by default.) After doing that I expanded the Code Generation section and the Interface subsection had "Support: floating-point numbers" available.
  댓글 수: 1
Samir Khan
Samir Khan 2018년 10월 19일
편집: Samir Khan 2018년 10월 19일
Thanks for the quick follow-up. I am aware of this option, but I assume this is concerned with the C/C++ code generation of the simulink model, and not with HDL code generation. Just to let you know that I am able to generate the C/C++ code with no problems and even able to deploy it. However, I am interested in the VHDL generation and it keeps giving me the same error i.e. "Support floating point numbers has not been set". It seems something very trivial.. like a ticking a check box somewhere in the configuration options. In the 'HDL Coder Generation > Global Settings > Floating Point Target', there is an option for 'Native Floating Point', which is the only thing closest to floating-point numbers in the HDL coder?

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by