[Fixed-point converter] Passing constant struct to entry point
이전 댓글 표시
I have passed a constant struct to the input of MATLAB HDL Coder.Lets say param.a = 'red'
In the code, it is responsible for choosing a certain code path:
if param.a == 'red'
% do HDL Coder supported stuff
else
% do only MATLAB supported stuff
linspace(foo);
% etc. etc.
end
However the fixed-point converter still wants me to define a replacement function for linspace, even if it is not in the active code path. Somehow it does not understand, that param is constant.
As this thread suggests, I tried defining param as coder.Constant input, which did not help and I also used a System Object to wrap the code and put param in the nontunable properties
properties (Nontunable)
param
end
,to explicitly tell the fixed-point converter that param is constant, which is replied by
Property 'param' of class 'ExampleClass' is a structure type. Classes with structure properties are not supported.
Is there any possibility to let also the fixed-point converter know, that param is indeed compile time constant?
채택된 답변
추가 답변 (1개)
Kiran Kintali
2020년 3월 19일
0 개 추천
please share dut.m and dut_tb.m with the sample code and data types. if you have project or input types to compile the code it would be benificial to debug the fixed-point issue. Thanks
카테고리
도움말 센터 및 File Exchange에서 Test and Debug에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


