Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Simulink HDL code generation for custom matlab functions

조회 수: 1 (최근 30일)
Tunç Arslan
Tunç Arslan 2018년 2월 27일
마감: MATLAB Answer Bot 2021년 8월 20일
Hello,
I am trying to generate HDL code for a custom Matlab function I have in Simulink. I am just trying to learn how things work basically so my "custom" function block is very simple;
function y = my_function(u, k)
y = atan2(u, k);
end
However, when I try to generate an HDL code for this function I get the following error, "Block 'test/Subsystem/MATLAB Function' is unsupported for HDL code generation when in native floating-point mode". When I just use atan2 block from Simulink I can generate HDL code perfectly fine but when I try my own custom function block I get this error. Simulink simulation works though, I get proper outputs from my scopes.
How can I fix this? Do I have to use separate floating point libraries or am I missing something else?
Thanks in advance.

답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by