[HDL Coder]: BUG?/ Function Location missing in Error Report -> find variable by name?
이전 댓글 표시
In HDL Coder, I want to locate, where errors are occuring.
But the HTML Report just gives me the Error Location in the top compiled file,
not in the function file and line where it really occurs.
Example
dut_wrapper_fixpt:15 |Error |'varargin_1' : Error: variable-size matrix type is not supported for HDL code generation.
dut_wrapper_fixpt:15 |Error |'signal' : Error: variable-size matrix type is not supported for HDL code generation.
dut_wrapper_fixpt:15 |Error |'a0' : Error: variable-size matrix type is not supported for HDL code generation.
dut_wrapper_fixpt:15 |Error |'var_1' : Error: variable-size matrix type is not supported for HDL code generation.
dut_wrapper_fixpt:15 |Error |'varargin_1' : Error: variable-size matrix type is not supported for HDL code generation.
But at dut_wrapper_fixpt.m line 15 is only the call to a function in which all the errors occur.
Can I find the location of varargin & others by their name? var_1 (or var) for example does not even occur in my source.
채택된 답변
추가 답변 (2개)
Kiran Kintali
2020년 3월 31일
0 개 추천
MATLAB code with variable dimensions in MATLAB is not suitable for mapping to hardware. Noting the enhancement to improve the error message locations.
Kiran Kintali
2020년 4월 3일
We got to compile the snippet in Simulink using MATLAB function block, looking into the standalone MATLAB issue. Thanks for reporting this issue.

codegen -config:hdl -args {zeros(25,3), 0} -report fcn
function y = fcn(bar, idx)
foo = zeros(25,3);
for i=2:4
foo = bar(:,i-1:i+1);
% do sth with foo
end
y = foo(:, idx);
카테고리
도움말 센터 및 File Exchange에서 Speed Optimization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!