VHDL Coder Error: "Found an unsupported unbounded loop structure"

Hello, I am trying to convert this code into HDL. I am getting these errors but it won't tell me the location. I have already changed all the for loops into static ones. What can I do to fix this? I'm new to matLAB and also to HDL Coder so I don't know if the way I'm going through the matrices is supported or not.
OneRVHDLtest_fixpt:0 Error Found an unsupported unbounded loop structure, at Function 'sortIdx' (#53.18405.18482), line 530, column 1 Function 'sortIdx' (#53.17932.18022), line 514, column 5 Function 'sortIdx' (#53.11676.11779), line 333, column 5 Function 'sortIdx' (#53.3899.4005), line 105, column 13 Function 'sort' (#45.3187.3277), line 72, column 5. This loop may be user written or automatically generated due to the use of specific vector expressions or functions.
OneRVHDLtest_fixpt:0 Error Found an unsupported unbounded loop structure. This loop may be user written or automatically generated due to the use of specific vector expressions or functions.
OneRVHDLtest_fixpt:0 Error Found an unsupported unbounded loop structure, at Function 'sortIdx' (#53.18405.18482), line 530, column 1 Function 'sortIdx' (#53.17756.17862), line 507, column 9 Function 'sortIdx' (#53.11676.11779), line 333, column 5 Function 'sortIdx' (#53.3899.4005), line 105, column 13 Function 'sort' (#45.3187.3277), line 72, column 5. This loop may be user written or automatically generated due to the use of specific vector expressions or functions.
OneRVHDLtest_fixpt:0 Error Found an unsupported unbounded loop structure, at Function 'sortIdx' (#53.19212.19330), line 561, column 13 Function 'sortIdx' (#53.17756.17862), line 507, column 9 Function 'sortIdx' (#53.11676.11779), line 333, column 5 Function 'sortIdx' (#53.3899.4005), line 105, column 13 Function 'sort' (#45.3187.3277), line 72, column 5. This loop may be user written or automatically generated due to the use of specific vector expressions or functions.
OneRVHDLtest_fixpt:0 Error Found an unsupported unbounded loop structure. This loop may be user written or automatically generated due to the use of specific vector expressions or functions.

 채택된 답변

Kiran Kintali
Kiran Kintali 2020년 4월 19일

1 개 추천

It looks like the error is originating from the unsupported functions calls on these lines.
HDLCoder team is aware of the issue with traceability of error messages from deep inside MATLAB toolbox library functions. The team is working on enhancing this behavior and making the experience better when reporting unsupported constructs. The above message shows future behavior from such calls until those restrictions are removed.
For now consider writing your own median function using supported MATLAB constructs.
Hope this helps.

추가 답변 (1개)

Kiran Kintali
Kiran Kintali 2020년 4월 18일

0 개 추천

Typically this error means you have loop bounds that are not static and determinable at compile time. Compiling MATLAB functions to synthesizable hardware targeting FPGA/ASIC designs require fixed size loops.
Please provide the testbench and MATLAB HDLCoder project for this design.
Thank you.

댓글 수: 1

Abigail Kwan
Abigail Kwan 2020년 4월 19일
편집: Abigail Kwan 2020년 4월 19일
I put the project and test bench for this design in a zip file. Let me know how I can fix it. Thank you. I am trying to implement OneR machine learning algorithm into VHDL.

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

태그

질문:

2020년 4월 17일

답변:

2020년 4월 19일

Community Treasure Hunt

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

Start Hunting!

Translated by